Class SecuredSnapshotFacade

java.lang.Object
org.gridgain.internal.snapshots.SecuredSnapshotFacade
All Implemented Interfaces:
org.apache.ignite.internal.wrapper.Wrapper, SnapshotFacade

public class SecuredSnapshotFacade extends Object implements SnapshotFacade, org.apache.ignite.internal.wrapper.Wrapper
Wrapper for SnapshotFacade that checks license and privileges.
  • Constructor Details

    • SecuredSnapshotFacade

      public SecuredSnapshotFacade(SnapshotFacade snapshotFacade, org.gridgain.internal.license.LicenseFeatureChecker licenseFeatureChecker, org.gridgain.internal.rbac.authorization.Authorizer authorizer)
      Constructor.
  • 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: SnapshotFacade
      Starts a Snapshot over the provided tables at a given moment in time.
      Specified by:
      createSnapshot in interface SnapshotFacade
      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

      public CompletableFuture<UUID> restoreSnapshot(UUID targetSnapshotId, Set<String> tableNames, Set<String> structureNames, @Nullable @Nullable String source, @Nullable @Nullable String decryptionProvider, boolean force)
      Description copied from interface: SnapshotFacade
      Initiates restoration of a given Snapshot.
      Specified by:
      restoreSnapshot in interface SnapshotFacade
      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 or null for default.
      decryptionProvider - Name of the decryption provider.
      force - If false, restoration will fail if there are existing structures that would be overwritten. If true, 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

      public CompletableFuture<UUID> deleteSnapshot(UUID targetSnapshotId)
      Description copied from interface: SnapshotFacade
      Initiates deletion of a given Snapshot.
      Specified by:
      deleteSnapshot in interface SnapshotFacade
      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: SnapshotFacade
      Returns a list of all snapshot creation and restoration operations, sorted from newest to oldest.
      Specified by:
      getSnapshotOperationsList in interface SnapshotFacade
      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: SnapshotFacade
      Returns operation by ID.
      Specified by:
      getOperationById in interface SnapshotFacade
      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.
    • unwrap

      public <T> T unwrap(Class<T> classToUnwrap)
      Specified by:
      unwrap in interface org.apache.ignite.internal.wrapper.Wrapper