|
Twitch SDK (Internal)
|
#include <timer.h>
Public Member Functions | |
| RetryBackoffTable () | |
| RetryBackoffTable (const std::vector< uint64_t > &tableMilliseconds, uint64_t retryJitterWidthMs) | |
| RetryBackoffTable (uint64_t maxInterval, uint64_t retryJitterWidthMs) | |
| void | Advance () |
| void | Reset () |
| uint64_t | GetInterval () const |
Private Member Functions | |
| void | CreateTable (uint64_t maxInterval) |
Private Attributes | |
| std::vector< uint64_t > | mBackOffTableMilliseconds |
| uint64_t | mJitterMilliseconds |
| uint32_t | mNextAttemptNumber |
Maintains a table of intervals used to manage the backoff that should be done when retrying requests to a failing endpoint. Usage: Create the table with the desired backoff. When the timed operation succeeds, call Reset() to reset the internal backoff. When the timed operation fails, call GetInterval() to start your timer and call Advance() so the next call to GetInterval() will use the next interval.
| ttv::RetryBackoffTable::RetryBackoffTable | ( | ) |
Creates a default table with default jitter.
| ttv::RetryBackoffTable::RetryBackoffTable | ( | const std::vector< uint64_t > & | tableMilliseconds, |
| uint64_t | retryJitterWidthMs | ||
| ) |
Uses an explicit table and jitter.
| ttv::RetryBackoffTable::RetryBackoffTable | ( | uint64_t | maxInterval, |
| uint64_t | retryJitterWidthMs | ||
| ) |
Computes an exponential backoff table and uses the given jitter.
| void ttv::RetryBackoffTable::Advance | ( | ) |
Advance to the next retry interval.
|
private |
| uint64_t ttv::RetryBackoffTable::GetInterval | ( | ) | const |
Gets the next timer interval to use.
| void ttv::RetryBackoffTable::Reset | ( | ) |
Reset the retry attempt index.
|
private |
|
private |
|
private |
1.8.13