object Backoff
- Alphabetic
- By Inheritance
- Backoff
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
TakeWhile extends Backoff
- See also
Backoff.takeUntil as the api to create this strategy.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(start: Duration)(f: (Duration) ⇒ Duration): Backoff
Create backoffs starting from
start
, and changing byf
.Create backoffs starting from
start
, and changing byf
.- 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 thatf
refers to.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
-
def
constant(start: Duration): Backoff
Alias for const, which is a reserved word in Java
-
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 atmaximum
.Create backoffs that have jitter with a random distribution between
start
and 3 times the previously selected value, capped atmaximum
.- 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.
-
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, callingnext
on this will return an UnsupportedOperationException.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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.
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exponential(start: Duration, multiplier: Int, maximum: Duration): Backoff
Create backoffs that start at
start
, grow exponentially bymultiplier
, and capped atmaximum
.Create backoffs that start at
start
, grow exponentially bymultiplier
, and capped atmaximum
.- start
must be greater than or equal to 0.
- multiplier
must be greater than 0.
- maximum
must be greater than 0.
-
def
exponential(start: Duration, multiplier: Int): Backoff
Create backoffs that start at
start
, grow exponentially bymultiplier
.Create backoffs that start at
start
, grow exponentially bymultiplier
.- start
must be greater than or equal to 0.
- multiplier
must be greater than 0.
-
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.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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 callingduration
on the same strategies multiple times returns the same value.please make sure the backoffs returned from the generation function is non-negative.
-
def
fromStream(s: Stream[Duration]): Backoff
Create a Backoff from a Stream[Duration.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
linear(start: Duration, offset: Duration, maximum: Duration): Backoff
Create backoffs that start at
start
, grows linearly byoffset
, and capped atmaximum
.Create backoffs that start at
start
, grows linearly byoffset
, and capped atmaximum
.- start
must be greater than or equal to 0.
- maximum
must be greater than or equal to 0.
-
def
linear(start: Duration, offset: Duration): Backoff
Create backoffs that start at
start
, grows linearly byoffset
.Create backoffs that start at
start
, grows linearly byoffset
.- start
must be greater than or equal to 0.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()