public interface ConcurrentQueueConsumer<E>
ConcurrentQueue.consumer()
to obtain an instance and should only use it's own instance to access the queue.Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all elements from the queue.
|
int |
consume(ConsumerFunction<E> consumer,
int batchSize)
As many elements as are visible are delivered to the
Consumer . |
E |
peek()
See
Queue.peek() for contract. |
E |
poll()
See
Queue.poll() for contract. |
E |
weakPeek()
Return the next element from the queue, but don't remove it.
|
E |
weakPoll()
Remove the next element from the queue and return it.
|
int consume(ConsumerFunction<E> consumer, int batchSize)
Consumer
.batchSize
- this is the limit on the batch consume operation, but it is possible that less are availableE poll()
Queue.poll()
for contract.E weakPoll()
E peek()
Queue.peek()
for contract.E weakPeek()
void clear()