Packages

object Backoff

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

Type Members

  1. class TakeWhile extends Backoff

    See also

    Backoff.takeUntil as the api to create this strategy.

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. def apply(start: Duration)(f: (Duration) ⇒ Duration): Backoff

    Create backoffs starting from start, and changing by f.

    Create backoffs starting from start, and changing by f.

    start

    must be greater than or equal to 0.

    f

    function to return the next backoff. Please make sure the returned backoff is non-negative.

    Note

    when passing in a referentially transparent function f, the returned backoff will be calculated based on the current function that f refers to.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def const(start: Duration): Backoff

    Create backoffs with a constant value start.

    Create backoffs with a constant value start.

    start

    must be greater than or equal to 0.

    See also

    constant for a Java friendly API

  8. def constant(start: Duration): Backoff

    Alias for const, which is a reserved word in Java

  9. def decorrelatedJittered(start: Duration, maximum: Duration): Backoff

    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.

  10. val empty: Backoff

    Stop creating backoffs, this is used to terminate backoff supplies.

    Stop creating backoffs, this is used to terminate backoff supplies.

    Note

    calling duration on empty will return a NoSuchElementException, calling next on this will return an UnsupportedOperationException.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equalJittered(start: Duration, maximum: Duration): Backoff

    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.

    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 exponentialJittered for alternative jittered approaches.

  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def exponential(start: Duration, multiplier: Int, maximum: Duration): Backoff

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

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

    start

    must be greater than or equal to 0.

    multiplier

    must be greater than 0.

    maximum

    must be greater than 0.

  15. def exponential(start: Duration, multiplier: Int): Backoff

    Create backoffs that start at start, grow exponentially by multiplier.

    Create backoffs that start at start, grow exponentially by multiplier.

    start

    must be greater than or equal to 0.

    multiplier

    must be greater than 0.

  16. def exponentialJittered(start: Duration, maximum: Duration): Backoff

    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.

    Note

    This is "full jitter" via https://www.awsarchitectureblog.com/2015/03/backoff.html

    See also

    decorrelatedJittered and equalJittered for alternative jittered approaches.

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

    Create backoffs with values produced by a given generation function.

    Create backoffs with values produced by a given generation function.

    Note

    duration is computed for each occurrence. This is similar to Stream.continually. It is not guaranteed that calling duration on the same strategies multiple times returns the same value.

    ,

    please make sure the backoffs returned from the generation function is non-negative.

  19. def fromStream(s: Stream[Duration]): Backoff

    Create a Backoff from a Stream[Duration.

    Create a Backoff from a Stream[Duration.

    Note

    This API is only recommended to be used for migrating from Stream to Backoff.

    ,

    Every element of s will be memorized due to the nature of Stream, when using this method, your service is at risk of memory leaks.

  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def linear(start: Duration, offset: Duration, maximum: Duration): Backoff

    Create backoffs that start at start, grows linearly by offset, and capped at maximum.

    Create backoffs that start at start, grows linearly by offset, and capped at maximum.

    start

    must be greater than or equal to 0.

    maximum

    must be greater than or equal to 0.

  24. def linear(start: Duration, offset: Duration): Backoff

    Create backoffs that start at start, grows linearly by offset.

    Create backoffs that start at start, grows linearly by offset.

    start

    must be greater than or equal to 0.

  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Deprecated Value Members

  1. def toJava(backoff: Backoff): Backoff

    Deprecated

    Use any Backoff api to generate java friendly backoffs. This api is kept for backward compatible and will be removed.

Inherited from AnyRef

Inherited from Any

Ungrouped