|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uwcse.location.ProducerConsumerQueue
A FIFO container for Objects supporting producer-consumer thread access.
| Field Summary | |
protected LinkedList |
m_queue
|
| Constructor Summary | |
ProducerConsumerQueue()
Create a new Object queue. |
|
| Method Summary | |
int |
flush()
Flush all Objects from the queue. |
Object |
get()
Block the current thread and wait for an Object to become available. |
void |
put(Object o)
Add a new Object to the queue. |
int |
size()
Return the current size of the queue. |
void |
throwAway(int cnt)
Throw away the given number of elements from the front of the queue. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected LinkedList m_queue
| Constructor Detail |
public ProducerConsumerQueue()
| Method Detail |
public int flush()
public void throwAway(int cnt)
public int size()
public Object get()
put(Object)public void put(Object o)
get()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||