Package org.apache.flink.runtime.state
Interface StateSnapshot
-
- All Known Subinterfaces:
IterableStateSnapshot<K,N,S>
- All Known Implementing Classes:
CopyOnWriteStateTableSnapshot,HeapPriorityQueueStateSnapshot
@Internal public interface StateSnapshotGeneral interface for state snapshots that should be written partitioned by key-groups. All snapshots should be released after usage. This interface outlines the asynchronous snapshot life-cycle, which typically looks as follows. In the synchronous part of a checkpoint, an instance ofStateSnapshotis produced for a state and captures the state at this point in time. Then, in the asynchronous part of the checkpoint, the user callsgetKeyGroupWriter()to ensure that the snapshot is partitioned into key-groups. For state that is already partitioned, this can be a NOP. The returnedStateSnapshot.StateKeyGroupWritercan be used by the caller to write the state by key-group. As a last step, when the state is completely written, the user callsrelease().
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceStateSnapshot.StateKeyGroupWriterInterface for writing a snapshot that is partitioned into key-groups.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StateSnapshot.StateKeyGroupWritergetKeyGroupWriter()This method returnsStateSnapshot.StateKeyGroupWriterand should be called in the asynchronous part of the snapshot.StateMetaInfoSnapshotgetMetaInfoSnapshot()Returns a snapshot of the state's meta data.voidrelease()Release the snapshot.
-
-
-
Method Detail
-
getKeyGroupWriter
@Nonnull StateSnapshot.StateKeyGroupWriter getKeyGroupWriter()
This method returnsStateSnapshot.StateKeyGroupWriterand should be called in the asynchronous part of the snapshot.
-
getMetaInfoSnapshot
@Nonnull StateMetaInfoSnapshot getMetaInfoSnapshot()
Returns a snapshot of the state's meta data.
-
release
void release()
Release the snapshot. All snapshots should be released when they are no longer used because some implementation can only release resources after a release. ProducedStateSnapshot.StateKeyGroupWritershould no longer be used after calling this method.
-
-