Interface Jitter
- All Superinterfaces:
Function<BackoffDelay,
Duration>
Jitter function that is applied to the backoff delay.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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()
].
-
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
-