#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.  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_access * | access | 
| 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
Definition at line 29 of file MessageDelayPools.h.
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()
      
  | 
  override | 
Definition at line 77 of file MessageDelayPools.cc.
References access, and aclDestroyAccessList().
◆ MessageDelayPool() [2/2]
      
  | 
  delete | 
Member Function Documentation
◆ bytesIn()
      
  | 
  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 110 of file MessageDelayPools.cc.
References individualMaximum, individualRestore, and initialBucketLevel.
◆ dump()
| 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().
◆ level()
      
  | 
  inline | 
Definition at line 42 of file MessageDelayPools.h.
References DelayBucket::level(), and theBucket.
Referenced by MessageBucket::quota().
◆ noLimit()
      
  | 
  inline | 
Definition at line 46 of file MessageDelayPools.h.
References aggregateRestore.
Referenced by bytesIn(), MessageBucket::quota(), and refillBucket().
◆ operator=()
      
  | 
  delete | 
◆ refillBucket()
| 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().
Member Data Documentation
◆ access
| acl_access* MessageDelayPool::access | 
Definition at line 50 of file MessageDelayPools.h.
Referenced by dump(), MessageDelayConfig::parseResponseDelayPoolAccess(), and ~MessageDelayPool().
◆ 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
      
  | 
  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
- About Squid
 - Why Squid?
 - Squid Developers
 - How to Donate
 - How to Help Out
 - Getting Squid
 - Squid Source Packages
 - Squid Deployment Case-Studies
 - Squid Software Foundation
 
Documentation
- Quick Setup
 - Configuration:
 - FAQ and Wiki
 - Guide Books:
 - Non-English
 - More...
 
Support
- Security Advisories
 - Bugzilla Database
 - Mailing lists
 - Contacting us
 - Commercial services
 - Project Sponsors
 - Squid-based products
 
