public interface Jitter extends java.util.function.Function<BackoffDelay,java.time.Duration>
| Modifier and Type | Field and Description |
|---|---|
static Jitter |
NO_JITTER |
static Jitter |
RANDOM_JITTER |
| Modifier and Type | Method and Description |
|---|---|
static Jitter |
noJitter()
Jitter function that is a no-op.
|
static 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()]. |
static Jitter |
random(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()]. |
andThen, apply, compose, identitystatic final Jitter NO_JITTER
static final Jitter RANDOM_JITTER
static Jitter noJitter()
static Jitter random()
[d - d*0.5; d + d*0.5] (but still within the limits of
[BackoffDelay.minDelay(); BackoffDelay.maxDelay()].static Jitter random(double randomFactor)
[d - d*factor; d + d*factor] (but still within
the limits of [BackoffDelay.minDelay(); BackoffDelay.maxDelay()].