|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.util.Queue
public class Queue
A multithreaded queue used for implementing producer-consumer style threading patterns. Multiple threads can wait for runnable objects being added to the queue while other threads add to the queue.
Constructor Summary | |
---|---|
Queue()
|
Method Summary | |
---|---|
void |
add(java.lang.Object runnable)
adds a runnable object to the end of the queue. |
java.lang.Object |
remove()
Removes the first runnable object from the queue, blocking until one is available. |
java.lang.Object |
removeNoWait()
Removes the first runnable object from the queue without blocking. |
int |
size()
Returns the current number of runnable objects in the queue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Queue()
Method Detail |
---|
public int size()
public void add(java.lang.Object runnable)
public java.lang.Object remove()
public java.lang.Object removeNoWait()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |