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()
AsyncResult
Watermark
; otherwise false.isWatermark
in interface AsyncResult
Watermark
; otherwise false.public final boolean isResultCollection()
AsyncResult
isResultCollection
in interface AsyncResult
public final AsyncWatermarkResult asWatermark()
AsyncResult
asWatermark
in interface AsyncResult
AsyncWatermarkResult
.public final <T> AsyncCollectionResult<T> asResultCollection()
AsyncResult
asResultCollection
in interface AsyncResult
T
- Type of the result collection's elementsAsyncCollectionResult
.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.