EDU.oswego.cs.dl.util.concurrent
Class PrioritySemaphore.PriorityWaitQueue

java.lang.Object
  extended by EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore.WaitQueue
      extended by EDU.oswego.cs.dl.util.concurrent.PrioritySemaphore.PriorityWaitQueue
Enclosing class:
PrioritySemaphore

protected static class PrioritySemaphore.PriorityWaitQueue
extends QueuedSemaphore.WaitQueue


Nested Class Summary
 
Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore.WaitQueue
QueuedSemaphore.WaitQueue.WaitNode
 
Field Summary
protected  FIFOSemaphore.FIFOWaitQueue[] cells_
          An array of wait queues, one per priority
protected  int maxIndex_
          The index of the highest priority cell that may need to be signalled, or -1 if none.
 
Constructor Summary
protected PrioritySemaphore.PriorityWaitQueue()
           
 
Method Summary
protected  QueuedSemaphore.WaitQueue.WaitNode extract()
           
protected  void insert(QueuedSemaphore.WaitQueue.WaitNode w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cells_

protected final FIFOSemaphore.FIFOWaitQueue[] cells_
An array of wait queues, one per priority


maxIndex_

protected int maxIndex_
The index of the highest priority cell that may need to be signalled, or -1 if none. Used to minimize array traversal.

Constructor Detail

PrioritySemaphore.PriorityWaitQueue

protected PrioritySemaphore.PriorityWaitQueue()
Method Detail

insert

protected void insert(QueuedSemaphore.WaitQueue.WaitNode w)
Specified by:
insert in class QueuedSemaphore.WaitQueue

extract

protected QueuedSemaphore.WaitQueue.WaitNode extract()
Specified by:
extract in class QueuedSemaphore.WaitQueue