Open Lighting Architecture  0.9.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::BackOffPolicy Class Reference

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

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

Calculate the backoff time.

Parameters
failed_attemptsis the number of unsuccessfull 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: