object Jitter
The algorithms here were inspired by this article: https://www.awsarchitectureblog.com/2015/03/backoff.html
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Jitter
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
type
RandomSource = (Long, Long) ⇒ Long
Given a lower and upper bound (inclusive) generate a random number within those bounds
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
decorrelated(cap: Duration = Defaults.cap, random: RandomSource = Defaults.random, base: Int = 3): Jitter
similar to full, but we also increase the maximum jitter startd on the last random value.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equal(cap: Duration = Defaults.cap, random: RandomSource = Defaults.random, base: Int = 2): Jitter
Always keep some of the backoff and jitter by a smaller amount (prevents very short sleeps)
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
full(cap: Duration = Defaults.cap, random: RandomSource = Defaults.random, base: Int = 2): Jitter
Normal exponential backoff + cap + random jitter
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
none(cap: Duration = Defaults.cap, base: Int = 2): Jitter
Simple exponential backoff + cap
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
randomSource(random: ⇒ Random): RandomSource
Create a RandomSource from an instance of java.util.Random Please be mindful of the call-by-name semantics
-
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( ... )