Object

com.twitter.finagle.service

Backoff

Related Doc: package service

Permalink

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.

Note

All backoffs created by factory methods on this object are infinite. Use Stream.take to make them terminate.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Backoff
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(start: Duration)(f: (Duration) ⇒ Duration): Stream[Duration]

    Permalink

    Create infinite backoffs that start with start and change by f.

    Create infinite backoffs that start with start and change by f.

    Note

    This is an exact version of Stream.iterate.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

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

    Permalink

    See constant for a Java friendly API

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

    Permalink

    Alias for const, which is a reserved word in Java

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

    Permalink

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

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

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

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

    Permalink

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

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

    See also

    exponentialJittered and decorrelatedJittered for alternative jittered approaches.

  12. def equals(arg0: Any): Boolean

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

    Permalink

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

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

    See also

    exponentialJittered for a version that incorporates jitter.

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

    Permalink

    Create infinite backoffs that grow exponentially by multiplier.

    Create infinite backoffs that grow exponentially by multiplier.

    See also

    exponentialJittered for a version that incorporates jitter.

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

    Permalink

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

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

  16. def finalize(): Unit

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

    Permalink

    Create infinite backoffs with values produced by a given generation function.

    Create infinite backoffs with values produced by a given generation function.

    Note

    This is an exact version of Stream.continually.

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

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

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

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

    Permalink

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

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

    Permalink

    Create infinite backoffs that grow linear by offset.

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

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

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

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

    Permalink

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

  28. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped