Interface KeyContextHandler

All Known Implementing Classes:
AbstractAsyncStateStreamOperator, AbstractAsyncStateUdfStreamOperator, AbstractStreamOperator, AbstractUdfStreamOperator, AsyncEvictingWindowOperator, AsyncIntervalJoinOperator, AsyncKeyedProcessOperator, AsyncStreamFlatMap, AsyncWindowOperator, BatchCoBroadcastWithKeyedOperator, BatchCoBroadcastWithNonKeyedOperator, BatchGroupedReduceOperator, CacheTransformationTranslator.IdentityStreamOperator, CacheTransformationTranslator.NoOpStreamOperator, CoBroadcastWithKeyedOperator, CoBroadcastWithNonKeyedOperator, CollectSinkOperator, ContinuousFileReaderOperator, CoProcessOperator, CoStreamFlatMap, CoStreamMap, EvictingWindowOperator, GlobalCommitterOperator, IntervalJoinOperator, KeyedCoProcessOperator, KeyedProcessOperator, KeyedSortPartitionOperator, LegacyKeyedCoProcessOperator, LegacyKeyedProcessOperator, MapPartitionOperator, PartitionAggregateOperator, PartitionReduceOperator, ProcessOperator, QueryableAppendingStateOperator, QueryableValueStateOperator, SortPartitionOperator, SourceOperator, StreamFilter, StreamFlatMap, StreamGroupedReduceAsyncStateOperator, StreamGroupedReduceOperator, StreamMap, StreamProject, StreamSink, StreamSource, TimestampsAndWatermarksOperator, WindowOperator

@Internal public interface KeyContextHandler
This interface is used to optimize the calls of Input.setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>), StreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>) and StreamOperator.setKeyContextElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>). We can decide(at the inputs/operators initialization) whether to omit the calls of "setKeyContextElement" according to the return value of hasKeyContext(). In this way, we can omit the calls of "setKeyContextElement" for inputs/operators that don't have "KeyContext".

All inputs/operators that want to optimize the "setKeyContextElement" calls should implement this interface.