com.twitter.finagle.service

RetryPolicy

Related Docs: class RetryPolicy | package service

object RetryPolicy extends JavaSingleton

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RetryPolicy
  2. JavaSingleton
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val ChannelClosedExceptionsOnly: PartialFunction[Try[Nothing], Boolean]

  5. val Never: RetryPolicy[Try[Nothing]]

  6. object RetryableWriteException

  7. val TimeoutAndWriteExceptionsOnly: PartialFunction[Try[Nothing], Boolean]

  8. val WriteExceptionsOnly: PartialFunction[Try[Nothing], Boolean]

    Failures that are generally retryable because the request failed before it finished being written to the remote service.

    Failures that are generally retryable because the request failed before it finished being written to the remote service. See com.twitter.finagle.WriteException.

  9. def apply[A](f: (A) ⇒ Option[(Duration, RetryPolicy[A])]): RetryPolicy[A]

    Lifts a function of type A => Option[(Duration, RetryPolicy[A])] in the RetryPolicy type.

  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def backoff[A](backoffs: Stream[Duration])(shouldRetry: PartialFunction[A, Boolean]): RetryPolicy[A]

    Retry based on a series of backoffs defined by a Stream[Duration].

    Retry based on a series of backoffs defined by a Stream[Duration]. The stream is consulted to determine the duration after which a request is to be retried. A PartialFunction argument determines which request types are retryable.

  12. def backoffJava[A](backoffs: Callable[Iterator[Duration]], shouldRetry: PartialFunction[A, Boolean]): RetryPolicy[A]

    A constructor usable from Java (backoffs from Backoff.toJava).

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def combine[A](policies: RetryPolicy[A]*): RetryPolicy[A]

    Combines multiple RetryPolicys into a single combined RetryPolicy, with interleaved backoffs.

    Combines multiple RetryPolicys into a single combined RetryPolicy, with interleaved backoffs. For a given value of A, each policy in policies is tried in order. If all policies return None, then the combined RetryPolicy returns None. If policy P returns Some((D, P')), then the combined RetryPolicy returns Some((D, P)), where P is a new combined RetryPolicy with the same sub-policies, with the exception of P replaced by P'.

    The ordering of policies matters: earlier policies get a chance to handle the failure before later policies; a catch-all policy, if any, should be last.

    As an example, let's say you combine two RetryPolicys, R1 and R2, where R1 handles only exception E1 with a backoff of (10.milliseconds, 20.milliseconds, 30.milliseconds), while R2 handles only exception E2 with a backoff of (15.milliseconds, 25.milliseconds).

    If a sequence of exceptions, (E2, E1, E1, E2), is fed in order to the combined retry policy, the backoffs seen will be (15.milliseconds, 10.milliseconds, 20.milliseconds, 25.milliseconds).

    The maximum number of retries the combined policy could allow under the worst case scenario of exceptions is equal to the sum of the individual maximum retries of each subpolicy. To put a cap on the combined maximum number of retries, you can call limit on the combined policy with a smaller cap.

  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def get: JavaSingleton

    Definition Classes
    JavaSingleton
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. def tries(numTries: Int): RetryPolicy[Try[Nothing]]

    Try up to a specific number of times of times on failures that are com.twitter.finagle.service.RetryPolicy.WriteExceptionsOnly.

    Try up to a specific number of times of times on failures that are com.twitter.finagle.service.RetryPolicy.WriteExceptionsOnly.

    numTries

    the maximum number of attempts (including retries) that can be made. A value of 1 means one attempt and no retries on failure. A value of 2 means one attempt and then a single retry if the failure meets the criteria of com.twitter.finagle.service.RetryPolicy.WriteExceptionsOnly.

  28. def tries[A](numTries: Int, shouldRetry: PartialFunction[A, Boolean]): RetryPolicy[A]

    Try up to a specific number of times, based on the supplied PartialFunction[A, Boolean].

    Try up to a specific number of times, based on the supplied PartialFunction[A, Boolean]. A value of type A is considered retryable if and only if the PartialFunction is defined at and returns true for that value.

    numTries

    the maximum number of attempts (including retries) that can be made. A value of 1 means one attempt and no retries on failure. A value of 2 means one attempt and then a single retry if the failure meets the criteria of shouldRetry.

    shouldRetry

    which A-typed values are considered retryable.

  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from JavaSingleton

Inherited from AnyRef

Inherited from Any

Ungrouped