Interface StageRunner.StageMessageDispatcher<E>
-
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
- StageRunner
public static interface StageRunner.StageMessageDispatcher<E> extends AutoCloseable
A dispatcher for inter-stage communication. It allows for returning a result to aSorterviasendResult(MutableObjectIterator)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.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 Detail
-
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
org.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.- Returns:
- the head of the queue, or
nullif the queue is empty
-
-