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
public final class NonReentrantLock extends AbstractQueuedSynchronizer implements Lock
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
-
-
Constructor Summary
Constructors Constructor Description NonReentrantLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisHeldByCurrentThread()protected booleanisHeldExclusively()voidlock()voidlockInterruptibly()ConditionnewCondition()protected booleantryAcquire(int acquires)booleantryLock()booleantryLock(long time, TimeUnit unit)protected 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, tryReleaseShared
-
Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
-
-
-
-
Method Detail
-
lockInterruptibly
public void lockInterruptibly() throws InterruptedException- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock(long time, TimeUnit unit) throws InterruptedException- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread()
-
newCondition
public Condition 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
-
-