RetryConfig

ox.resilience.RetryConfig
See theRetryConfig companion class
object RetryConfig

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): RetryConfig[E, T]

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

Creates a config 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

RetryConfig(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): RetryConfig[E, T]

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

Creates a config 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

RetryConfig(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): RetryConfig[E, T]

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

Creates a config 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

RetryConfig(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): RetryConfig[E, T]

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

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

This is a shorthand for

RetryConfig(Schedule.Delay.forever(delay))

Value parameters

delay

The delay between subsequent attempts.

Attributes

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

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

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

This is a shorthand for

RetryConfig(Schedule.Immediate(maxRetries))

Value parameters

maxRetries

The maximum number of retries.

Attributes

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

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

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

This is a shorthand for

RetryConfig(Schedule.Immediate.forever)

Attributes