@Internal public final class PerWindowStateDataViewStore extends Object implements StateDataViewStore
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 and Description |
---|
PerWindowStateDataViewStore(KeyedStateBackend<?> keyedStateBackend,
TypeSerializer<?> windowSerializer,
RuntimeContext runtimeContext) |
Modifier and Type | Method and 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.
|
public PerWindowStateDataViewStore(KeyedStateBackend<?> keyedStateBackend, TypeSerializer<?> windowSerializer, RuntimeContext runtimeContext)
public <N,EK,EV> StateMapView<N,EK,EV> getStateMapView(String stateName, boolean supportNullKey, TypeSerializer<EK> keySerializer, TypeSerializer<EV> valueSerializer) throws Exception
StateDataViewStore
getStateMapView
in interface StateDataViewStore
N
- Type of the namespaceEK
- External type of the keys in the map stateEV
- External type of the values in the map statestateName
- The name of underlying state of the map viewsupportNullKey
- Whether the null key should be supportedkeySerializer
- The key serializervalueSerializer
- The value serializerException
public <N,EE> StateListView<N,EE> getStateListView(String stateName, TypeSerializer<EE> elementSerializer) throws Exception
StateDataViewStore
getStateListView
in interface StateDataViewStore
N
- Type of the namespaceEE
- External type of the elements in the list statestateName
- The name of underlying state of the list viewelementSerializer
- The element serializerException
public RuntimeContext getRuntimeContext()
getRuntimeContext
in interface StateDataViewStore
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.