class BlockingQueueExtensions extends Object
Extensions to the BlockingQueue interface.
| Constructor and description |
|---|
BlockingQueueExtensions() |
| Type Params | Return Type | Name and description |
|---|---|---|
<E> |
static List<E> |
drain(BlockingQueue<E> self)Drains all available elements to a new list which is returned. |
<E> |
static List<E> |
drain(BlockingQueue<E> self, int maxElements)Drain at most the given number of elements into a new list which is returned. |
Drains all available elements to a new list which is returned. @return
Drain at most the given number of elements into a new list which is returned. @return