Modifier and Type | Class and Description |
---|---|
static class |
RedissonLock.LockValue |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
forceUnlock()
Unlocks lock independently of state
|
int |
getHoldCount()
Number of holds on this lock by the current thread
|
String |
getName() |
boolean |
isHeldByCurrentThread()
Checks if this lock is held by the current thread
|
boolean |
isLocked()
Checks if this lock locked by any thread in Redisson cluster
|
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
void |
subscribe() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
public void subscribe()
public void lockInterruptibly() throws InterruptedException
lockInterruptibly
in interface Lock
InterruptedException
public boolean tryLock(long time, TimeUnit unit) throws InterruptedException
tryLock
in interface Lock
InterruptedException
public Condition newCondition()
newCondition
in interface Lock
public void close()
public void forceUnlock()
RLock
forceUnlock
in interface RLock
public boolean isLocked()
RLock
public boolean isHeldByCurrentThread()
RLock
isHeldByCurrentThread
in interface RLock
true
if held by current thread
otherwise false
public int getHoldCount()
RLock
getHoldCount
in interface RLock
0
if this lock is not held by current threadpublic String getName()
Copyright © 2014. All rights reserved.