|
Squid Web Cache master
|
#include <MessageDelayPools.h>
Public Types | |
| typedef RefCount< MessageDelayPool > | Pointer |
Public Member Functions | |
| MessageDelayPool (const SBuf &name, int64_t bucketSpeed, int64_t bucketSize, int64_t aggregateSpeed, int64_t aggregateSize, uint16_t initialBucketPercent) | |
| ~MessageDelayPool () override | |
| MessageDelayPool (const MessageDelayPool &)=delete | |
| MessageDelayPool & | operator= (const MessageDelayPool &)=delete |
| void | refillBucket () |
| Increases the aggregate bucket level with the aggregateRestore speed. | |
| void | bytesIn (int qty) |
| decreases the aggregate level | |
| int | level () |
| current aggregate level | |
| MessageBucketPointer | createBucket () |
| creates an individual response bucket | |
| bool | noLimit () const |
| whether the aggregate bucket has no limit | |
| void | dump (StoreEntry *entry) const |
Public Attributes | |
| acl_access * | access |
| SBuf | poolName |
| the response delay pool name | |
| int64_t | individualRestore |
| the speed limit of an individual bucket (bytes/s) | |
| int64_t | individualMaximum |
| the maximum size of an individual bucket | |
| int64_t | aggregateRestore |
| the speed limit of the aggregate bucket (bytes/s) | |
| int64_t | aggregateMaximum |
| the maximum size of the aggregate bucket | |
| uint16_t | initialBucketLevel |
| the initial bucket size as a percentage of individualMaximum | |
| DelayBucket | theBucket |
| the aggregate bucket | |
Private Attributes | |
| time_t | lastUpdate |
| Time the aggregate bucket level was last refilled. | |
Represents one 'response' delay pool, creates individual response buckets and performes aggregate limiting for them
Definition at line 26 of file MessageDelayPools.h.
Definition at line 29 of file MessageDelayPools.h.
| MessageDelayPool::MessageDelayPool | ( | const SBuf & | name, |
| int64_t | bucketSpeed, | ||
| int64_t | bucketSize, | ||
| int64_t | aggregateSpeed, | ||
| int64_t | aggregateSize, | ||
| uint16_t | initialBucketPercent | ||
| ) |
Definition at line 63 of file MessageDelayPools.cc.
References aggregateMaximum, DelayBucket::level(), and theBucket.
|
override |
Definition at line 77 of file MessageDelayPools.cc.
References access, and aclDestroyAccessList().
|
delete |
|
inline |
Definition at line 40 of file MessageDelayPools.h.
References DelayBucket::bytesIn(), noLimit(), and theBucket.
Referenced by MessageBucket::reduceBucket().
| MessageBucket::Pointer MessageDelayPool::createBucket | ( | ) |
Definition at line 110 of file MessageDelayPools.cc.
References individualMaximum, individualRestore, and initialBucketLevel.
| void MessageDelayPool::dump | ( | StoreEntry * | entry | ) | const |
Definition at line 99 of file MessageDelayPools.cc.
References access, aggregateMaximum, aggregateRestore, SBuf::append(), SBuf::c_str(), dump_acl_access(), individualMaximum, individualRestore, initialBucketLevel, poolName, PRId64, and storeAppendPrintf().
|
inline |
Definition at line 42 of file MessageDelayPools.h.
References DelayBucket::level(), and theBucket.
Referenced by MessageBucket::quota().
|
inline |
Definition at line 46 of file MessageDelayPools.h.
References aggregateRestore.
Referenced by bytesIn(), MessageBucket::quota(), and refillBucket().
|
delete |
| void MessageDelayPool::refillBucket | ( | ) |
Definition at line 84 of file MessageDelayPools.cc.
References aggregateMaximum, aggregateRestore, lastUpdate, DelaySpec::max_bytes, noLimit(), DelaySpec::restore_bps, squid_curtime, theBucket, and DelayBucket::update().
Referenced by MessageBucket::quota().
| acl_access* MessageDelayPool::access |
Definition at line 50 of file MessageDelayPools.h.
Referenced by ~MessageDelayPool(), dump(), and MessageDelayConfig::parseResponseDelayPoolAccess().
| int64_t MessageDelayPool::aggregateMaximum |
Definition at line 60 of file MessageDelayPools.h.
Referenced by MessageDelayPool(), dump(), and refillBucket().
| int64_t MessageDelayPool::aggregateRestore |
Definition at line 58 of file MessageDelayPools.h.
Referenced by dump(), noLimit(), and refillBucket().
| int64_t MessageDelayPool::individualMaximum |
Definition at line 56 of file MessageDelayPools.h.
Referenced by createBucket(), and dump().
| int64_t MessageDelayPool::individualRestore |
Definition at line 54 of file MessageDelayPools.h.
Referenced by createBucket(), and dump().
| uint16_t MessageDelayPool::initialBucketLevel |
Definition at line 62 of file MessageDelayPools.h.
Referenced by createBucket(), and dump().
|
private |
Definition at line 68 of file MessageDelayPools.h.
Referenced by refillBucket().
| SBuf MessageDelayPool::poolName |
Definition at line 52 of file MessageDelayPools.h.
Referenced by MessageDelayPools::add(), and dump().
| DelayBucket MessageDelayPool::theBucket |
Definition at line 64 of file MessageDelayPools.h.
Referenced by MessageDelayPool(), bytesIn(), level(), and refillBucket().