|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.excalibur.concurrent.DijkstraSemaphore | +--org.apache.avalon.excalibur.concurrent.DjikstraSemaphore
DijkstraSemaphore
.
Also called counting semaphores, Djikstra semaphores are used to control access to a set of resources. A Djikstra semaphore has a count associated with it and each acquire() call reduces the count. A thread that tries to acquire() a Djikstra semaphore with a zero count blocks until someone else calls release() thus increasing the count.
Constructor Summary | |
DjikstraSemaphore(int maxCount)
Deprecated. Creates a Djikstra semaphore with the specified max count and initial count set to the max count (all resources released) |
|
DjikstraSemaphore(int maxCount,
int initialCount)
Deprecated. Creates a Djikstra semaphore with the specified max count and an initial count of acquire() operations that are assumed to have already been performed. |
Methods inherited from class org.apache.avalon.excalibur.concurrent.DijkstraSemaphore |
acquire, acquireAll, release, release, releaseAll, starvationCheck, tryAcquire |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DjikstraSemaphore(int maxCount)
pMaxCount
- is the max semaphores that can be acquiredpublic DjikstraSemaphore(int maxCount, int initialCount)
pMaxCount
- is the max semaphores that can be acquired
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |