|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmaslab.telemetry.MTQueue<T>
public class MTQueue<T>
A simple queue useful for transferring data from one thread to another in a safe way.
| Constructor Summary | |
|---|---|
MTQueue()
Create a new queue. |
|
| Method Summary | |
|---|---|
T |
getBlock()
Get the oldest object in the queue, waiting until an object is available if necessary. |
java.util.List<T> |
getList()
Return a list-view of this queue. |
T |
getPoll()
Get the oldest object in the queue, returning null if the queue is empty. |
void |
put(T o)
Put a new object in the end of the queue. |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MTQueue()
| Method Detail |
|---|
public void put(T o)
o - The object to enqueue.public T getBlock()
public T getPoll()
public java.util.List<T> getList()
public int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||