Package org.redisson.api
Class LockOptions.ExponentialBackOff
java.lang.Object
org.redisson.api.LockOptions.ExponentialBackOff
- All Implemented Interfaces:
LockOptions.BackOff
- Enclosing class:
- LockOptions
Back off algorithm, where sleep period starts with initialDelay, each time increases
multiplier times but doesn't exceed maxDelay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
long
long
int
initialDelay
(long initialDelay) Sets initial back off delay.maxDelay
(long maxDelay) Sets max back off delay.multiplier
(int multiplier) Sets back off delay multiplier.
-
Constructor Details
-
ExponentialBackOff
public ExponentialBackOff()
-
-
Method Details
-
create
- Specified by:
create
in interfaceLockOptions.BackOff
-
maxDelay
Sets max back off delay.Default is
128
- Parameters:
maxDelay
- - max sleep period. Has to be positive- Returns:
- ExponentialBackOffOptions instance
-
getMaxDelay
public long getMaxDelay() -
initialDelay
Sets initial back off delay.Default is
1
- Parameters:
initialDelay
- - initial sleep period. Has to be positive- Returns:
- ExponentialBackOffOptions instance
-
getInitialDelay
public long getInitialDelay() -
multiplier
Sets back off delay multiplier.Default is
2
- Parameters:
multiplier
- - sleep period multiplier. Has to be positive- Returns:
- ExponentialBackOffOptions instance
-
getMultiplier
public int getMultiplier()
-