public class LockableObject
extends AbstractQueuedSynchronizer
A bit simplified lock designed to be inherited by.
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected final boolean |
isHeldExclusively(){@inheritDoc} |
|
public final void |
lock()Acquires the lock, blocking until it becomes available. |
|
protected final boolean |
tryAcquire(int acquires){@inheritDoc} |
|
protected final boolean |
tryRelease(int releases){@inheritDoc} |
|
public final void |
unlock()Releases one hold of the lock. |
| Methods inherited from class | Name |
|---|---|
class AbstractQueuedSynchronizer |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, equals, getClass, getExclusiveQueuedThreads, getFirstQueuedThread, getQueueLength, getQueuedThreads, getSharedQueuedThreads, getWaitQueueLength, getWaitingThreads, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, hashCode, isQueued, notify, notifyAll, owns, release, releaseShared, toString, tryAcquireNanos, tryAcquireSharedNanos, wait, wait, wait |
{@inheritDoc}
Acquires the lock, blocking until it becomes available.
{@inheritDoc}
{@inheritDoc}
Releases one hold of the lock.