Package org.redisson
Class RedissonRedLock
- java.lang.Object
-
- org.redisson.RedissonMultiLock
-
- org.redisson.RedissonRedLock
-
- All Implemented Interfaces:
Lock
,RLock
,RLockAsync
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
forceUnlock, forceUnlockAsync, getHoldCount, getHoldCountAsync, getName, isHeldByCurrentThread, isHeldByThread, isLocked, isLockedAsync, lock, lock, lockAsync, lockAsync, lockAsync, lockAsync, lockInterruptibly, lockInterruptibly, newCondition, remainTimeToLive, remainTimeToLiveAsync, tryLock, tryLock, tryLock, tryLockAsync, tryLockAsync, tryLockAsync, tryLockAsync, tryLockAsync, tryLockAsync, unlockAsync, 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
-
-