Package org.redisson.config
Class FullJitterDelay
java.lang.Object
org.redisson.config.FullJitterDelay
- All Implemented Interfaces:
DelayStrategy
Full jitter strategy that applies complete randomization to the exponential backoff delay.
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorsConstructorDescriptionFullJitterDelay(Duration baseDelay, Duration maxDelay) Creates a full jitter delay strategy with exponential backoff. -
Method Summary
-
Constructor Details
-
FullJitterDelay
Creates a full jitter delay strategy with exponential backoff.- Parameters:
baseDelay- the base delay duration for the first retry attemptmaxDelay- the maximum delay duration to cap the exponential growth
-
-
Method Details
-
calcDelay
Description copied from interface:DelayStrategyCalculates the delay duration to wait before the next retry attempt.- Specified by:
calcDelayin interfaceDelayStrategy- Parameters:
attempt- the zero-based retry attempt number (0 = first retry)- Returns:
- the duration to wait before the next retry attempt
-