K - type of keyN - type of namespaceS - type of statepublic abstract class StateMapSnapshot<K,N,S,T extends StateMap<K,N,S>> extends Object
StateMap.| Modifier and Type | Field and Description |
|---|---|
protected T |
owningStateMap
The
StateMap from which this snapshot was created. |
| Constructor and Description |
|---|
StateMapSnapshot(T stateMap) |
| Modifier and Type | Method and Description |
|---|---|
abstract 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) |
boolean |
isOwner(T stateMap)
Returns true iff the given state map is the owner of this snapshot object.
|
void |
release()
Release the snapshot.
|
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,
org.apache.flink.core.memory.DataOutputView dov,
StateSnapshotTransformer<S> stateSnapshotTransformer)
Writes the state in this snapshot to output.
|
public StateMapSnapshot(T stateMap)
public boolean isOwner(T stateMap)
public void release()
public abstract Iterator<StateEntry<K,N,S>> getIterator(@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)
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
keySerializer - the key serializer.namespaceSerializer - the namespace serializer.stateSerializer - the state serializer.dov - the output.stateSnapshotTransformer - state transformer, and can be null.IOException - on write-related problems.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.