EDU.oswego.cs.dl.util.concurrent

Class 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

PriorityWaitQueue()

Method Summary

protected QueuedSemaphore.WaitQueue.WaitNode
extract()
protected void
insert(QueuedSemaphore.WaitQueue.WaitNode w)

Methods inherited from class EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore.WaitQueue

extract, insert

Field Details

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 Details

PriorityWaitQueue

protected PriorityWaitQueue()

Method Details

extract

protected QueuedSemaphore.WaitQueue.WaitNode extract()
Overrides:
extract in interface QueuedSemaphore.WaitQueue

insert

protected void insert(QueuedSemaphore.WaitQueue.WaitNode w)
Overrides:
insert in interface QueuedSemaphore.WaitQueue