Class PerKeyStateDataViewStore
- java.lang.Object
-
- org.apache.flink.table.runtime.dataview.PerKeyStateDataViewStore
-
- All Implemented Interfaces:
StateDataViewStore
@Internal public final class PerKeyStateDataViewStore extends Object implements StateDataViewStore
Default implementation ofStateDataViewStore
that currently forwards state registration to aRuntimeContext
.
-
-
Constructor Summary
Constructors Constructor Description PerKeyStateDataViewStore(RuntimeContext ctx)
PerKeyStateDataViewStore(RuntimeContext ctx, StateTtlConfig stateTtlConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeContext
getRuntimeContext()
<N,EE>
StateListView<N,EE>getStateListView(String stateName, TypeSerializer<EE> elementSerializer)
Creates a state list view.<N,EK,EV>
StateMapView<N,EK,EV>getStateMapView(String stateName, boolean supportNullKey, TypeSerializer<EK> keySerializer, TypeSerializer<EV> valueSerializer)
Creates a state map view.
-
-
-
Constructor Detail
-
PerKeyStateDataViewStore
public PerKeyStateDataViewStore(RuntimeContext ctx)
-
PerKeyStateDataViewStore
public PerKeyStateDataViewStore(RuntimeContext ctx, StateTtlConfig stateTtlConfig)
-
-
Method Detail
-
getStateMapView
public <N,EK,EV> StateMapView<N,EK,EV> getStateMapView(String stateName, boolean supportNullKey, TypeSerializer<EK> keySerializer, TypeSerializer<EV> valueSerializer)
Description copied from interface:StateDataViewStore
Creates a state map view.- Specified by:
getStateMapView
in 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, TypeSerializer<EE> elementSerializer)
Description copied from interface:StateDataViewStore
Creates a state list view.- Specified by:
getStateListView
in 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 RuntimeContext getRuntimeContext()
- Specified by:
getRuntimeContext
in interfaceStateDataViewStore
-
-