BandwidthBucket.h
Go to the documentation of this file.
bool noLimit() const
Whether this bucket will not do bandwidth limiting.
Definition: BandwidthBucket.h:41
void refillBucket()
Increases the bucket level with the writeSpeedLimit speed.
Definition: BandwidthBucket.cc:31
BandwidthBucket(const int speed, const int initialLevelPercent, const double sizeLimit)
Definition: BandwidthBucket.cc:19
virtual void onFdClosed()
Performs cleanup when the related file descriptor becomes closed.
Definition: BandwidthBucket.h:37
virtual bool applyQuota(int &nleft, Comm::IoCallback *state)
Definition: BandwidthBucket.cc:66
virtual int quota()=0
static BandwidthBucket * SelectBucket(fde *f)
Definition: BandwidthBucket.cc:95
virtual void reduceBucket(const int len)
Decreases the bucket level.
Definition: BandwidthBucket.cc:83
virtual void scheduleWrite(Comm::IoCallback *state)=0
Will plan another write call.