public class RedissonMultiLock extends Object implements Lock
Constructor and Description |
---|
RedissonMultiLock(RLock... locks)
Creates instance with multiple
RLock objects. |
Modifier and Type | Method and Description |
---|---|
protected int |
failedLocksLimit() |
protected boolean |
isAllLocksAcquired(AtomicReference<RLock> lockedLockHolder,
AtomicReference<Throwable> failed,
Queue<RLock> lockedLocks) |
protected boolean |
isLockFailed(io.netty.util.concurrent.Future<Boolean> future) |
void |
lock() |
void |
lock(long leaseTime,
TimeUnit unit) |
void |
lockInterruptibly() |
void |
lockInterruptibly(long leaseTime,
TimeUnit unit) |
Condition |
newCondition() |
boolean |
tryLock() |
boolean |
tryLock(long waitTime,
long leaseTime,
TimeUnit unit) |
boolean |
tryLock(long waitTime,
TimeUnit unit) |
void |
unlock() |
protected void |
unlockInner(Collection<RLock> locks) |
public void lock(long leaseTime, TimeUnit unit)
public void lockInterruptibly() throws InterruptedException
lockInterruptibly
in interface Lock
InterruptedException
public void lockInterruptibly(long leaseTime, TimeUnit unit) throws InterruptedException
InterruptedException
protected void unlockInner(Collection<RLock> locks)
public boolean tryLock(long waitTime, TimeUnit unit) throws InterruptedException
tryLock
in interface Lock
InterruptedException
protected int failedLocksLimit()
public boolean tryLock(long waitTime, long leaseTime, TimeUnit unit) throws InterruptedException
InterruptedException
public Condition newCondition()
newCondition
in interface Lock
protected boolean isLockFailed(io.netty.util.concurrent.Future<Boolean> future)
protected boolean isAllLocksAcquired(AtomicReference<RLock> lockedLockHolder, AtomicReference<Throwable> failed, Queue<RLock> lockedLocks)
Copyright © 2014–2017 The Redisson Project. All rights reserved.