|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectluky.util.BlockingQueue
public class BlockingQueue
BlockingQueue is used to coordinate work between a producer and consumer
threads. The producer adds elements to the queue containing information
The consumer threads remove objects from the queue, if the queue is empty
the thread will block until a new object is added to the queue.
Revision Changes :
Field Summary | |
---|---|
protected List |
queue
|
Constructor Summary | |
---|---|
BlockingQueue()
default constructor |
Method Summary | |
---|---|
void |
add(Object o)
add an element to the queue |
void |
addLast(Object o)
add an element to the queue (equals add, but for left for compatibilty) |
void |
clearAndAdd(Object o)
clear the queue and add an element to the queue |
Object |
get()
Deprecated. will be replaced by remove in the future, get will become peekFirst! |
Object |
getFirst()
Deprecated. will be replaced by remove in the future |
Object |
peekFirst()
Peeks a the first element, but leaves it in the queue |
Object |
remove()
get the first element from the queue (and remove it from the queue) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List queue
Constructor Detail |
---|
public BlockingQueue()
Method Detail |
---|
public void clearAndAdd(Object o)
public void addLast(Object o)
public void add(Object o)
public Object peekFirst()
public Object getFirst()
public Object get()
public Object remove()
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |