org.apache.avalon.excalibur.concurrent
Class DjikstraSemaphore

java.lang.Object
  |
  +--org.apache.avalon.excalibur.concurrent.DijkstraSemaphore
        |
        +--org.apache.avalon.excalibur.concurrent.DjikstraSemaphore

Deprecated. Replaced by by DijkstraSemaphore.

public class DjikstraSemaphore
extends 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.

Since:
4.0
Version:
CVS $Revision: 1.4 $ $Date: 2001/12/11 09:53:27 $
Author:
Karthik Rangaraju

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

DjikstraSemaphore

public DjikstraSemaphore(int maxCount)
Deprecated. 
Creates a Djikstra semaphore with the specified max count and initial count set to the max count (all resources released)
Parameters:
pMaxCount - is the max semaphores that can be acquired

DjikstraSemaphore

public 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.
Parameters:
pMaxCount - is the max semaphores that can be acquired


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.