S - type of the returned state object that represents the result of the snapshot
operation.SR - type of produced resources in the synchronous part.@Internal
public interface SnapshotStrategy<S extends StateObject,SR extends SnapshotResources>
The interface can be later on executed in a synchronous or asynchronous manner. See SnapshotStrategyRunner.
| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
SnapshotStrategy.SnapshotResultSupplier<S extends StateObject>
A supplier for a
SnapshotResult with an access to a CloseableRegistry for io
tasks that need to be closed when cancelling the async part of the checkpoint. |
| 限定符和类型 | 方法和说明 |
|---|---|
SnapshotStrategy.SnapshotResultSupplier<S> |
asyncSnapshot(SR syncPartResource,
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 @SupplierWithException that gives a state
handle to the snapshot. |
SR |
syncPrepareResources(long checkpointId)
Performs the synchronous part of the snapshot.
|
SR syncPrepareResources(long checkpointId) throws Exception
checkpointId - The ID of the checkpoint.ExceptionSnapshotStrategy.SnapshotResultSupplier<S> asyncSnapshot(SR syncPartResource, long checkpointId, long timestamp, @Nonnull CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions)
CheckpointStreamFactory and returns a @SupplierWithException that gives a state
handle to the snapshot.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.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.