CernVM-FS
2.12.0
|
#include <backoff.h>
Public Member Functions | |
BackoffThrottle () | |
BackoffThrottle (const unsigned init_delay_ms, const unsigned max_delay_ms, const unsigned reset_after_ms) | |
~BackoffThrottle () | |
void | Throttle () |
void | Reset () |
Static Public Attributes | |
static const unsigned | kDefaultInitDelay = 32 |
static const unsigned | kDefaultMaxDelay = 2000 |
static const unsigned | kDefaultResetAfter = 10000 |
Private Member Functions | |
void | Init (const unsigned init_delay_ms, const unsigned max_delay_ms, const unsigned reset_after_ms) |
Private Attributes | |
unsigned | delay_range_ |
unsigned | init_delay_ms_ |
unsigned | max_delay_ms_ |
unsigned | reset_after_ms_ |
time_t | last_throttle_ |
Prng | prng_ |
pthread_mutex_t * | lock_ |
Additional Inherited Members | |
Protected Member Functions inherited from SingleCopy | |
SingleCopy () | |
This file is part of the CernVM File System. When Throttle() is called in quick succession, the exponential backoff will start (sleep). The class forgets a call to Throttle() after reset_after_ms milliseconds.
|
inline |
|
inline |
BackoffThrottle::~BackoffThrottle | ( | ) |
Definition at line 36 of file backoff.cc.
|
private |
Definition at line 18 of file backoff.cc.
Referenced by BackoffThrottle().
void BackoffThrottle::Reset | ( | ) |
Definition at line 42 of file backoff.cc.
Referenced by file_watcher::FileWatcher::RegisterFilter().
void BackoffThrottle::Throttle | ( | ) |
Definition at line 50 of file backoff.cc.
Referenced by FuseRemounter::ChangeRoot(), FuseRemounter::CheckSynchronously(), publish::CmdEnter::CleanupSession(), cvmfs::cvmfs_open(), LogBufferXattr::FinalizeValue(), ResolvConfEventHandler::GetDnsAddresses(), TaskRead::Process(), file_watcher::FileWatcher::RegisterFilter(), and publish::TransactionRetry().
|
static |
|
static |
|
static |