|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ericsson.otp.erlang.GenericQueue
public class GenericQueue
This class implements a generic FIFO queue. There is no upper bound on the length of the queue, items are linked.
Constructor Summary | |
---|---|
GenericQueue()
Create an empty queue |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
Clear a queue |
java.lang.Object |
get()
Retrieve an object from the head of the queue, or block until one arrives. |
java.lang.Object |
get(long timeout)
Retrieve an object from the head of the queue, blocking until one arrives or until timeout occurs. |
int |
getCount()
|
void |
put(java.lang.Object o)
Add an object to the tail of the queue. |
java.lang.Object |
tryGet()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericQueue()
Method Detail |
---|
public void flush()
public void close()
public void put(java.lang.Object o)
o
- Object to insert in the queuepublic java.lang.Object get()
public java.lang.Object get(long timeout) throws java.lang.InterruptedException
timeout
- Maximum time to block on queue, in ms. Use 0 to poll the
queue.
java.lang.InterruptedException
- if the operation times out.public java.lang.Object tryGet()
public int getCount()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |