Interface Jitter
- All Superinterfaces:
Function<BackoffDelay,Duration>
Jitter function that is applied to the backoff delay.
-
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic JitternoJitter()Jitter function that is a no-op.static Jitterrandom()Jitter function that applies a random jitter with a factor of 0.5, generating a backoff between[d - d*0.5; d + d*0.5](but still within the limits of [BackoffDelay.minDelay();BackoffDelay.maxDelay()].static Jitterrandom(double randomFactor) Jitter function that applies a random jitter with a provided [0; 1] factor (default 0.5), generating a backoff between[d - d*factor; d + d*factor](but still within the limits of [BackoffDelay.minDelay();BackoffDelay.maxDelay()].
-
Field Details
-
NO_JITTER
-
RANDOM_JITTER
-
-
Method Details
-
noJitter
Jitter function that is a no-op.- Returns:
- Jitter function that does not apply any jitter
-
random
Jitter function that applies a random jitter with a factor of 0.5, generating a backoff between[d - d*0.5; d + d*0.5](but still within the limits of [BackoffDelay.minDelay();BackoffDelay.maxDelay()].- Returns:
- Jitter function to randomize backoff delay
-
random
Jitter function that applies a random jitter with a provided [0; 1] factor (default 0.5), generating a backoff between[d - d*factor; d + d*factor](but still within the limits of [BackoffDelay.minDelay();BackoffDelay.maxDelay()].- Returns:
- Jitter function to randomize backoff delay
-