#include <MessageDelayPools.h>

Inheritance diagram for MessageDelayPool:
Collaboration diagram for MessageDelayPool:

Public Types

typedef RefCount
< MessageDelayPool

Public Member Functions

 MessageDelayPool (const SBuf &name, int64_t bucketSpeed, int64_t bucketSize, int64_t aggregateSpeed, int64_t aggregateSize, uint16_t initialBucketPercent)
 ~MessageDelayPool ()
 MessageDelayPool (const MessageDelayPool &)=delete
MessageDelayPooloperator= (const MessageDelayPool &)=delete
void refillBucket ()
 Increases the aggregate bucket level with the aggregateRestore speed. More...
void bytesIn (int qty)
 decreases the aggregate level More...
int level ()
 current aggregate level More...
MessageBucketPointer createBucket ()
 creates an individual response bucket More...
bool noLimit () const
 whether the aggregate bucket has no limit More...
void dump (StoreEntry *entry) const

Public Attributes

SBuf poolName
 the response delay pool name More...
int64_t individualRestore
 the speed limit of an individual bucket (bytes/s) More...
int64_t individualMaximum
 the maximum size of an individual bucket More...
int64_t aggregateRestore
 the speed limit of the aggregate bucket (bytes/s) More...
int64_t aggregateMaximum
 the maximum size of the aggregate bucket More...
uint16_t initialBucketLevel
 the initial bucket size as a percentage of individualMaximum More...
DelayBucket theBucket
 the aggregate bucket More...

Private Attributes

time_t lastUpdate
 Time the aggregate bucket level was last refilled. More...

Detailed Description

Represents one 'response' delay pool, creates individual response buckets and performes aggregate limiting for them

Definition at line 26 of file MessageDelayPools.h.

Member Typedef Documentation

Constructor & Destructor Documentation

MessageDelayPool::MessageDelayPool ( const SBuf name,
int64_t  bucketSpeed,
int64_t  bucketSize,
int64_t  aggregateSpeed,
int64_t  aggregateSize,
uint16_t  initialBucketPercent 

Definition at line 64 of file MessageDelayPools.cc.

References aggregateMaximum, DelayBucket::level(), and theBucket.

MessageDelayPool::~MessageDelayPool ( )

Definition at line 78 of file MessageDelayPools.cc.

References access, and aclDestroyAccessList().

MessageDelayPool::MessageDelayPool ( const MessageDelayPool )

Member Function Documentation

void MessageDelayPool::bytesIn ( int  qty)

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 111 of file MessageDelayPools.cc.

References individualMaximum, individualRestore, and initialBucketLevel.

int MessageDelayPool::level ( )

Definition at line 42 of file MessageDelayPools.h.

References DelayBucket::level(), and theBucket.

Referenced by MessageBucket::quota().

bool MessageDelayPool::noLimit ( ) const

Definition at line 46 of file MessageDelayPools.h.

References aggregateRestore.

Referenced by bytesIn(), MessageBucket::quota(), and refillBucket().

MessageDelayPool& MessageDelayPool::operator= ( const MessageDelayPool )
void MessageDelayPool::refillBucket ( )

Member Data Documentation

acl_access* MessageDelayPool::access
int64_t MessageDelayPool::aggregateMaximum

Definition at line 60 of file MessageDelayPools.h.

Referenced by dump(), MessageDelayPool(), 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().

time_t MessageDelayPool::lastUpdate

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 bytesIn(), level(), MessageDelayPool(), and refillBucket().

The documentation for this class was generated from the following files:






Web Site Translations