Package org.gridgain.internal.snapshots
Interface SnapshotFacade
- All Known Implementing Classes:
SecuredSnapshotFacade,SnapshotFacadeImpl
public interface SnapshotFacade
Client-side API for working with Snapshots.
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompletableFuture<UUID>createSnapshot(org.apache.ignite.internal.rest.api.snapshot.SnapshotType snapshotType, Set<String> tableNames) Starts a Snapshot over the provided tables with default destination and current timestamp.default CompletableFuture<UUID>createSnapshot(org.apache.ignite.internal.rest.api.snapshot.SnapshotType snapshotType, Set<String> tableNames, @Nullable String destination, @Nullable Instant timestamp, @Nullable String encryptionProvider) createSnapshot(org.apache.ignite.internal.rest.api.snapshot.SnapshotType snapshotType, Set<String> tableNames, Set<String> structureNames, @Nullable String destination, @Nullable Instant timestamp, @Nullable String encryptionProvider) Starts a Snapshot over the provided tables at a given moment in time.deleteSnapshot(UUID targetSnapshotId) Initiates deletion of a given Snapshot.CompletableFuture<List<org.apache.ignite.internal.rest.api.snapshot.SnapshotOperation>>getOperationById(UUID operationId, boolean allNodes) Returns operation by ID.CompletableFuture<List<org.apache.ignite.internal.rest.api.snapshot.SnapshotOperation>>Returns a list of all snapshot creation and restoration operations, sorted from newest to oldest.default CompletableFuture<UUID>restoreSnapshot(UUID targetSnapshotId) Initiates restoration of all tables and structures from a given Snapshot with default source andforce=false.default CompletableFuture<UUID>restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames) Initiates restoration of a given Snapshot with default source andforce=false.default CompletableFuture<UUID>Initiates restoration of a given Snapshot with default source.restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames, Set<String> structureNames, @Nullable String source, @Nullable String decryptionProvider, boolean force) Initiates restoration of a given Snapshot.
-
Method Details
-
createSnapshot
@TestOnly default CompletableFuture<UUID> createSnapshot(org.apache.ignite.internal.rest.api.snapshot.SnapshotType snapshotType, Set<String> tableNames) Starts a Snapshot over the provided tables with default destination and current timestamp. In productioncreateSnapshot(SnapshotType, Set, Set, String, Instant, String)should be used.- Parameters:
snapshotType- Type of the snapshot.tableNames- Set of fully-qualified table names that will be parts of the snapshot. If empty, all tables actual at the moment of starting the operation will be used instead.- Returns:
- Future that completes after a Snapshot has been started and contains the Snapshot ID.
-
createSnapshot
-
createSnapshot
CompletableFuture<UUID> createSnapshot(org.apache.ignite.internal.rest.api.snapshot.SnapshotType snapshotType, Set<String> tableNames, Set<String> structureNames, @Nullable @Nullable String destination, @Nullable @Nullable Instant timestamp, @Nullable @Nullable String encryptionProvider) Starts a Snapshot over the provided tables at a given moment in time.- Parameters:
snapshotType- Type of the snapshot.tableNames- Set of fully-qualified table names that will be parts of the snapshot. If empty, all tables actual at the moment of starting the operation will be used instead.destination- Name of the snapshot URI in configuration ornullfor default.timestamp- Timestamp at which the Snapshot should be taken. If null then current time is used.encryptionProvider- The name of encryption provider.- Returns:
- Future that completes after a Full Snapshot has been started and contains the Snapshot ID.
-
restoreSnapshot
Initiates restoration of all tables and structures from a given Snapshot with default source andforce=false. In productionrestoreSnapshot(UUID, Set, Set, String, String, boolean)should be used.- Parameters:
targetSnapshotId- ID of the Snapshot to be restored.- Returns:
- Future that completes after a Snapshot restoration has been started and contains the ID of the operation.
-
restoreSnapshot
@TestOnly default CompletableFuture<UUID> restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames) Initiates restoration of a given Snapshot with default source andforce=false.- Parameters:
targetSnapshotId- ID of the Snapshot to be restored.tableNames- Set of fully-qualified table names to restore from the snapshot. If empty, restores all tables and structures from the snapshot.- Returns:
- Future that completes after a Snapshot restoration has been started and contains the ID of the operation.
-
restoreSnapshot
@TestOnly default CompletableFuture<UUID> restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames, Set<String> structureNames) Initiates restoration of a given Snapshot with default source.- Parameters:
targetSnapshotId- ID of the Snapshot to be restored.tableNames- Set of fully-qualified table names to restore from the snapshot. If both this and stucture names are empty, restores all tables from the snapshot.structureNames- Set of fully-qualified structure names to restore from the snapshot. If both this and table names are empty, restores all structures from the snapshot.- Returns:
- Future that completes after a Snapshot restoration has been started and contains the ID of the operation.
-
restoreSnapshot
CompletableFuture<UUID> restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames, Set<String> structureNames, @Nullable @Nullable String source, @Nullable @Nullable String decryptionProvider, boolean force) Initiates restoration of a given Snapshot.- Parameters:
targetSnapshotId- ID of the Snapshot to be restored.tableNames- Set of fully-qualified table names to restore from the snapshot. If both this and structureNames are empty, restores all tables from the snapshot.structureNames- Set of fully-qualified structure names to restore from the snapshot. If both this and tableNames are empty, restores all structures from the snapshot.source- Name of the snapshot URI in configuration ornullfor default.decryptionProvider- Name of the decryption provider.force- Iffalse, restoration will fail if there are existing structures that would be overwritten. Iftrue, such structures will be dropped before restoration.- Returns:
- Future that completes after a Snapshot restoration has been started and contains the ID of the operation.
-
deleteSnapshot
Initiates deletion of a given Snapshot.- Parameters:
targetSnapshotId- ID of the Snapshot to be deleted.- Returns:
- Future that completes after a Snapshot deletion has been started and contains the ID of the operation.
-
getSnapshotOperationsList
CompletableFuture<List<org.apache.ignite.internal.rest.api.snapshot.SnapshotOperation>> getSnapshotOperationsList()Returns a list of all snapshot creation and restoration operations, sorted from newest to oldest.- Returns:
- Future that completes after all snapshot operations are retrieved.
-
getOperationById
CompletableFuture<List<org.apache.ignite.internal.rest.api.snapshot.SnapshotOperation>> getOperationById(UUID operationId, boolean allNodes) Returns operation by ID.- Parameters:
operationId- ID of the operation.allNodes- if operation status for every node should be retrieved.- Returns:
- Completable future that will be completed when all operations are retrieved.
-