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