com.twitter.finagle.service

Backoff

object Backoff

Implements various backoff strategies.

Strategies are defined by a Stream[Duration] and are intended for use with RetryFilter.apply and RetryPolicy.backoff to determine the duration after which a request is to be retried.

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. def apply(next: Duration)(f: (Duration) ⇒ Duration): Stream[Duration]

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def const(start: Duration): Stream[Duration]

    See constant for a Java friendly API

  10. def constant(start: Duration): Stream[Duration]

    Alias for const, which is a reserved word in Java

  11. def decorrelatedJittered(start: Duration, maximum: Duration): Stream[Duration]

    Create backoffs that have jitter with a random distribution between start and 3 times the previously selected value, capped at maximum.

    Create backoffs that have jitter with a random distribution between start and 3 times the previously selected value, capped at maximum.

    start

    must be greater than 0 and less than or equal to maximum.

    maximum

    must be greater than 0 and greater than or equal to start.

    See also

    exponentialJittered and equalJittered for alternative jittered approaches.

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

    Definition Classes
    AnyRef
  13. def equalJittered(start: Duration, maximum: Duration): Stream[Duration]

    Create backoffs that keep half of the exponential growth, and jitter between 0 and that amount.

    Create backoffs that keep half of the exponential growth, and jitter between 0 and that amount.

    See also

    exponentialJittered and decorrelatedJittered for alternative jittered approaches.

  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def exponential(start: Duration, multiplier: Int, maximum: Duration): Stream[Duration]

    Create backoffs that grow exponentially by multiplier, capped at maximum.

    Create backoffs that grow exponentially by multiplier, capped at maximum.

    See also

    exponentialJittered for a version that incorporates jitter.

  16. def exponential(start: Duration, multiplier: Int): Stream[Duration]

    Create backoffs that grow exponentially by multiplier.

    Create backoffs that grow exponentially by multiplier.

    See also

    exponentialJittered for a version that incorporates jitter.

  17. def exponentialJittered(start: Duration, maximum: Duration): Stream[Duration]

    Create backoffs that grow exponentially by 2, capped at maximum, with each backoff having jitter, or randomness, between 0 and the exponential backoff value.

    Create backoffs that grow exponentially by 2, capped at maximum, with each backoff having jitter, or randomness, between 0 and the exponential backoff value.

    start

    must be greater than 0 and less than or equal to maximum.

    maximum

    must be greater than 0 and greater than or equal to start.

    See also

    decorrelatedJittered and equalJittered for alternative jittered approaches.

  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def fromFunction(f: () ⇒ Duration): Stream[Duration]

    Create backoffs with values produced by a given generation function.

  20. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  23. def linear(start: Duration, offset: Duration, maximum: Duration): Stream[Duration]

    Create backoffs that grow linear by offset, capped at maximum.

  24. def linear(start: Duration, offset: Duration): Stream[Duration]

    Create backoffs that grow linear by offset.

  25. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  29. def toJava(backoffs: Stream[Duration]): Callable[Iterator[Duration]]

    Convert a Stream of Durations into a Java-friendly representation.

  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped