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 Details

    • function

      protected final F extends org.apache.flink.api.common.functions.Function function
    • namespaceSerializer

      protected final org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer
  • Constructor Details

    • StateReaderOperator

      protected StateReaderOperator(F function, org.apache.flink.api.common.typeinfo.TypeInformation<KEY> keyType, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer)
  • 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

      protected final org.apache.flink.streaming.api.operators.InternalTimerService<N> getInternalTimerService(String name)
    • open

      public void open() throws Exception
      Throws:
      Exception
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • setCurrentKey

      public final void setCurrentKey(Object key)
      Specified by:
      setCurrentKey in interface org.apache.flink.streaming.api.operators.KeyContext
    • getCurrentKey

      public final Object getCurrentKey()
      Specified by:
      getCurrentKey in interface org.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()