|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for a work group collection. Used to accomodate switching from various types of collection classes. for example a linked list backed collection in a scalable system expecting massive work loads to an array backed on relying on faster insertions. Uses Objects instead of Runnable in order to accomodate using complex work objects which may include timestamps, priorities, etc.
Method Summary | |
void |
addWork(java.lang.Object work)
Add work to the wrapped collection. |
boolean |
isEmpty()
Check whether work has one or more work items in collection. |
java.lang.Object |
removeWork()
Remove work from the wrapped collection.The collection itself will decide whether this is FIFO, LIFO, and any other necessary ordering. |
int |
size()
Check how many items in work collection. |
Method Detail |
public void addWork(java.lang.Object work)
work
- A simple of complex work object containing payload, timestamps, priority.public java.lang.Object removeWork()
public int size()
public boolean isEmpty()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |