Interface AsyncStateProcessing
-
- All Known Subinterfaces:
AsyncStateProcessingOperator
- All Known Implementing Classes:
AbstractAsyncStateStreamingJoinOperator
,AbstractAsyncStateStreamOperator
,AbstractAsyncStateStreamOperatorV2
,AbstractAsyncStateUdfStreamOperator
,AbstractInput
,AsyncStateStreamingJoinOperator
,FirstInputOfTwoInput
,OneInput
,SecondInputOfTwoInput
@Internal public interface AsyncStateProcessing
This class defines the basic interfaces to process a state in operator/input layer.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> ThrowingConsumer<StreamRecord<T>,Exception>
getRecordProcessor(int inputId)
Get the record processor that could process record from input, which is the only entry for async processing.boolean
isAsyncStateProcessingEnabled()
Get if the async state processing is enabled for this input/operator.static <T> ThrowingConsumer<StreamRecord<T>,Exception>
makeRecordProcessor(AsyncStateProcessingOperator asyncOperator, KeySelector<T,?> keySelector, ThrowingConsumer<StreamRecord<T>,Exception> processor)
Static method helper to make a record processor with given infos.
-
-
-
Method Detail
-
isAsyncStateProcessingEnabled
boolean isAsyncStateProcessingEnabled()
Get if the async state processing is enabled for this input/operator.- Returns:
- ture if async state processing is enabled.
-
getRecordProcessor
<T> ThrowingConsumer<StreamRecord<T>,Exception> getRecordProcessor(int inputId)
Get the record processor that could process record from input, which is the only entry for async processing.- Parameters:
inputId
- the input identifier, start from 1. Borrow the design fromorg.apache.flink.streaming.api.operators.AbstractInput#inputId
. This is only relevant if there is multiple inputs for the instance.
-
makeRecordProcessor
static <T> ThrowingConsumer<StreamRecord<T>,Exception> makeRecordProcessor(AsyncStateProcessingOperator asyncOperator, KeySelector<T,?> keySelector, ThrowingConsumer<StreamRecord<T>,Exception> processor)
Static method helper to make a record processor with given infos.- Parameters:
asyncOperator
- the operator that can process state asynchronously.keySelector
- the key selector.processor
- the record processing logic.- Returns:
- the built record processor that can returned by
getRecordProcessor(int)
.
-
-