K - type of keyN - type of namespaceS - type of statepublic class CopyOnWriteStateMapSnapshot<K,N,S> extends StateMapSnapshot<K,N,S,CopyOnWriteStateMap<K,N,S>>
CopyOnWriteStateMap.
IMPORTANT: Please notice that snapshot integrity of entries in this class rely on proper copy-on-write semantics
through the CopyOnWriteStateMap that created the snapshot object, but all objects in this snapshot must be considered
as READ-ONLY!. The reason is that the objects held by this class may or may not be deep copies of original objects
that may still used in the CopyOnWriteStateMap. This depends for each entry on whether or not it was subject to
copy-on-write operations by the CopyOnWriteStateMap. Phrased differently: the CopyOnWriteStateMap provides
copy-on-write isolation for this snapshot, but this snapshot does not isolate modifications from the
CopyOnWriteStateMap!
owningStateMap| Modifier and Type | Method and Description |
|---|---|
boolean |
isReleased() |
void |
release()
Release the snapshot.
|
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.
|
isOwnerpublic void release()
StateMapSnapshotrelease in class StateMapSnapshot<K,N,S,CopyOnWriteStateMap<K,N,S>>public boolean isReleased()
public 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
StateMapSnapshotwriteState in class StateMapSnapshot<K,N,S,CopyOnWriteStateMap<K,N,S>>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–2020 The Apache Software Foundation. All rights reserved.