Lightweight 0.20260921.0
Loading...
Searching...
No Matches
Lightweight::SqlRetrySleeper Class Referenceabstract

Supplies the wait between retries. More...

#include <SqlRetryPolicy.hpp>

Public Member Functions

virtual ~SqlRetrySleeper ()=default
 Polymorphic destructor.
 
 SqlRetrySleeper (SqlRetrySleeper const &)=delete
 
SqlRetrySleeper & operator= (SqlRetrySleeper const &)=delete
 
 SqlRetrySleeper (SqlRetrySleeper &&)=delete
 
SqlRetrySleeper & operator= (SqlRetrySleeper &&)=delete
 
virtual void Sleep (std::chrono::milliseconds duration)=0
 

Detailed Description

Supplies the wait between retries.

Injected rather than called directly so a test can drive a full retry loop in microseconds and assert on the delays that would have been waited out, instead of actually sleeping through an exponential backoff.

Definition at line 139 of file SqlRetryPolicy.hpp.

Member Function Documentation

◆ Sleep()

virtual void Lightweight::SqlRetrySleeper::Sleep ( std::chrono::milliseconds  duration)
pure virtual

Blocks the calling thread for the given duration.

Parameters
durationHow long to wait.

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