p

retry

package retry

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait CountingPolicy extends Policy

    Retry policy that incorporates a count

  2. trait Jitter extends AnyRef
  3. trait Policy extends AnyRef

    A Policy defines an interface for applying a future with retry semantics specific to implementations

  4. case class PromiseWrapper [T](promise: () ⇒ Future[T]) extends Product with Serializable
  5. class Success [-T] extends AnyRef
    Annotations
    @implicitNotFound( ... )

Value Members

  1. object Backoff
  2. object Defaults
  3. object Directly
  4. object Jitter

    The algorithms here were inspired by this article: https://www.awsarchitectureblog.com/2015/03/backoff.html

  5. object JitterBackoff

    A retry policy which will back off using a configurable policy which incorporates random jitter.

    A retry policy which will back off using a configurable policy which incorporates random jitter. This has the advantage of reducing contention if you have threaded clients using the same service.

    val policy = retry.JitterBackoff()
    val future = policy(issueRequest)

    The following pre-made jitter algorithms are available for you to use:

    You can choose one like this:

    implicit val jitter = retry.Jitter.full(cap = 5.minutes)
    val policy = retry.JitterBackoff(1 second)
    val future = policy(issueRequest)

    If a jitter policy isn't in scope, it will use retry.Jitter.full by default which tends to cause clients slightly less work at the cost of slightly more time.

    For more information about the algorithms, see the following article:

    https://www.awsarchitectureblog.com/2015/03/backoff.html

  6. object Pause
  7. object PromiseWrapper extends Serializable
  8. object Success
  9. object When

    A retry policy in which the a failure determines the way a future should be retried.

    A retry policy in which the a failure determines the way a future should be retried. The partial function provided may define the domain of both the success OR exceptional failure of a future fails explicitly.

    val policy = retry.When {
      case RetryAfter(retryAt) => retry.Pause(delay = retryAt)
    }
    val future = policy(issueRequest)

    If the result is not defined for the depends block, the future will not be retried.

Ungrouped