K - The type of the keyN - The type of the namespaceS - The type of the StateSD - The type of the StateDescriptorBackend - The type of the backend that can restore the state from this snapshot.public abstract class AsynchronousKvStateSnapshot<K,N,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>,Backend extends AbstractStateBackend> extends Object implements KvStateSnapshot<K,N,S,SD,Backend>
KvStateSnapshot that asynchronously materializes the state that it represents. Instead
of representing a materialized handle to state this would normally hold the (immutable) state
internally and materializes it when materialize() is called.| Constructor and Description |
|---|
AsynchronousKvStateSnapshot() |
| Modifier and Type | Method and Description |
|---|---|
void |
discardState()
Discards the state snapshot, removing any resources occupied by it.
|
long |
getStateSize()
Returns the size of the state in bytes.
|
abstract KvStateSnapshot<K,N,S,SD,Backend> |
materialize()
Materializes the state held by this
AsynchronousKvStateSnapshot. |
KvState<K,N,S,SD,Backend> |
restoreState(Backend stateBackend,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
ClassLoader classLoader,
long recoveryTimestamp)
Loads the key/value state back from this snapshot.
|
public abstract KvStateSnapshot<K,N,S,SD,Backend> materialize() throws Exception
AsynchronousKvStateSnapshot.Exceptionpublic final KvState<K,N,S,SD,Backend> restoreState(Backend stateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, ClassLoader classLoader, long recoveryTimestamp) throws Exception
KvStateSnapshotrestoreState in interface KvStateSnapshot<K,N,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>,Backend extends AbstractStateBackend>stateBackend - The state backend that created this snapshot and can restore the key/value state
from this snapshot.keySerializer - The serializer for the keys.classLoader - The class loader for user-defined types.recoveryTimestamp - The timestamp of the checkpoint we are recovering from.Exception - Exceptions can occur during the state loading and are forwarded.public void discardState()
throws Exception
KvStateSnapshotdiscardState in interface KvStateSnapshot<K,N,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>,Backend extends AbstractStateBackend>Exception - Exceptions occurring during the state disposal should be forwarded.public long getStateSize()
throws Exception
KvStateSnapshotIf the the size is not known, return 0.
getStateSize in interface KvStateSnapshot<K,N,S extends org.apache.flink.api.common.state.State,SD extends org.apache.flink.api.common.state.StateDescriptor<S,?>,Backend extends AbstractStateBackend>Exception - If the operation fails during size retrieval.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.