Class PerWindowStateDataViewStore

java.lang.Object
org.apache.flink.table.runtime.dataview.PerWindowStateDataViewStore
All Implemented Interfaces:
StateDataViewStore

@Internal public final class PerWindowStateDataViewStore extends Object implements StateDataViewStore
An implementation of StateDataViewStore for window aggregates which forwards the state registration to an underlying KeyedStateBackend. The created state by this store has the ability to switch window namespaces.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PerWindowStateDataViewStore(org.apache.flink.runtime.state.KeyedStateBackend<?> keyedStateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<?> windowSerializer, org.apache.flink.api.common.functions.RuntimeContext runtimeContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.api.common.functions.RuntimeContext
     
    <N, EE> StateListView<N,EE>
    getStateListView(String stateName, org.apache.flink.api.common.typeutils.TypeSerializer<EE> elementSerializer)
    Creates a state list view.
    <N, EK, EV> StateMapView<N,EK,EV>
    getStateMapView(String stateName, boolean supportNullKey, org.apache.flink.api.common.typeutils.TypeSerializer<EK> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<EV> valueSerializer)
    Creates a state map view.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PerWindowStateDataViewStore

      public PerWindowStateDataViewStore(org.apache.flink.runtime.state.KeyedStateBackend<?> keyedStateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<?> windowSerializer, org.apache.flink.api.common.functions.RuntimeContext runtimeContext)
  • Method Details

    • getStateMapView

      public <N, EK, EV> StateMapView<N,EK,EV> getStateMapView(String stateName, boolean supportNullKey, org.apache.flink.api.common.typeutils.TypeSerializer<EK> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<EV> valueSerializer) throws Exception
      Description copied from interface: StateDataViewStore
      Creates a state map view.
      Specified by:
      getStateMapView in interface StateDataViewStore
      Type Parameters:
      N - Type of the namespace
      EK - External type of the keys in the map state
      EV - External type of the values in the map state
      Parameters:
      stateName - The name of underlying state of the map view
      supportNullKey - Whether the null key should be supported
      keySerializer - The key serializer
      valueSerializer - The value serializer
      Returns:
      a keyed map state
      Throws:
      Exception
    • getStateListView

      public <N, EE> StateListView<N,EE> getStateListView(String stateName, org.apache.flink.api.common.typeutils.TypeSerializer<EE> elementSerializer) throws Exception
      Description copied from interface: StateDataViewStore
      Creates a state list view.
      Specified by:
      getStateListView in interface StateDataViewStore
      Type Parameters:
      N - Type of the namespace
      EE - External type of the elements in the list state
      Parameters:
      stateName - The name of underlying state of the list view
      elementSerializer - The element serializer
      Returns:
      a keyed list state
      Throws:
      Exception
    • getRuntimeContext

      public org.apache.flink.api.common.functions.RuntimeContext getRuntimeContext()
      Specified by:
      getRuntimeContext in interface StateDataViewStore