@Internal
public interface StreamElementQueue
AsyncWaitOperator.| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
True if the queue is empty; otherwise false.
|
AsyncResult |
peekBlockingly()
Peek at the head of the queue and return the first completed
AsyncResult. |
AsyncResult |
poll()
Poll the first completed
AsyncResult from the head of this queue. |
<T> void |
put(StreamElementQueueEntry<T> streamElementQueueEntry)
Put the given element in the queue if capacity is left.
|
int |
size()
Return the size of the queue.
|
<T> boolean |
tryPut(StreamElementQueueEntry<T> streamElementQueueEntry)
Try to put the given element in the queue.
|
Collection<StreamElementQueueEntry<?>> |
values()
Return the collection of
StreamElementQueueEntry currently contained in this queue. |
<T> void put(StreamElementQueueEntry<T> streamElementQueueEntry) throws InterruptedException
T - Type of the entries future valuestreamElementQueueEntry - to be put into the queueInterruptedException - if the calling thread has been interrupted while waiting to
insert the given element<T> boolean tryPut(StreamElementQueueEntry<T> streamElementQueueEntry) throws InterruptedException
T - Type of the entries future valuestreamElementQueueEntry - to be insertedInterruptedException - if the calling thread has been interrupted while waiting to
insert the given elementAsyncResult peekBlockingly() throws InterruptedException
AsyncResult. This
operation is a blocking operation and only returns once a completed async result has been
found.AsyncResultInterruptedException - if the current thread has been interrupted while waiting for a
completed async result.AsyncResult poll() throws InterruptedException
AsyncResult from the head of this queue. This operation is
blocking and only returns once a completed async result has been found.AsyncResult which has been removed from the queueInterruptedException - if the current thread has been interrupted while waiting for a
completed async result.Collection<StreamElementQueueEntry<?>> values() throws InterruptedException
StreamElementQueueEntry currently contained in this queue.StreamElementQueueEntry.InterruptedException - if the current thread has been interrupted while retrieving the
stream element queue entries of this queue.boolean isEmpty()
int size()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.