package backoff
The atmos.backoff
package provides common implementations of the atmos.BackoffPolicy trait.
- Alphabetic
- By Inheritance
- backoff
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
ConstantBackoff
(backoff: FiniteDuration = defaultBackoff) extends BackoffPolicy with Product with Serializable
A policy that uses the same backoff after every retry.
-
case class
ExponentialBackoff
(initialBackoff: FiniteDuration = defaultBackoff) extends BackoffPolicy with Product with Serializable
A policy that doubles the backoff duration after every attempt.
A policy that doubles the backoff duration after every attempt.
- initialBackoff
The backoff used for the first retry as well as the base for all subsequent retries.
-
case class
FibonacciBackoff
(initialBackoff: FiniteDuration = defaultBackoff) extends BackoffPolicy with Product with Serializable
A policy that increases the initial backoff duration by repeatedly multiplying by an approximation of the golden ratio (8 / 5, the sixth and fifth fibonacci numbers).
A policy that increases the initial backoff duration by repeatedly multiplying by an approximation of the golden ratio (8 / 5, the sixth and fifth fibonacci numbers).
- initialBackoff
The backoff used for the first retry as well as the base for all subsequent retries.
-
case class
LinearBackoff
(initialBackoff: FiniteDuration = defaultBackoff) extends BackoffPolicy with Product with Serializable
A policy that increases the backoff duration by the same amount after every retry.
A policy that increases the backoff duration by the same amount after every retry.
- initialBackoff
The backoff used for the first retry as well as the base for all subsequent attempts.
-
case class
RandomizedBackoff
(policy: BackoffPolicy, range: (FiniteDuration, FiniteDuration)) extends BackoffPolicy with Product with Serializable
A policy that randomizes the result of another policy by adding a random duration in the specified range.
A policy that randomizes the result of another policy by adding a random duration in the specified range.
- policy
The base policy to randomize the result of.
- range
The range of values that may be used to modify the result of the base policy.
-
case class
SelectedBackoff
(f: (Try[Any]) ⇒ BackoffPolicy) extends BackoffPolicy with Product with Serializable
A policy that delegates to another policy that is selected based on the most recently evaluated outcome.
A policy that delegates to another policy that is selected based on the most recently evaluated outcome.
- f
The function that maps from outcomes to backoff policies.
Value Members
-
val
defaultBackoff: FiniteDuration
The default backoff duration.