|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cork.util.BlockingQueue
A simple thread-safe blocking FIFO queue.
calls to next(), peek(), skip() will block until there are one or more.
The queue is thread-safe so that multiple threads
can simultaneously add and remove objects from it.
Constructor Summary | |
BlockingQueue()
BlockingQueue constructor comment. |
Method Summary | |
void |
add(java.lang.Object object)
Adds and object to the queue. |
void |
clear()
Clears the queue of all object it is holding. |
void |
loop()
Force the pool to allow any listening threads to run their run() loops... |
java.lang.Object |
next()
Returns the next object in the queue, removing it in the process. |
java.lang.Object |
peek()
Returns the next object in the queue without removing it in the process. |
int |
size()
Returns the number of elements currently in the queue. |
void |
skip()
Skips the next object in the queue, removing it in the process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BlockingQueue()
Method Detail |
public void add(java.lang.Object object)
add
in interface Queue
public void loop()
public void clear()
clear
in interface Queue
public java.lang.Object next()
next
in interface Queue
Queue.peek()
public java.lang.Object peek()
peek
in interface Queue
Queue.next()
public int size()
size
in interface Queue
public void skip()
skip
in interface Queue
Queue.next()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |