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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Ffunctionprotected org.apache.flink.api.common.typeutils.TypeSerializer<N>namespaceSerializer
-
Constructor Summary
Constructors Modifier Constructor Description protectedStateReaderOperator(F function, org.apache.flink.api.common.typeinfo.TypeInformation<KEY> keyType, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()ObjectgetCurrentKey()protected org.apache.flink.streaming.api.operators.InternalTimerService<N>getInternalTimerService(String name)org.apache.flink.runtime.state.KeyedStateBackend<KEY>getKeyedStateBackend()abstract org.apache.flink.util.CloseableIterator<org.apache.flink.api.java.tuple.Tuple2<KEY,N>>getKeysAndNamespaces(SavepointRuntimeContext ctx)org.apache.flink.api.common.typeinfo.TypeInformation<KEY>getKeyType()org.apache.flink.api.common.functions.SerializerFactorygetSerializerFactory()voidopen()abstract voidprocessElement(KEY key, N namespace, org.apache.flink.util.Collector<OUT> out)voidsetCurrentKey(Object key)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)
-
-
-
Method Detail
-
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
protected final org.apache.flink.streaming.api.operators.InternalTimerService<N> getInternalTimerService(String name)
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
setCurrentKey
public final void setCurrentKey(Object key)
- Specified by:
setCurrentKeyin interfaceorg.apache.flink.streaming.api.operators.KeyContext
-
getCurrentKey
public final Object getCurrentKey()
- Specified by:
getCurrentKeyin interfaceorg.apache.flink.streaming.api.operators.KeyContext
-
getKeyedStateBackend
public final org.apache.flink.runtime.state.KeyedStateBackend<KEY> getKeyedStateBackend()
-
getKeyType
public final org.apache.flink.api.common.typeinfo.TypeInformation<KEY> getKeyType()
-
getSerializerFactory
public final org.apache.flink.api.common.functions.SerializerFactory getSerializerFactory()
-
-