Scarab  v3.9.4
Project 8 C++ Utility Library
Public Member Functions | List of all members
exponential_backoff< x_args > Class Template Reference

Class that performs an action using exponential backoff. More...

#include <exponential_backoff.hh>

Public Member Functions

 exponential_backoff (std::function< bool(x_args...) > an_action, unsigned a_max_attempts=10, unsigned a_base_delay_ms=100)
 
virtual ~exponential_backoff ()
 
unsigned go (x_args... args)
 returns the number of attempts made at calling the function (including the last, successful or not) More...
 
 snake_case_mv_referrable (std::function< bool(x_args...) >, action)
 
 snake_case_mv_accessible (unsigned, max_attempts)
 
 snake_case_mv_accessible (unsigned, base_delay_ms)
 

Detailed Description

template<typename ... x_args>
class scarab::exponential_backoff< x_args >

Class that performs an action using exponential backoff.

Author
N.S. Oblath

Definition at line 34 of file exponential_backoff.hh.

Constructor & Destructor Documentation

◆ exponential_backoff()

exponential_backoff ( std::function< bool(x_args...) >  an_action,
unsigned  a_max_attempts = 10,
unsigned  a_base_delay_ms = 100 
)

Definition at line 54 of file exponential_backoff.hh.

◆ ~exponential_backoff()

~exponential_backoff ( )
virtual

Definition at line 63 of file exponential_backoff.hh.

Member Function Documentation

◆ go()

unsigned go ( x_args...  args)

returns the number of attempts made at calling the function (including the last, successful or not)

Definition at line 67 of file exponential_backoff.hh.

◆ snake_case_mv_accessible() [1/2]

snake_case_mv_accessible ( unsigned  ,
max_attempts   
)

◆ snake_case_mv_accessible() [2/2]

snake_case_mv_accessible ( unsigned  ,
base_delay_ms   
)

◆ snake_case_mv_referrable()

snake_case_mv_referrable ( std::function< bool(x_args...) >  ,
action   
)

The documentation for this class was generated from the following file: