Interface SnapshotFacade

All Known Implementing Classes:
SecuredSnapshotFacade, SnapshotFacadeImpl

public interface SnapshotFacade
Client-side API for working with Snapshots.
  • 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 production createSnapshot(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

      @TestOnly default CompletableFuture<UUID> createSnapshot(org.apache.ignite.internal.rest.api.snapshot.SnapshotType snapshotType, Set<String> tableNames, @Nullable @Nullable String destination, @Nullable @Nullable Instant timestamp, @Nullable @Nullable String encryptionProvider)
    • 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 or null for 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

      @TestOnly default CompletableFuture<UUID> restoreSnapshot(UUID targetSnapshotId)
      Initiates restoration of all tables from a given Snapshot with default source. In production restoreSnapshot(UUID, Set, String, String) 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.
      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.
      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, @Nullable @Nullable String source, @Nullable @Nullable String decryptionProvider)
      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 empty, restores all tables from the snapshot.
      source - Name of the snapshot URI in configuration or null for 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

      CompletableFuture<UUID> deleteSnapshot(UUID targetSnapshotId)
      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.