Interface StateSnapshot

  • All Known Subinterfaces:
    IterableStateSnapshot<K,​N,​S>
    All Known Implementing Classes:
    CopyOnWriteStateTableSnapshot, HeapPriorityQueueStateSnapshot

    @Internal
    public interface StateSnapshot
    General 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 of StateSnapshot is produced for a state and captures the state at this point in time. Then, in the asynchronous part of the checkpoint, the user calls getKeyGroupWriter() to ensure that the snapshot is partitioned into key-groups. For state that is already partitioned, this can be a NOP. The returned StateSnapshot.StateKeyGroupWriter can be used by the caller to write the state by key-group. As a last step, when the state is completely written, the user calls release().