Package org.redisson.api
Class LockOptions.ConstantBackOff
- java.lang.Object
-
- org.redisson.api.LockOptions.ConstantBackOff
-
- All Implemented Interfaces:
LockOptions.BackOff
- Enclosing class:
- LockOptions
public static class LockOptions.ConstantBackOff extends Object implements LockOptions.BackOff
Back off algorithm, where sleep period is constant and is defined by delay. To reduce possible negative effects of many threads simultaneously sending requests, a small random value is added to all sleep periods.
-
-
Constructor Summary
Constructors Constructor Description ConstantBackOff()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockOptions.BackOffPolicy
create()
LockOptions.ConstantBackOff
delay(long delay)
Sets back off delay value.long
getDelay()
-
-
-
Method Detail
-
create
public LockOptions.BackOffPolicy create()
- Specified by:
create
in interfaceLockOptions.BackOff
-
delay
public LockOptions.ConstantBackOff delay(long delay)
Sets back off delay value.Default is
64
- Parameters:
delay
- - sleep period value. Has to be positive- Returns:
- ConstantBackOffOptions instance
-
getDelay
public long getDelay()
-
-