Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
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:
Inheritance graph
[legend]

Public Member Functions

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

Member Function Documentation

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::ExponentialBackoffPolicy, ola::LinearBackoffPolicy, and ola::ConstantBackoffPolicy.


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