-
Method Summary
int
Removes multiple items from the queue.
void
int
Drain the queue into an array.
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, drainTo, drainTo, offer, offer, poll, put, remainingCapacity, remove, take
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Method Details
-
-
takeAll
Drain the queue into an array.
Wait if there are no items in the queue.
- Parameters:
array -
- Returns:
- Throws:
InterruptedException
-
pollAll
Removes multiple items from the queue.
The method returns when either:
1. At least one item is available
2. The timeout expires
- Parameters:
array -
timeout -
unit -
- Returns:
- Throws:
InterruptedException