RetryPolicy

ox.retry.RetryPolicy
See theRetryPolicy companion class
object RetryPolicy

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def backoff[E, T](maxRetries: Int, initialDelay: FiniteDuration, maxDelay: FiniteDuration, jitter: Jitter): RetryPolicy[E, T]

Creates a policy that retries up to a given number of times, with an increasing delay (backoff) between subsequent attempts, using a default ResultPolicy.

Creates a policy that retries up to a given number of times, with an increasing delay (backoff) between subsequent attempts, using a default ResultPolicy.

The backoff is exponential with base 2 (i.e. the next delay is twice as long as the previous one), starting at the given initial delay and capped at the given maximum delay.

This is a shorthand for

RetryPolicy(Schedule.Backoff(maxRetries, initialDelay, maxDelay, jitter))

Value parameters

initialDelay

The delay before the first retry.

jitter

A random factor used for calculating the delay between subsequent retries. See Jitter for more details. Defaults to no jitter, i.e. an exponential backoff with no adjustments.

maxDelay

The maximum delay between subsequent retries. Defaults to 1 minute.

maxRetries

The maximum number of retries.

Attributes

def backoffForever[E, T](initialDelay: FiniteDuration, maxDelay: FiniteDuration, jitter: Jitter): RetryPolicy[E, T]

Creates a policy that retries indefinitely, with an increasing delay (backoff) between subsequent attempts, using a default ResultPolicy.

Creates a policy that retries indefinitely, with an increasing delay (backoff) between subsequent attempts, using a default ResultPolicy.

The backoff is exponential with base 2 (i.e. the next delay is twice as long as the previous one), starting at the given initial delay and capped at the given maximum delay.

This is a shorthand for

RetryPolicy(Schedule.Backoff.forever(initialDelay, maxDelay, jitter))

Value parameters

initialDelay

The delay before the first retry.

jitter

A random factor used for calculating the delay between subsequent retries. See Jitter for more details. Defaults to no jitter, i.e. an exponential backoff with no adjustments.

maxDelay

The maximum delay between subsequent retries. Defaults to 1 minute.

Attributes

def delay[E, T](maxRetries: Int, delay: FiniteDuration): RetryPolicy[E, T]

Creates a policy that retries up to a given number of times, with a fixed delay between subsequent attempts, using a default ResultPolicy.

Creates a policy that retries up to a given number of times, with a fixed delay between subsequent attempts, using a default ResultPolicy.

This is a shorthand for

RetryPolicy(Schedule.Delay(maxRetries, delay))

Value parameters

delay

The delay between subsequent attempts.

maxRetries

The maximum number of retries.

Attributes

def delayForever[E, T](delay: FiniteDuration): RetryPolicy[E, T]

Creates a policy that retries indefinitely, with a fixed delay between subsequent attempts, using a default ResultPolicy.

Creates a policy that retries indefinitely, with a fixed delay between subsequent attempts, using a default ResultPolicy.

This is a shorthand for

RetryPolicy(Schedule.Delay.forever(delay))

Value parameters

delay

The delay between subsequent attempts.

Attributes

def immediate[E, T](maxRetries: Int): RetryPolicy[E, T]

Creates a policy that retries up to a given number of times, with no delay between subsequent attempts, using a default ResultPolicy.

Creates a policy that retries up to a given number of times, with no delay between subsequent attempts, using a default ResultPolicy.

This is a shorthand for

RetryPolicy(Schedule.Immediate(maxRetries))

Value parameters

maxRetries

The maximum number of retries.

Attributes

def immediateForever[E, T]: RetryPolicy[E, T]

Creates a policy that retries indefinitely, with no delay between subsequent attempts, using a default ResultPolicy.

Creates a policy that retries indefinitely, with no delay between subsequent attempts, using a default ResultPolicy.

This is a shorthand for

RetryPolicy(Schedule.Immediate.forever)

Attributes