RetryPolicies

class Object
trait Matchable
class Any

Value members

Concrete methods

def alwaysGiveUp[M[_]](implicit evidence$1: Applicative[M]): RetryPolicy[M]

Don't retry at all and always give up. Only really useful for combining with other policies.

Don't retry at all and always give up. Only really useful for combining with other policies.

def capDelay[M[_]](cap: FiniteDuration, policy: RetryPolicy[M])(implicit evidence$7: Applicative[M]): RetryPolicy[M]

Set an upper bound on any individual delay produced by the given policy.

Set an upper bound on any individual delay produced by the given policy.

def constantDelay[M[_]](delay: FiniteDuration)(implicit evidence$2: Applicative[M]): RetryPolicy[M]

Delay by a constant amount before each retry. Never give up.

Delay by a constant amount before each retry. Never give up.

def exponentialBackoff[M[_]](baseDelay: FiniteDuration)(implicit evidence$3: Applicative[M]): RetryPolicy[M]

Each delay is twice as long as the previous one. Never give up.

Each delay is twice as long as the previous one. Never give up.

def fibonacciBackoff[M[_]](baseDelay: FiniteDuration)(implicit evidence$5: Applicative[M]): RetryPolicy[M]

Delay(n) = Delay(n - 2) + Delay(n - 1)

Delay(n) = Delay(n - 2) + Delay(n - 1)

e.g. if baseDelay is 10 milliseconds, the delays before each retry will be 10 ms, 10 ms, 20 ms, 30ms, 50ms, 80ms, 130ms, ...

def fullJitter[M[_]](baseDelay: FiniteDuration)(implicit evidence$6: Applicative[M]): RetryPolicy[M]

"Full jitter" backoff algorithm. See https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

def limitRetries[M[_]](maxRetries: Int)(implicit evidence$4: Applicative[M]): RetryPolicy[M]

Retry without delay, giving up after the given number of retries.

Retry without delay, giving up after the given number of retries.

def limitRetriesByCumulativeDelay[M[_]](threshold: FiniteDuration, policy: RetryPolicy[M])(implicit evidence$9: Applicative[M]): RetryPolicy[M]

Add an upperbound to a policy such that once the cumulative delay over all retries has reached or exceeded the given limit, the policy will stop retrying and give up.

Add an upperbound to a policy such that once the cumulative delay over all retries has reached or exceeded the given limit, the policy will stop retrying and give up.

def limitRetriesByDelay[M[_]](threshold: FiniteDuration, policy: RetryPolicy[M])(implicit evidence$8: Applicative[M]): RetryPolicy[M]

Add an upper bound to a policy such that once the given time-delay amount <b>per try</b> has been reached or exceeded, the policy will stop retrying and give up. If you need to stop retrying once <b>cumulative</b> delay reaches a time-delay amount, use limitRetriesByCumulativeDelay.

Add an upper bound to a policy such that once the given time-delay amount <b>per try</b> has been reached or exceeded, the policy will stop retrying and give up. If you need to stop retrying once <b>cumulative</b> delay reaches a time-delay amount, use limitRetriesByCumulativeDelay.