S
- Generic type of the state object that is created as handle to snapshots.R
- Generic type of the state object that used in restore.public interface Snapshotable<S extends StateObject,R>
Modifier and Type | Method and Description |
---|---|
void |
restore(R state)
Restores state that was previously snapshotted from the provided parameters.
|
RunnableFuture<S> |
snapshot(long checkpointId,
long timestamp,
CheckpointStreamFactory streamFactory,
CheckpointOptions checkpointOptions)
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. |
RunnableFuture<S> snapshot(long checkpointId, long timestamp, CheckpointStreamFactory streamFactory, CheckpointOptions checkpointOptions) throws Exception
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.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.StateObject
.Exception
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.