Class StateMapSnapshot<K,N,S,T extends StateMap<K,N,S>>
java.lang.Object
org.apache.flink.runtime.state.heap.StateMapSnapshot<K,N,S,T>
- Type Parameters:
K- type of keyN- type of namespaceS- type of state
- Direct Known Subclasses:
CopyOnWriteStateMapSnapshot
Base class for snapshots of a
StateMap.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Iterator<StateEntry<K,N, S>> getIterator(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<S> stateSerializer, StateSnapshotTransformer<S> stateSnapshotTransformer) booleanReturns true iff the given state map is the owner of this snapshot object.voidrelease()Release the snapshot.abstract voidwriteState(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<S> stateSerializer, org.apache.flink.core.memory.DataOutputView dov, StateSnapshotTransformer<S> stateSnapshotTransformer) Writes the state in this snapshot to output.
-
Field Details
-
owningStateMap
TheStateMapfrom which this snapshot was created.
-
-
Constructor Details
-
StateMapSnapshot
-
-
Method Details
-
isOwner
Returns true iff the given state map is the owner of this snapshot object. -
release
public void release()Release the snapshot. -
getIterator
public abstract Iterator<StateEntry<K,N, getIteratorS>> (@Nonnull org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, @Nonnull org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, @Nonnull org.apache.flink.api.common.typeutils.TypeSerializer<S> stateSerializer, @Nullable StateSnapshotTransformer<S> stateSnapshotTransformer) -
writeState
public abstract void writeState(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<S> stateSerializer, @Nonnull org.apache.flink.core.memory.DataOutputView dov, @Nullable StateSnapshotTransformer<S> stateSnapshotTransformer) throws IOException Writes the state in this snapshot to output. The state need to be transformed with the given transformer if the transformer is non-null.- Parameters:
keySerializer- the key serializer.namespaceSerializer- the namespace serializer.stateSerializer- the state serializer.dov- the output.stateSnapshotTransformer- state transformer, and can be null.- Throws:
IOException- on write-related problems.
-