#include <MessageDelayPools.h>

Inheritance diagram for MessageDelayPool:
Collaboration diagram for MessageDelayPool:

Public Types

typedef RefCount< MessageDelayPoolPointer

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
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

◆ Pointer

Constructor & Destructor Documentation

◆ MessageDelayPool() [1/2]

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.

◆ ~MessageDelayPool()

MessageDelayPool::~MessageDelayPool ( )

Definition at line 77 of file MessageDelayPools.cc.

References access, and aclDestroyAccessList().

◆ MessageDelayPool() [2/2]

MessageDelayPool::MessageDelayPool ( const MessageDelayPool )

Member Function Documentation

◆ bytesIn()

void MessageDelayPool::bytesIn ( int  qty)

Definition at line 40 of file MessageDelayPools.h.

References DelayBucket::bytesIn(), noLimit(), and theBucket.

Referenced by MessageBucket::reduceBucket().

◆ createBucket()

MessageBucket::Pointer MessageDelayPool::createBucket ( )

Definition at line 110 of file MessageDelayPools.cc.

References individualMaximum, individualRestore, and initialBucketLevel.

◆ dump()

◆ level()

int MessageDelayPool::level ( )

Definition at line 42 of file MessageDelayPools.h.

References DelayBucket::level(), and theBucket.

Referenced by MessageBucket::quota().

◆ noLimit()

bool MessageDelayPool::noLimit ( ) const

Definition at line 46 of file MessageDelayPools.h.

References aggregateRestore.

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

◆ operator=()

MessageDelayPool & MessageDelayPool::operator= ( const MessageDelayPool )

◆ refillBucket()

void MessageDelayPool::refillBucket ( )

Member Data Documentation

◆ access

acl_access* MessageDelayPool::access

◆ aggregateMaximum

int64_t MessageDelayPool::aggregateMaximum

Definition at line 60 of file MessageDelayPools.h.

Referenced by MessageDelayPool(), dump(), and refillBucket().

◆ aggregateRestore

int64_t MessageDelayPool::aggregateRestore

Definition at line 58 of file MessageDelayPools.h.

Referenced by dump(), noLimit(), and refillBucket().

◆ individualMaximum

int64_t MessageDelayPool::individualMaximum

Definition at line 56 of file MessageDelayPools.h.

Referenced by createBucket(), and dump().

◆ individualRestore

int64_t MessageDelayPool::individualRestore

Definition at line 54 of file MessageDelayPools.h.

Referenced by createBucket(), and dump().

◆ initialBucketLevel

uint16_t MessageDelayPool::initialBucketLevel

Definition at line 62 of file MessageDelayPools.h.

Referenced by createBucket(), and dump().

◆ lastUpdate

time_t MessageDelayPool::lastUpdate

Definition at line 68 of file MessageDelayPools.h.

Referenced by refillBucket().

◆ poolName

SBuf MessageDelayPool::poolName

Definition at line 52 of file MessageDelayPools.h.

Referenced by MessageDelayPools::add(), and dump().

◆ theBucket

DelayBucket MessageDelayPool::theBucket

Definition at line 64 of file MessageDelayPools.h.

Referenced by MessageDelayPool(), bytesIn(), level(), and refillBucket().

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






Web Site Translations