K - The type of the key.N - The type of the namespace.S - The type of State this KvState holds.SD - The type of the StateDescriptor for state S.Backend - The type of AbstractStateBackend that manages this KvState.public interface KvState<K,N,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>,Backend extends AbstractStateBackend>
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the key/value state, releasing all occupied resources.
|
void |
setCurrentKey(K key)
Sets the current key, which will be used when using the state access methods.
|
void |
setCurrentNamespace(N namespace)
Sets the current namespace, which will be used when using the state access methods.
|
KvStateSnapshot<K,N,S,SD,Backend> |
snapshot(long checkpointId,
long timestamp)
Creates a snapshot of this state.
|
void setCurrentKey(K key)
key - The key.void setCurrentNamespace(N namespace)
namespace - The namespace.KvStateSnapshot<K,N,S,SD,Backend> snapshot(long checkpointId, long timestamp) throws Exception
checkpointId - The ID of the checkpoint for which the snapshot should be created.timestamp - The timestamp of the checkpoint.Exception - Exceptions during snapshotting the state should be forwarded, so the system
can react to failed snapshots.void dispose()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.