devutil
Class QueueMux
java.lang.Object
|
+--devutil.QueueMux
- public class QueueMux
- extends java.lang.Object
Constructor Summary |
QueueMux(Queue[] queues)
Creates the array of queues managed by this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueueMux
public QueueMux(Queue[] queues)
- Creates the array of queues managed by this class.
getQueues
public Queue[] getQueues()
- Gets back the array of queues.
setActiveQueue
public void setActiveQueue(int index)
- Sets the queue on which the operations are performed. Default is
0
, i.e., the first one in the array.
remove
public java.lang.Object remove()
- Blocks if the queue is empty.
add
public void add(java.lang.Object item)
waitUntilEmpty
public void waitUntilEmpty()
- It blocks until the queue is empty.
elements
public java.util.Enumeration elements()
isEmpty
public boolean isEmpty()
size
public int size()
getCurrentActiveQueue
public int getCurrentActiveQueue()
- Returns the index of the queue currently active.