A thread-safe queue. More...
Public Member Functions | |
void | enqueue (T item) |
Add the item to the end of the queue. More... | |
int | getCount () |
Gets the amount of items in this queue. More... | |
boolean | getIsEmpty () |
Gets true if the queue is empty. More... | |
ManagedConcurrentQueue () | |
Creates a new ConcurrentQueue. More... | |
boolean | tryDequeue (fm.liveswitch.Holder< T > item) |
Removes and returns the item at the front of the queue. More... | |
boolean | tryPeek (fm.liveswitch.Holder< T > item) |
Peeks at the first item in the queue. More... | |
A thread-safe queue.
Creates a new ConcurrentQueue.
void fm.liveswitch.ManagedConcurrentQueue< T >.enqueue | ( | T | item | ) |
Add the item to the end of the queue.
item | The item to add. |
int fm.liveswitch.ManagedConcurrentQueue< T >.getCount | ( | ) |
Gets the amount of items in this queue.
boolean fm.liveswitch.ManagedConcurrentQueue< T >.getIsEmpty | ( | ) |
Gets true if the queue is empty.
boolean fm.liveswitch.ManagedConcurrentQueue< T >.tryDequeue | ( | fm.liveswitch.Holder< T > | item | ) |
Removes and returns the item at the front of the queue.
item | The dequeued item. |
boolean fm.liveswitch.ManagedConcurrentQueue< T >.tryPeek | ( | fm.liveswitch.Holder< T > | item | ) |
Peeks at the first item in the queue.
item | The item at the front of the queue. |