Class BackupRequestHandler

java.lang.Object
io.camunda.zeebe.gateway.admin.backup.BackupRequestHandler
All Implemented Interfaces:
BackupApi

public final class BackupRequestHandler extends Object implements BackupApi
  • Constructor Details

    • BackupRequestHandler

      public BackupRequestHandler(BrokerClient brokerClient)
  • Method Details

    • takeBackup

      public CompletionStage<Long> takeBackup(long backupId)
      Description copied from interface: BackupApi
      Triggers backup on all partitions. Returned future is completed successfully after all partitions have processed the request. Returned future fails if the request was not processed by at least one partition.

      TODO: check if it makes more sense to return a Future if we're always blocking on the result and never combining.

      Specified by:
      takeBackup in interface BackupApi
      Parameters:
      backupId - the id of the backup to be taken
      Returns:
      the backupId
    • getStatus

      public CompletionStage<BackupStatus> getStatus(long backupId)
      Description copied from interface: BackupApi
      Returns the status of the backup. The future fails if the request was not processed by at least one partition.

      TODO: check if it makes more sense to return a Future if we're always blocking on the result and never combining.

      Specified by:
      getStatus in interface BackupApi
      Returns:
      the status of the backup
    • listBackups

      public CompletionStage<List<BackupStatus>> listBackups()
      Specified by:
      listBackups in interface BackupApi
      Returns:
      a list of available backups
    • deleteBackup

      public CompletionStage<Void> deleteBackup(long backupId)
      Description copied from interface: BackupApi
      Deletes the backup with the given id
      Specified by:
      deleteBackup in interface BackupApi
      Parameters:
      backupId - id of the backup to delete