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
- Version:
- $Rev: 2115 $, $Date: 2010-02-01 15:21:49 +0900 (Mon, 01 Feb 2010) $
- Author:
- The Netty Project, Trustin Lee
- See Also:
- Serialized Form
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared |
NonReentrantLock
public NonReentrantLock()
lock
public void lock()
- Specified by:
lock
in interface Lock
lockInterruptibly
public void lockInterruptibly()
throws InterruptedException
- Specified by:
lockInterruptibly
in interface Lock
- Throws:
InterruptedException
tryLock
public boolean tryLock()
- Specified by:
tryLock
in interface Lock
tryLock
public boolean tryLock(long time,
TimeUnit unit)
throws InterruptedException
- Specified by:
tryLock
in interface Lock
- Throws:
InterruptedException
unlock
public void unlock()
- Specified by:
unlock
in interface Lock
isHeldByCurrentThread
public boolean isHeldByCurrentThread()
newCondition
public Condition newCondition()
- Specified by:
newCondition
in interface Lock
tryAcquire
protected final boolean tryAcquire(int acquires)
- Overrides:
tryAcquire
in class AbstractQueuedSynchronizer
tryRelease
protected final boolean tryRelease(int releases)
- Overrides:
tryRelease
in class AbstractQueuedSynchronizer
isHeldExclusively
protected final boolean isHeldExclusively()
- Overrides:
isHeldExclusively
in class AbstractQueuedSynchronizer
Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.