Class PerKeyStateDataViewStore
java.lang.Object
org.apache.flink.table.runtime.dataview.PerKeyStateDataViewStore
- All Implemented Interfaces:
StateDataViewStore
Default implementation of
StateDataViewStore that currently forwards state registration
to a RuntimeContext.-
Constructor Summary
ConstructorsConstructorDescriptionPerKeyStateDataViewStore(org.apache.flink.api.common.functions.RuntimeContext ctx) PerKeyStateDataViewStore(org.apache.flink.api.common.functions.RuntimeContext ctx, org.apache.flink.api.common.state.StateTtlConfig stateTtlConfig) -
Method Summary
Modifier and TypeMethodDescriptionorg.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.
-
Constructor Details
-
PerKeyStateDataViewStore
public PerKeyStateDataViewStore(org.apache.flink.api.common.functions.RuntimeContext ctx) -
PerKeyStateDataViewStore
public PerKeyStateDataViewStore(org.apache.flink.api.common.functions.RuntimeContext ctx, org.apache.flink.api.common.state.StateTtlConfig stateTtlConfig)
-
-
Method Details
-
getStateMapView
public <N,EK, StateMapView<N,EV> EK, getStateMapViewEV> (String stateName, boolean supportNullKey, org.apache.flink.api.common.typeutils.TypeSerializer<EK> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<EV> valueSerializer) Description copied from interface:StateDataViewStoreCreates a state map view.- Specified by:
getStateMapViewin interfaceStateDataViewStore- Type Parameters:
N- Type of the namespaceEK- External type of the keys in the map stateEV- External type of the values in the map state- Parameters:
stateName- The name of underlying state of the map viewsupportNullKey- Whether the null key should be supportedkeySerializer- The key serializervalueSerializer- The value serializer- Returns:
- a keyed map state
-
getStateListView
public <N,EE> StateListView<N,EE> getStateListView(String stateName, org.apache.flink.api.common.typeutils.TypeSerializer<EE> elementSerializer) Description copied from interface:StateDataViewStoreCreates a state list view.- Specified by:
getStateListViewin interfaceStateDataViewStore- Type Parameters:
N- Type of the namespaceEE- External type of the elements in the list state- Parameters:
stateName- The name of underlying state of the list viewelementSerializer- The element serializer- Returns:
- a keyed list state
-
getRuntimeContext
public org.apache.flink.api.common.functions.RuntimeContext getRuntimeContext()- Specified by:
getRuntimeContextin interfaceStateDataViewStore
-