Packages

final class RetrySettings extends AnyRef

Settings for retrying operations.

Source
RetrySettings.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RetrySettings
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. val delayFunction: (Int) => Option[FiniteDuration]
  2. val maxRetries: Int
  3. val shouldRetry: (Throwable) => Boolean
  4. def toString(): String
    Definition Classes
    RetrySettings → AnyRef → Any
  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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