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 multipleRLockobjects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longcalcLockWaitTime(long remainTime)protected intfailedLocksLimit()protected intminLocksAmount(List<RLock> locks)voidunlock()-
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:
failedLocksLimitin classRedissonMultiLock
-
calcLockWaitTime
protected long calcLockWaitTime(long remainTime)
- Overrides:
calcLockWaitTimein classRedissonMultiLock
-
unlock
public void unlock()
- Specified by:
unlockin interfaceLock- Overrides:
unlockin classRedissonMultiLock
-
-