T - Type of the result@Internal public abstract class StreamElementQueueEntry<T> extends Object implements AsyncResult
StreamElementQueue. The stream element queue entry stores the
StreamElement for which the stream element queue entry has been instantiated.
Furthermore, it allows to register callbacks for when the queue entry is completed.| Constructor and Description |
|---|
StreamElementQueueEntry(StreamElement streamElement) |
| Modifier and Type | Method and Description |
|---|---|
<T> AsyncCollectionResult<T> |
asResultCollection()
Return this async result as a async result collection.
|
AsyncWatermarkResult |
asWatermark()
Return this async result as a async watermark result.
|
protected abstract CompletableFuture<T> |
getFuture() |
StreamElement |
getStreamElement() |
boolean |
isDone()
True if the stream element queue entry has been completed; otherwise false.
|
boolean |
isResultCollection()
True fi the async result is a collection of output elements; otherwise false.
|
boolean |
isWatermark()
True if the async result is a
Watermark; otherwise false. |
void |
onComplete(java.util.function.Consumer<StreamElementQueueEntry<T>> completeFunction,
Executor executor)
Register the given complete function to be called once this queue entry has been completed.
|
public StreamElementQueueEntry(StreamElement streamElement)
public StreamElement getStreamElement()
public boolean isDone()
public void onComplete(java.util.function.Consumer<StreamElementQueueEntry<T>> completeFunction, Executor executor)
completeFunction - to call when the queue entry has been completedexecutor - to run the complete functionprotected abstract CompletableFuture<T> getFuture()
public final boolean isWatermark()
AsyncResultWatermark; otherwise false.isWatermark in interface AsyncResultWatermark; otherwise false.public final boolean isResultCollection()
AsyncResultisResultCollection in interface AsyncResultpublic final AsyncWatermarkResult asWatermark()
AsyncResultasWatermark in interface AsyncResultAsyncWatermarkResult.public final <T> AsyncCollectionResult<T> asResultCollection()
AsyncResultasResultCollection in interface AsyncResultT - Type of the result collection's elementsAsyncCollectionResult.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.