|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgalois.runtime.wl.FIFO<T>
T - the type of elements of the worklist@OnlyLeaf public class FIFO<T>
Order elements in first-in-first-out order, i.e., queue order.
LIFO,
ChunkedFIFO,
BoundedFIFO| Constructor Summary | |
|---|---|
FIFO(Maker<T> maker,
boolean needSize)
|
|
| Method Summary | |
|---|---|
void |
add(T item,
ForeachContext<T> ctx)
Adds an element to this worklist. |
void |
addInitial(T item,
ForeachContext<T> ctx)
Adds an element to this worklist. |
void |
finishAddInitial()
Marks when no more elements will be added from the initial elements passed to an executor. |
boolean |
isEmpty()
Checks for emptiness. |
Worklist<T> |
newInstance()
|
T |
poll(ForeachContext<T> ctx)
Removes an element from this worklist. |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FIFO(Maker<T> maker,
boolean needSize)
| Method Detail |
|---|
public Worklist<T> newInstance()
newInstance in interface Worklist<T>
public void add(T item,
ForeachContext<T> ctx)
Worklist
add in interface Worklist<T>item - the item to addctx - an executor context
public void addInitial(T item,
ForeachContext<T> ctx)
Worklist
addInitial in interface Worklist<T>item - the item to addctx - an executor contextpublic boolean isEmpty()
WorklistWorklist.poll(ForeachContext) return
null.
isEmpty in interface Worklist<T>public T poll(ForeachContext<T> ctx)
Worklist
poll in interface Worklist<T>ctx - an executor context
null if there are no more elements in this
worklistpublic int size()
size in interface Worklist<T>public void finishAddInitial()
Worklist
finishAddInitial in interface Worklist<T>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||