Package org.gridgain.internal.snapshots
Class SnapshotFacadeImpl
java.lang.Object
org.gridgain.internal.snapshots.SnapshotFacadeImpl
- All Implemented Interfaces:
SnapshotFacade
Class implementing
SnapshotFacade.-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotFacadeImpl(org.apache.ignite.internal.network.ClusterService clusterService, org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl metaStorageManager, org.gridgain.internal.encryption.EncryptionManager encryptionManager) Creates a new Facade instance. -
Method Summary
Modifier and TypeMethodDescriptioncreateSnapshot(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.restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames, @Nullable String source, @Nullable String decryptionProvider) Initiates restoration of a given Snapshot.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gridgain.internal.snapshots.SnapshotFacade
createSnapshot, createSnapshot, restoreSnapshot, restoreSnapshot
-
Constructor Details
-
SnapshotFacadeImpl
public SnapshotFacadeImpl(org.apache.ignite.internal.network.ClusterService clusterService, org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl metaStorageManager, org.gridgain.internal.encryption.EncryptionManager encryptionManager) Creates a new Facade instance.- Parameters:
clusterService- Network manager.metaStorageManager- Meta Storage manager.
-
-
Method Details
-
createSnapshot
public 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) Description copied from interface:SnapshotFacadeStarts a Snapshot over the provided tables at a given moment in time.- Specified by:
createSnapshotin interfaceSnapshotFacade- 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
public CompletableFuture<UUID> restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames, @Nullable @Nullable String source, @Nullable @Nullable String decryptionProvider) Description copied from interface:SnapshotFacadeInitiates restoration of a given Snapshot.- Specified by:
restoreSnapshotin interfaceSnapshotFacade- 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 from the snapshot.source- Name of the snapshot URI in configuration ornullfor default.decryptionProvider- Name of the decryption provider.- Returns:
- Future that completes after a Snapshot restoration has been started and contains the ID of the operation.
-
deleteSnapshot
Description copied from interface:SnapshotFacadeInitiates deletion of a given Snapshot.- Specified by:
deleteSnapshotin interfaceSnapshotFacade- 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
public CompletableFuture<List<org.apache.ignite.internal.rest.api.snapshot.SnapshotOperation>> getSnapshotOperationsList()Description copied from interface:SnapshotFacadeReturns a list of all snapshot creation and restoration operations, sorted from newest to oldest.- Specified by:
getSnapshotOperationsListin interfaceSnapshotFacade- Returns:
- Future that completes after all snapshot operations are retrieved.
-
getOperationById
public CompletableFuture<List<org.apache.ignite.internal.rest.api.snapshot.SnapshotOperation>> getOperationById(UUID operationId, boolean allNodes) Description copied from interface:SnapshotFacadeReturns operation by ID.- Specified by:
getOperationByIdin interfaceSnapshotFacade- 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.
-