|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object devutil.QueueWaiter
Field Summary | |
private Queue[] |
queues
|
Constructor Summary | |
QueueWaiter(Queue[] queues)
Creates the array of queues managed by this class. |
Method Summary | |
void |
add(java.lang.Object item,
int index)
Adds the item to the specified queue. |
boolean |
areAllEmpty()
Return true if all queues are empty, false
otherwise. |
java.util.Enumeration |
elements(int index)
|
Queue[] |
getQueues()
Gets back the array of queues. |
boolean |
isEmpty(int index)
|
java.lang.Object |
remove(int index)
Blocks if the queue is empty. |
int |
size(int index)
|
int |
waitOnElement()
Blocks until an element shows up in any of the queues. |
void |
waitUntilEmpty(int index)
It blocks until the queue is empty. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Queue[] queues
Constructor Detail |
public QueueWaiter(Queue[] queues)
Method Detail |
public Queue[] getQueues()
public java.lang.Object remove(int index)
public void add(java.lang.Object item, int index)
public int waitOnElement()
public boolean areAllEmpty()
true
if all queues are empty, false
otherwise.
public void waitUntilEmpty(int index)
public java.util.Enumeration elements(int index)
public boolean isEmpty(int index)
public int size(int index)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |