Interface Snapshotable<S extends StateObject>

Type Parameters:
S - type of the returned state object that represents the result of the snapshot operation.
All Known Subinterfaces:
AsyncKeyedStateBackend<K>, CheckpointableKeyedStateBackend<K>, OperatorStateBackend
All Known Implementing Classes:
AbstractKeyedStateBackend, AsyncKeyedStateBackendAdaptor, BatchExecutionKeyedStateBackend, DefaultOperatorStateBackend, HeapKeyedStateBackend

@Internal public interface Snapshotable<S extends StateObject>
Interface for objects that can snapshot its state (state backends currently). Implementing classes should ideally be stateless or at least threadsafe, i.e. this is a functional interface and is can be called in parallel by multiple checkpoints.
See Also:
  • Method Details

    • snapshot

      @Nonnull RunnableFuture<S> snapshot(long checkpointId, long timestamp, @Nonnull CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions) throws Exception
      Operation that writes a snapshot into a stream that is provided by the given CheckpointStreamFactory and returns a @RunnableFuture that gives a state handle to the snapshot. It is up to the implementation if the operation is performed synchronous or asynchronous. In the later case, the returned Runnable must be executed first before obtaining the handle.
      Parameters:
      checkpointId - The ID of the checkpoint.
      timestamp - The timestamp of the checkpoint.
      streamFactory - The factory that we can use for writing our state to streams.
      checkpointOptions - Options for how to perform this checkpoint.
      Returns:
      A runnable future that will yield a StateObject.
      Throws:
      Exception