Class NonReentrantLock
java.lang.Object
java.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
org.jboss.netty.util.internal.NonReentrantLock
- All Implemented Interfaces:
Serializable, Lock
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleanvoidlock()voidprotected booleantryAcquire(int acquires) booleantryLock()booleanprotected booleantryRelease(int releases) voidunlock()Methods inherited from class AbstractQueuedSynchronizer
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, tryReleaseSharedMethods inherited from class AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
owner
-
-
Constructor Details
-
NonReentrantLock
public NonReentrantLock()
-
-
Method Details
-
lock
-
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
-
tryLock
- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
unlock
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread() -
newCondition
- Specified by:
newConditionin interfaceLock
-
tryAcquire
protected boolean tryAcquire(int acquires) - Overrides:
tryAcquirein classAbstractQueuedSynchronizer
-
tryRelease
protected boolean tryRelease(int releases) - Overrides:
tryReleasein classAbstractQueuedSynchronizer
-
isHeldExclusively
protected boolean isHeldExclusively()- Overrides:
isHeldExclusivelyin classAbstractQueuedSynchronizer
-