final class RetrySettings extends AnyRef
- Alphabetic
- By Inheritance
- RetrySettings
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Value Members
- val delayFunction: (Int) => Option[FiniteDuration]
- val maxRetries: Int
- val shouldRetry: (Throwable) => Boolean
- def toString(): String
- Definition Classes
- RetrySettings → AnyRef → Any
- def withDecider(shouldRetry: (Throwable) => Boolean): RetrySettings
Scala API: Set the function to determine if a failure should be retried.
Scala API: Set the function to determine if a failure should be retried.
- shouldRetry
function to determine if a failure should be retried
- returns
Updated settings
- def withDelayFunction(delayFunction: (Int) => Option[FiniteDuration]): RetrySettings
Scala API: Set custom delay function between retries.
Scala API: Set custom delay function between retries.
- delayFunction
function to calculate the delay between retries
- returns
Updated settings
- def withExponentialBackoff(minBackoff: Duration, maxBackoff: Duration, randomFactor: Double): RetrySettings
Java API: Set exponential backoff delay between retries.
Java API: Set exponential backoff delay between retries.
- minBackoff
minimum backoff duration
- maxBackoff
maximum backoff duration
- randomFactor
random factor to add jitter to the backoff
- returns
Updated settings
- def withExponentialBackoff(minBackoff: FiniteDuration, maxBackoff: FiniteDuration, randomFactor: Double): RetrySettings
Scala API: Set exponential backoff delay between retries.
Scala API: Set exponential backoff delay between retries.
- minBackoff
minimum backoff duration
- maxBackoff
maximum backoff duration
- randomFactor
random factor to add jitter to the backoff
- def withFixedDelay(fixedDelay: Duration): RetrySettings
Java API: Set fixed delay between retries.
Java API: Set fixed delay between retries.
- fixedDelay
fixed delay between retries
- returns
Updated settings
- def withFixedDelay(fixedDelay: FiniteDuration): RetrySettings
Scala API: Set fixed delay between retries.
Scala API: Set fixed delay between retries.
- fixedDelay
fixed delay between retries
- returns
Updated settings
- def withJavaDecider(shouldRetry: Function[Throwable, Boolean]): RetrySettings
Java API: Set the function to determine if a failure should be retried.
Java API: Set the function to determine if a failure should be retried.
- shouldRetry
function to determine if a failure should be retried
- returns
Updated settings
- def withJavaDelayFunction(delayFunction: IntFunction[Optional[Duration]]): RetrySettings
Java API: Set custom delay function between retries.
Java API: Set custom delay function between retries.
- delayFunction
function to calculate the delay between retries
- returns
Updated settings