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 TypeMethodDescriptionboolean
protected boolean
void
lock()
void
protected boolean
tryAcquire
(int acquires) boolean
tryLock()
boolean
protected boolean
tryRelease
(int releases) void
unlock()
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
-
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:
lockInterruptibly
in interfaceLock
- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLock
in interfaceLock
- Throws:
InterruptedException
-
unlock
public void unlock() -
isHeldByCurrentThread
public boolean isHeldByCurrentThread() -
newCondition
- Specified by:
newCondition
in interfaceLock
-
tryAcquire
protected boolean tryAcquire(int acquires) - Overrides:
tryAcquire
in classAbstractQueuedSynchronizer
-
tryRelease
protected boolean tryRelease(int releases) - Overrides:
tryRelease
in classAbstractQueuedSynchronizer
-
isHeldExclusively
protected boolean isHeldExclusively()- Overrides:
isHeldExclusively
in classAbstractQueuedSynchronizer
-