Interface StageRunner.StageMessageDispatcher<E>
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
- StageRunner
A dispatcher for inter-stage communication. It allows for returning a result to a
Sorter via sendResult(MutableObjectIterator)-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.runtime.operators.sort.CircularElement<E>poll(StageRunner.SortStage stage) Retrieves and removes the head of the given stage queue, or returnsnullif the queue is empty.voidsend(StageRunner.SortStage stage, org.apache.flink.runtime.operators.sort.CircularElement<E> element) Sends a message to the given stage.voidsendResult(org.apache.flink.util.MutableObjectIterator<E> result) Sends a result to the correspondingSorter.org.apache.flink.runtime.operators.sort.CircularElement<E>take(StageRunner.SortStage stage) Retrieves and removes the head of the given queue, waiting if necessary until an element becomes available.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
send
void send(StageRunner.SortStage stage, org.apache.flink.runtime.operators.sort.CircularElement<E> element) Sends a message to the given stage. -
take
org.apache.flink.runtime.operators.sort.CircularElement<E> take(StageRunner.SortStage stage) throws InterruptedException Retrieves and removes the head of the given queue, waiting if necessary until an element becomes available.- Returns:
- the head of the queue
- Throws:
InterruptedException
-
poll
Retrieves and removes the head of the given stage queue, or returnsnullif the queue is empty.- Returns:
- the head of the queue, or
nullif the queue is empty
-
sendResult
Sends a result to the correspondingSorter.
-