#include <fastmm/net/backoff.hpp>
◆ ExponentialBackoff() [1/2]
| fastmm::net::ExponentialBackoff::ExponentialBackoff |
( |
BackoffConfig |
cfg = {} | ) |
|
|
inlineexplicitnoexcept |
◆ ExponentialBackoff() [2/2]
| fastmm::net::ExponentialBackoff::ExponentialBackoff |
( |
BackoffConfig |
cfg, |
|
|
std::uint64_t |
seed |
|
) |
| |
|
inlinenoexcept |
◆ next_ms()
| std::uint32_t fastmm::net::ExponentialBackoff::next_ms |
( |
| ) |
|
|
inlinenoexcept |
Delay for the current attempt in milliseconds; advances the attempt counter.
◆ reset()
| void fastmm::net::ExponentialBackoff::reset |
( |
| ) |
|
|
inlinenoexcept |
◆ attempt()
| std::uint32_t fastmm::net::ExponentialBackoff::attempt |
( |
| ) |
const |
|
inlinenoexcept |
◆ config()
| const BackoffConfig & fastmm::net::ExponentialBackoff::config |
( |
| ) |
const |
|
inlinenoexcept |
◆ capped_delay()
| std::uint32_t fastmm::net::ExponentialBackoff::capped_delay |
( |
std::uint32_t |
attempt | ) |
const |
|
inlinenoexcept |
Upper bound of the delay for attempt n (before jitter) - exposed for tests/metrics.