public final class NonReentrantLock extends AbstractQueuedSynchronizer implements Lock
AbstractQueuedSynchronizer.ConditionObject| Constructor and Description |
|---|
NonReentrantLock() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isHeldByCurrentThread() |
protected boolean |
isHeldExclusively() |
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
protected boolean |
tryAcquire(int acquires) |
boolean |
tryLock() |
boolean |
tryLock(long nTime,
TimeUnit eUnit) |
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, tryReleaseSharedgetExclusiveOwnerThread, setExclusiveOwnerThreadpublic void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long nTime,
TimeUnit eUnit)
throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic boolean isHeldByCurrentThread()
@Nonnull public Condition newCondition()
newCondition in interface Lockprotected boolean tryAcquire(int acquires)
tryAcquire in class AbstractQueuedSynchronizerprotected boolean tryRelease(int releases)
tryRelease in class AbstractQueuedSynchronizerprotected boolean isHeldExclusively()
isHeldExclusively in class AbstractQueuedSynchronizerCopyright © 2014–2017 Philip Helger. All rights reserved.