K
- The key by which state is keyed.public interface KeyedStateBackend<K> extends InternalKeyContext<K>
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Closes the backend and releases all resources.
|
<N,S extends State,T> |
getOrCreateKeyedState(TypeSerializer<N> namespaceSerializer,
StateDescriptor<S,T> stateDescriptor)
Creates or retrieves a keyed state backed by this state backend.
|
<N,S extends State> |
getPartitionedState(N namespace,
TypeSerializer<N> namespaceSerializer,
StateDescriptor<S,?> stateDescriptor)
Creates or retrieves a partitioned state backed by this state backend.
|
void |
setCurrentKey(K newKey)
Sets the current key that is used for partitioned state.
|
getCurrentKey, getCurrentKeyGroupIndex, getKeyGroupRange, getKeySerializer, getNumberOfKeyGroups
void setCurrentKey(K newKey)
newKey
- The new current key.<N,S extends State,T> S getOrCreateKeyedState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,T> stateDescriptor) throws Exception
N
- The type of the namespace.S
- The type of the state.namespaceSerializer
- The serializer used for the namespace type of the statestateDescriptor
- The identifier for the state. This contains name and can create a default state value.Exception
- Exceptions may occur during initialization of the state and should be forwarded.<N,S extends State> S getPartitionedState(N namespace, TypeSerializer<N> namespaceSerializer, StateDescriptor<S,?> stateDescriptor) throws Exception
N
- The type of the namespace.S
- The type of the state.stateDescriptor
- The identifier for the state. This contains name and can create a default state value.Exception
- Exceptions may occur during initialization of the state and should be forwarded.void dispose()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.