Interface AsyncStateProcessingOperator
- All Superinterfaces:
AsyncStateProcessing
- All Known Implementing Classes:
AbstractAsyncStateStreamOperator,AbstractAsyncStateStreamOperatorV2,AbstractAsyncStateUdfStreamOperator,AsyncEvictingWindowOperator,AsyncIntervalJoinOperator,AsyncKeyedProcessOperator,AsyncStreamFlatMap,AsyncWindowOperator,StreamGroupedReduceAsyncStateOperator
A more detailed interface based on
AsyncStateProcessing, which gives the essential
methods for an operator to perform async state processing.-
Method Summary
Modifier and TypeMethodDescription<K> voidasyncProcessWithKey(K key, org.apache.flink.util.function.ThrowingRunnable<Exception> processing) Asynchronously process a code with a key provided.Get the declaration manager for user-logic declaring.Get theElementOrderof this operator.voidA 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 Details
-
getElementOrder
ElementOrder getElementOrder()Get theElementOrderof this operator. -
setAsyncKeyedContextElement
<T> void setAsyncKeyedContextElement(StreamRecord<T> record, org.apache.flink.api.java.functions.KeySelector<T, ?> keySelector) throws ExceptionSet 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.
-
getDeclarationManager
DeclarationManager getDeclarationManager()Get the declaration manager for user-logic declaring.
-