EDU.oswego.cs.dl.util.concurrent
Class PrioritySemaphore.PriorityWaitQueue
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore.WaitQueue
EDU.oswego.cs.dl.util.concurrent.PrioritySemaphore.PriorityWaitQueue
- Enclosing class:
- PrioritySemaphore
- protected static class PrioritySemaphore.PriorityWaitQueue
- extends QueuedSemaphore.WaitQueue
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
PrioritySemaphore.PriorityWaitQueue
protected PrioritySemaphore.PriorityWaitQueue()
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