Class QueryableValueStateOperator<IN>

java.lang.Object
org.apache.flink.streaming.api.operators.AbstractStreamOperator<IN>
org.apache.flink.streaming.api.functions.query.QueryableValueStateOperator<IN>
Type Parameters:
IN - Input type
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.state.CheckpointListener, Input<IN>, KeyContext, KeyContextHandler, OneInputStreamOperator<IN,IN>, StreamOperator<IN>, StreamOperatorStateHandler.CheckpointedStreamOperator, YieldingOperator<IN>

@Internal public class QueryableValueStateOperator<IN> extends AbstractStreamOperator<IN>
Internal operator handling queryable ValueState instances.
See Also:
  • Field Details

    • stateDescriptor

      protected final org.apache.flink.api.common.state.StateDescriptor<? extends org.apache.flink.api.common.state.ValueState<IN>,?> stateDescriptor
      State descriptor for the queryable state instance.
    • registrationName

      protected final String registrationName
      Name under which the queryable state is registered.
    • state

      protected transient org.apache.flink.api.common.state.ValueState<IN> state
      The state instance created on open. This is updated by the subclasses of this class, because the state update interface depends on the state type (e.g. AppendingState#add(IN) vs. ValueState#update(OUT)).
  • Constructor Details

    • QueryableValueStateOperator

      public QueryableValueStateOperator(String registrationName, org.apache.flink.api.common.state.StateDescriptor<org.apache.flink.api.common.state.ValueState<IN>,IN> stateDescriptor)
  • Method Details

    • processElement

      public void processElement(StreamRecord<IN> element) throws Exception
      Description copied from interface: Input
      Processes one element that arrived on this input of the MultipleInputStreamOperator. This method is guaranteed to not be called concurrently with other methods of the operator.
      Throws:
      Exception
    • open

      public void open() throws Exception
      Description copied from class: AbstractStreamOperator
      This method is called immediately before any elements are processed, it should contain the operator's initialization logic, e.g. state initialization.

      The default implementation does nothing.

      Specified by:
      open in interface StreamOperator<S extends org.apache.flink.api.common.state.State>
      Overrides:
      open in class AbstractStreamOperator<IN>
      Throws:
      Exception - An exception in this method causes the operator to fail.