Package org.redisson.config
Class ConstantDelay
java.lang.Object
org.redisson.config.ConstantDelay
- All Implemented Interfaces:
DelayStrategy
A constant delay strategy that returns the same delay duration for every retry attempt.
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorsConstructorDescriptionConstantDelay(Duration delay) Creates a constant delay strategy with the specified delay duration. -
Method Summary
-
Constructor Details
-
ConstantDelay
Creates a constant delay strategy with the specified delay duration.- Parameters:
delay- the fixed delay duration to use between retry attempts
-
-
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
-