org.compass.core.util.backport.java.util.concurrent
Class Semaphore.NonfairSync
java.lang.Object
org.compass.core.util.backport.java.util.concurrent.Semaphore.Sync
org.compass.core.util.backport.java.util.concurrent.Semaphore.NonfairSync
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- Semaphore
static final class Semaphore.NonfairSync
- extends Semaphore.Sync
Nonfair version
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Semaphore.NonfairSync
protected Semaphore.NonfairSync(int initialPermits)
acquireUninterruptibly
public void acquireUninterruptibly(int n)
- Specified by:
acquireUninterruptibly in class Semaphore.Sync
acquire
public void acquire(int n)
throws InterruptedException
- Specified by:
acquire in class Semaphore.Sync
- Throws:
InterruptedException
attempt
public boolean attempt(int n,
long nanos)
throws InterruptedException
- Specified by:
attempt in class Semaphore.Sync
- Throws:
InterruptedException
release
public void release(int n)
- Specified by:
release in class Semaphore.Sync
hasQueuedThreads
public boolean hasQueuedThreads()
- Specified by:
hasQueuedThreads in class Semaphore.Sync
getQueueLength
public int getQueueLength()
- Specified by:
getQueueLength in class Semaphore.Sync
getQueuedThreads
public Collection getQueuedThreads()
- Specified by:
getQueuedThreads in class Semaphore.Sync
Copyright (c) 2004-2006 The Compass Project.