Package org.jboss.netty.util.internal
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 java.util.concurrent.locks.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 java.util.concurrent.locks.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 java.util.concurrent.locks.AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
owner
-
-
Constructor Details
-
NonReentrantLock
public NonReentrantLock()
-
-
Method Details
-
lock
public void lock() -
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
unlock
public void 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
-