Open Lighting Architecture: ola::BackOffPolicy Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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:

## 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_attempts | is 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:

- include/ola/util/Backoff.h