Retry timer with backoff.
More...
#include <health_monitor_timer.h>
Retry timer with backoff.
- Used for retrying operations e.g. setting SRO, terminating connections, etc.
- Driven by a sleep wait interval until max retries reached
- Unrelated to the Collector base interval
◆ Retry_Timer()
| hm::Retry_Timer::Retry_Timer |
( |
int |
max_retries | ) |
|
|
inlineexplicit |
◆ format_status()
| std::string hm::Retry_Timer::format_status |
( |
| ) |
const |
Retry Timer - Print status.
- Return formatted string with timer settings
◆ max_retries()
| int hm::Retry_Timer::max_retries |
( |
| ) |
const |
|
inline |
◆ next_wait()
| int hm::Retry_Timer::next_wait |
( |
| ) |
const |
|
inline |
◆ remaining()
| int hm::Retry_Timer::remaining |
( |
| ) |
const |
|
inline |
◆ reset()
| void hm::Retry_Timer::reset |
( |
| ) |
|
◆ retry_count()
| int hm::Retry_Timer::retry_count |
( |
| ) |
const |
|
inline |
◆ set_max_retries()
| void hm::Retry_Timer::set_max_retries |
( |
int |
max_retries | ) |
|
|
inline |
◆ wait()
| bool hm::Retry_Timer::wait |
( |
| ) |
|
Retry Timer - Wait.
- Wait with exponential backoff 1(0), 2, 4, 8, ...
- Returns
- true to try again, false if max attempts reached
◆ m_max_retries
| int hm::Retry_Timer::m_max_retries {0} |
|
private |
◆ m_next_wait_ms
| int hm::Retry_Timer::m_next_wait_ms {0} |
|
private |
◆ m_retry_count
| int hm::Retry_Timer::m_retry_count {0} |
|
private |
◆ m_wait_ms
| int hm::Retry_Timer::m_wait_ms {0} |
|
private |
The documentation for this class was generated from the following files: