Interface BackupManager

All Known Implementing Classes:
BackupService, NoopBackupManager

public interface BackupManager
Manages backup of a partition *
  • Method Details

    • takeBackup

      void takeBackup(long checkpointId, long checkpointPosition)
      Takes backup with id checkpointId. The method returns immediately after triggering the backup. getBackupStatus(long) must be used to check if the backup is completed or not. If a completed backup with same id already exists, no new backup will be taken.

      The implementation of this method should be non-blocking to not block the caller.

      Parameters:
      checkpointId - id of the backup
      checkpointPosition - position of the record until which must be included in the backup.
    • getBackupStatus

      ActorFuture<BackupStatus> getBackupStatus(long checkpointId)
      Get the status of the backup
      Parameters:
      checkpointId -
      Returns:
      backup status
    • listBackups

      Get all available backups where status is one of BackupStatusCode.COMPLETED, BackupStatusCode.FAILED, BackupStatusCode.IN_PROGRESS
      Returns:
      a collection of backup status
    • deleteBackup

      ActorFuture<Void> deleteBackup(long checkpointId)
      Deletes the backup.
      Parameters:
      checkpointId -
      Returns:
      future which will be completed after the backup is deleted.
    • closeAsync

      ActorFuture<Void> closeAsync()
      Close Backup manager
    • failInProgressBackup

      void failInProgressBackup(long lastCheckpointId)