public interface MonitorQueue
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Get the queue capacity.
|
void |
clear()
Set all elements free.
|
MonitorElement |
getFree()
Get the next free element.
|
int |
getNumberFree()
Get the number of free queue elements.
|
MonitorElement |
getUsed()
Get the oldest used element.
|
void |
releaseUsed(MonitorElement monitorElement)
Release the getUsed structure.
|
void |
setUsed(MonitorElement monitorElement)
Set the getFree element to used;
|
void clear()
int getNumberFree()
int capacity()
MonitorElement getFree()
void setUsed(MonitorElement monitorElement)
monitorElement
- The monitorElement, which must be the
element returned by the oldest call to getFree that was not setUsed.IllegalStateException
- if monitorElement is not the element
returned by the oldest call to getFree that was not setUsed.MonitorElement getUsed()
void releaseUsed(MonitorElement monitorElement)
monitorElement
- The monitorElement, which must be the
element returned by the most recent call to getUsed.IllegalStateException
- if monitorElement is not the element
returned by the most recent call to getUsed.Copyright © 2014. All Rights Reserved.