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 long |
calcLockWaitTime(long remainTime) |
protected int |
failedLocksLimit() |
void |
lock() |
void |
lock(long leaseTime,
TimeUnit unit) |
RFuture<Void> |
lockAsync(long leaseTime,
TimeUnit unit) |
RFuture<Void> |
lockAsync(long leaseTime,
TimeUnit unit,
long threadId) |
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) |
RFuture<Boolean> |
tryLockAsync(long waitTime,
long leaseTime,
TimeUnit unit) |
RFuture<Boolean> |
tryLockAsync(long waitTime,
long leaseTime,
TimeUnit unit,
long threadId) |
protected void |
tryLockAsync(long threadId,
long leaseTime,
TimeUnit unit,
long waitTime,
RPromise<Void> result) |
void |
unlock() |
RFuture<Void> |
unlockAsync(long threadId) |
protected void |
unlockInner(Collection<RLock> locks) |
protected RFuture<Void> |
unlockInnerAsync(Collection<RLock> locks,
long threadId) |
public void lock(long leaseTime, TimeUnit unit)
protected void tryLockAsync(long threadId, long leaseTime, TimeUnit unit, long waitTime, RPromise<Void> result)
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)
protected RFuture<Void> unlockInnerAsync(Collection<RLock> locks, long threadId)
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 RFuture<Boolean> tryLockAsync(long waitTime, long leaseTime, TimeUnit unit, long threadId)
protected long calcLockWaitTime(long remainTime)
public Condition newCondition()
newCondition
in interface Lock
Copyright © 2014–2019 The Redisson Project. All rights reserved.