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 time,
TimeUnit unit) |
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
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 boolean isHeldByCurrentThread()
public Condition newCondition()
newCondition
in interface Lock
protected boolean tryAcquire(int acquires)
tryAcquire
in class AbstractQueuedSynchronizer
protected boolean tryRelease(int releases)
tryRelease
in class AbstractQueuedSynchronizer
protected boolean isHeldExclusively()
isHeldExclusively
in class AbstractQueuedSynchronizer
Copyright © 2008-2012 The Netty Project. All Rights Reserved.