|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.locks.AbstractQueuedSynchronizer
java.util.concurrent.Semaphore.Sync
java.util.concurrent.Semaphore.FairSync
static final class Semaphore.FairSync
Fair version
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer |
|---|
AbstractQueuedSynchronizer.ConditionObject |
| Constructor Summary | |
|---|---|
Semaphore.FairSync(int permits)
|
|
| Method Summary | |
|---|---|
protected int |
tryAcquireShared(int acquires)
Attempts to acquire in shared mode. |
| Methods inherited from class java.util.concurrent.Semaphore.Sync |
|---|
drainPermits, getPermits, nonfairTryAcquireShared, reducePermits, tryReleaseShared |
| 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, isHeldExclusively, isQueued, owns, release, releaseShared, setState, toString, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
Semaphore.FairSync(int permits)
| Method Detail |
|---|
protected int tryAcquireShared(int acquires)
AbstractQueuedSynchronizerThis method is always invoked by the thread performing acquire. If this method reports failure, the acquire method may queue the thread, if it is not already queued, until it is signalled by a release from some other thread.
The default implementation throws UnsupportedOperationException
tryAcquireShared in class AbstractQueuedSynchronizeracquires - the acquire argument. This value
is always the one passed to an acquire method,
or is the value saved on entry to a condition wait.
The value is otherwise uninterpreted and can represent anything
you like.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||