T - Type of the local processing result.public interface SnapshotHandler<T> extends Extension
The execution of the handler consists of two steps:
invoke(SnapshotHandlerContext) method on all nodes containing the snapshot data.complete(String, Collection) method on one of the
nodes containing the snapshot data.complete(String, Collection) method may not be called.| Modifier and Type | Method and Description |
|---|---|
default void |
complete(String name,
Collection<SnapshotHandlerResult<T>> results)
Processing the results of the
invoke(SnapshotHandlerContext) method received from all nodes. |
T |
invoke(SnapshotHandlerContext ctx)
Local processing of a snapshot operation.
|
SnapshotHandlerType |
type()
Snapshot handler type.
|
SnapshotHandlerType type()
@Nullable T invoke(SnapshotHandlerContext ctx) throws Exception
ctx - Snapshot handler context.SnapshotHandlerResult.data() method
passed into complete(String, Collection) handler method.Exception - If invocation caused an exception. This exception will be returned in SnapshotHandlerResult.error()} method passed into complete(String, Collection) handler method.default void complete(String name, Collection<SnapshotHandlerResult<T>> results) throws SnapshotWarningException, Exception
invoke(SnapshotHandlerContext) method received from all nodes. This method
is called on coordinator node for SnapshotHandlerType.CREATE handler type and on the random node
containing the snapshot data for SnapshotHandlerType.RESTORE.
Note: If this method fails, the entire cluster-wide snapshot operation will be aborted and the changes made by it will be rolled back.
name - Snapshot name.results - Results from all nodes.SnapshotWarningException - If a warning of snapshot operation occurred.Exception - If the snapshot operation needs to be aborted.SnapshotHandlerResult
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023