public class LockableObject extends AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
Constructor and Description |
---|
LockableObject() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isHeldExclusively() |
void |
lock() |
protected boolean |
tryAcquire(int acquires) |
protected boolean |
tryRelease(int releases) |
void |
unlock() |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared
getExclusiveOwnerThread, setExclusiveOwnerThread
protected final boolean isHeldExclusively()
isHeldExclusively
in class AbstractQueuedSynchronizer
public final void lock()
public final void unlock()
protected final boolean tryAcquire(int acquires)
tryAcquire
in class AbstractQueuedSynchronizer
protected final boolean tryRelease(int releases)
tryRelease
in class AbstractQueuedSynchronizer