Package 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore.WaitQueue
QueuedSemaphore.WaitQueue.WaitNode
-
-
Field Summary
Fields Modifier and Type Field Description protected FIFOSemaphore.FIFOWaitQueue[]
cells_
An array of wait queues, one per priorityprotected int
maxIndex_
The index of the highest priority cell that may need to be signalled, or -1 if none.
-
Constructor Summary
Constructors Modifier Constructor Description protected
PriorityWaitQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QueuedSemaphore.WaitQueue.WaitNode
extract()
protected void
insert(QueuedSemaphore.WaitQueue.WaitNode w)
-
-
-
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.
-
-
Method Detail
-
insert
protected void insert(QueuedSemaphore.WaitQueue.WaitNode w)
- Specified by:
insert
in classQueuedSemaphore.WaitQueue
-
extract
protected QueuedSemaphore.WaitQueue.WaitNode extract()
- Specified by:
extract
in classQueuedSemaphore.WaitQueue
-
-