|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.samples.asynchbeans.wstrader.tickstream.CurrentQueue
public class CurrentQueue
A queue of the most current objects. All old ones drop off the front when the queue gets full. In addition, when the queue is empty, the deQueue method blocks until there are items added to the queue.
Constructor Summary | |
---|---|
CurrentQueue(int maxSize)
Create a queue that can have maxSize elements in it. |
Method Summary | |
---|---|
void |
close()
Close down the queue and stop all blocking |
java.lang.Object |
deQueue(int timeoutMS)
Remove an item from the front of the queue. |
void |
enQueue(java.lang.Object o)
Add an item to the end of the queue. |
boolean |
isClosed()
|
java.lang.Object |
peekFirst()
Rreturn the first item from the queue. |
java.lang.Object |
peekLast()
Return the last item fromt he queue. |
long |
size()
Return the size of the queue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CurrentQueue(int maxSize)
Method Detail |
---|
public java.lang.Object deQueue(int timeoutMS)
timeoutMS
- The maximum time to wait.public void enQueue(java.lang.Object o)
public java.lang.Object peekFirst()
public java.lang.Object peekLast()
public long size()
public void close()
public boolean isClosed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |