Serializable
AbstractConcurrentMapBase.Segment
, LazyReference
public class LockableObject extends AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
Constructor | Description |
---|---|
LockableObject() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
isHeldExclusively() |
|
void |
lock() |
|
protected boolean |
tryAcquire(int acquires) |
|
protected boolean |
tryRelease(int releases) |
|
void |
unlock() |
getExclusiveOwnerThread, setExclusiveOwnerThread
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
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