#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 ()
 
 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

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

◆ ~MessageDelayPool()

MessageDelayPool::~MessageDelayPool ( )

Definition at line 78 of file MessageDelayPools.cc.

References access, and aclDestroyAccessList().

◆ MessageDelayPool() [2/2]

MessageDelayPool::MessageDelayPool ( const MessageDelayPool )
delete

Member Function Documentation

◆ bytesIn()

void MessageDelayPool::bytesIn ( int  qty)
inline

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

References individualMaximum, individualRestore, and initialBucketLevel.

Referenced by level().

◆ dump()

◆ level()

int MessageDelayPool::level ( )
inline

Definition at line 42 of file MessageDelayPools.h.

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

Referenced by MessageBucket::quota().

◆ noLimit()

bool MessageDelayPool::noLimit ( ) const
inline

Definition at line 46 of file MessageDelayPools.h.

References aggregateRestore, and dump().

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

◆ operator=()

MessageDelayPool& MessageDelayPool::operator= ( const MessageDelayPool )
delete

◆ 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 dump(), MessageDelayPool(), 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
private

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


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors