Package org.redisson
Class RedissonRedLock
- java.lang.Object
-
- org.redisson.RedissonMultiLock
-
- org.redisson.RedissonRedLock
-
- All Implemented Interfaces:
Lock
public class RedissonRedLock extends RedissonMultiLock
RedLock locking algorithm implementation for multiple locks. It manages all locks as one.- Author:
- Nikita Koksharov
- See Also:
- http://redis.io/topics/distlock
-
-
Constructor Summary
Constructors Constructor Description RedissonRedLock(RLock... locks)
Creates instance with multipleRLock
objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
calcLockWaitTime(long remainTime)
protected int
failedLocksLimit()
protected int
minLocksAmount(List<RLock> locks)
void
unlock()
-
Methods inherited from class org.redisson.RedissonMultiLock
checkRemainTimeAsync, lock, lock, lockAsync, lockInterruptibly, lockInterruptibly, newCondition, tryLock, tryLock, tryLock, tryLockAsync, tryLockAsync, unlockAsync, unlockInner, unlockInnerAsync
-
-
-
-
Method Detail
-
failedLocksLimit
protected int failedLocksLimit()
- Overrides:
failedLocksLimit
in classRedissonMultiLock
-
calcLockWaitTime
protected long calcLockWaitTime(long remainTime)
- Overrides:
calcLockWaitTime
in classRedissonMultiLock
-
unlock
public void unlock()
- Specified by:
unlock
in interfaceLock
- Overrides:
unlock
in classRedissonMultiLock
-
-