Interface AsyncStateProcessingOperator
-
- All Superinterfaces:
AsyncStateProcessing
- All Known Implementing Classes:
AbstractAsyncStateStreamOperator,AbstractAsyncStateStreamOperatorV2,AbstractAsyncStateUdfStreamOperator
@Internal public interface AsyncStateProcessingOperator extends AsyncStateProcessing
A more detailed interface based onAsyncStateProcessing, which gives the essential methods for an operator to perform async state processing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K> voidasyncProcessWithKey(K key, org.apache.flink.util.function.ThrowingRunnable<Exception> processing)Asynchronously process a code with a key provided.ElementOrdergetElementOrder()Get theElementOrderof this operator.voidpostProcessElement()A callback that will be triggered after an element finishesprocessElement.voidpreserveRecordOrderAndProcess(org.apache.flink.util.function.ThrowingRunnable<Exception> processing)Check the order of same-key record, and then process the record.<T> voidsetAsyncKeyedContextElement(StreamRecord<T> record, org.apache.flink.api.java.functions.KeySelector<T,?> keySelector)Set key context for async state processing.-
Methods inherited from interface org.apache.flink.streaming.runtime.operators.asyncprocessing.AsyncStateProcessing
getRecordProcessor, isAsyncStateProcessingEnabled
-
-
-
-
Method Detail
-
getElementOrder
ElementOrder getElementOrder()
Get theElementOrderof this operator.
-
setAsyncKeyedContextElement
<T> void setAsyncKeyedContextElement(StreamRecord<T> record, org.apache.flink.api.java.functions.KeySelector<T,?> keySelector) throws Exception
Set key context for async state processing.- Type Parameters:
T- the type of the record.- Parameters:
record- the record.keySelector- the key selector to select a key from record.- Throws:
Exception
-
postProcessElement
void postProcessElement()
A callback that will be triggered after an element finishesprocessElement.
-
preserveRecordOrderAndProcess
void preserveRecordOrderAndProcess(org.apache.flink.util.function.ThrowingRunnable<Exception> processing)
Check the order of same-key record, and then process the record. Mainly used when thegetElementOrder()returnsElementOrder.RECORD_ORDER.- Parameters:
processing- the record processing logic.
-
asyncProcessWithKey
<K> void asyncProcessWithKey(K key, org.apache.flink.util.function.ThrowingRunnable<Exception> processing)Asynchronously process a code with a key provided.- Type Parameters:
K- the type of key.- Parameters:
key- the specified key.processing- the process logic.
-
-