Interface BatchedBlockingQueue<T>
-
- All Superinterfaces:
java.util.concurrent.BlockingQueue<T>
,java.util.Collection<T>
,java.lang.Iterable<T>
,java.util.Queue<T>
- All Known Implementing Classes:
BatchedArrayBlockingQueue
,BlockingMpscQueue
public interface BatchedBlockingQueue<T> extends java.util.concurrent.BlockingQueue<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
pollAll(T[] array, long timeout, java.util.concurrent.TimeUnit unit)
Removes multiple items from the queue.void
putAll(T[] a, int offset, int len)
int
takeAll(T[] array)
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
-
-
-
-
Method Detail
-
putAll
void putAll(T[] a, int offset, int len) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
takeAll
int takeAll(T[] array) throws java.lang.InterruptedException
Drain the queue into an array. Wait if there are no items in the queue.- Parameters:
array
-- Returns:
- Throws:
java.lang.InterruptedException
-
pollAll
int pollAll(T[] array, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
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:
java.lang.InterruptedException
-
-