Class StateReaderOperator<F extends org.apache.flink.api.common.functions.Function,KEY,N,OUT>
java.lang.Object
org.apache.flink.state.api.input.operator.StateReaderOperator<F,KEY,N,OUT>
- Type Parameters:
F- The type of the user function.KEY- The key type.N- The namespace type.OUT- The output type.
- All Implemented Interfaces:
Serializable,AutoCloseable,org.apache.flink.streaming.api.operators.KeyContext
- Direct Known Subclasses:
KeyedStateReaderOperator,WindowReaderOperator
@Internal
public abstract class StateReaderOperator<F extends org.apache.flink.api.common.functions.Function,KEY,N,OUT>
extends Object
implements org.apache.flink.streaming.api.operators.KeyContext, AutoCloseable, Serializable
Base class for executing functions that read keyed state.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStateReaderOperator(F function, org.apache.flink.api.common.typeinfo.TypeInformation<KEY> keyType, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final Objectprotected final org.apache.flink.streaming.api.operators.InternalTimerService<N>final org.apache.flink.runtime.state.KeyedStateBackend<KEY>final org.apache.flink.api.common.typeinfo.TypeInformation<KEY>final org.apache.flink.api.common.functions.SerializerFactoryvoidopen()abstract voidprocessElement(KEY key, N namespace, org.apache.flink.util.Collector<OUT> out) final voidsetCurrentKey(Object key) final voidsetup(org.apache.flink.api.common.functions.SerializerFactory serializerFactory, org.apache.flink.runtime.state.KeyedStateBackend<KEY> keyKeyedStateBackend, org.apache.flink.streaming.api.operators.InternalTimeServiceManager<KEY> timerServiceManager, SavepointRuntimeContext ctx)
-
Field Details
-
function
-
namespaceSerializer
-
-
Constructor Details
-
StateReaderOperator
-
-
Method Details
-
processElement
public abstract void processElement(KEY key, N namespace, org.apache.flink.util.Collector<OUT> out) throws Exception - Throws:
Exception
-
getKeysAndNamespaces
public abstract org.apache.flink.util.CloseableIterator<org.apache.flink.api.java.tuple.Tuple2<KEY,N>> getKeysAndNamespaces(SavepointRuntimeContext ctx) throws Exception - Throws:
Exception
-
setup
public final void setup(org.apache.flink.api.common.functions.SerializerFactory serializerFactory, org.apache.flink.runtime.state.KeyedStateBackend<KEY> keyKeyedStateBackend, org.apache.flink.streaming.api.operators.InternalTimeServiceManager<KEY> timerServiceManager, SavepointRuntimeContext ctx) -
getInternalTimerService
-
open
- Throws:
Exception
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
setCurrentKey
- Specified by:
setCurrentKeyin interfaceorg.apache.flink.streaming.api.operators.KeyContext
-
getCurrentKey
- Specified by:
getCurrentKeyin interfaceorg.apache.flink.streaming.api.operators.KeyContext
-
getKeyedStateBackend
-
getKeyType
-
getSerializerFactory
public final org.apache.flink.api.common.functions.SerializerFactory getSerializerFactory()
-