@Internal public interface StreamElementQueue<OUT>
AsyncWaitOperator
.Modifier and Type | Method and Description |
---|---|
void |
emitCompletedElement(TimestampedCollector<OUT> output)
Emits one completed element from the head of this queue into the given output.
|
boolean |
hasCompletedElements()
Checks if there is at least one completed head element.
|
boolean |
isEmpty()
True if the queue is empty; otherwise false.
|
int |
size()
Return the size of the queue.
|
Optional<ResultFuture<OUT>> |
tryPut(StreamElement streamElement)
Tries to put the given element in the queue.
|
List<StreamElement> |
values()
Returns the collection of
StreamElement currently contained in this queue for
checkpointing. |
Optional<ResultFuture<OUT>> tryPut(StreamElement streamElement)
This method returns a handle to the inserted element that allows to set the result of the computation.
streamElement
- the element to be inserted.Optional.empty()
otherwise.void emitCompletedElement(TimestampedCollector<OUT> output)
Will not emit any element if no element has been completed (check hasCompletedElements()
before entering any critical section).
output
- the output into which to emitboolean hasCompletedElements()
List<StreamElement> values()
StreamElement
currently contained in this queue for
checkpointing.
This includes all non-emitted, completed and non-completed elements.
StreamElement
.boolean isEmpty()
int size()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.