Open Lighting Architecture 0.10.9
Loading...
Searching...
No Matches
ola::BackOffPolicy Class Referenceabstract

Detailed Description

A backoff policy will calculate how long to wait before retrying an event given the number of previous failed attempts.

Inheritance diagram for ola::BackOffPolicy:
ola::ConstantBackoffPolicy ola::ExponentialBackoffPolicy ola::LinearBackoffPolicy

Public Member Functions

virtual TimeInterval BackOffTime (unsigned int failed_attempts) const =0
 Calculate the backoff time.
 

Member Function Documentation

◆ BackOffTime()

virtual TimeInterval ola::BackOffPolicy::BackOffTime ( unsigned int failed_attempts) const
pure virtual

Calculate the backoff time.

Parameters
failed_attemptsis the number of unsuccessful connection attempts since the last successful connection.
Returns
how long to wait before the next attempt

Implemented in ola::ConstantBackoffPolicy, ola::ExponentialBackoffPolicy, and ola::LinearBackoffPolicy.


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