Package io.camunda.zeebe.backup.api
Interface BackupManager
- All Known Implementing Classes:
BackupService,NoopBackupManager
public interface BackupManager
Manages backup of a partition *
-
Method Summary
Modifier and TypeMethodDescriptionClose Backup managerdeleteBackup(long checkpointId) Deletes the backup.voidfailInProgressBackup(long lastCheckpointId) getBackupStatus(long checkpointId) Get the status of the backupGet all available backups where status is one ofBackupStatusCode.COMPLETED,BackupStatusCode.FAILED,BackupStatusCode.IN_PROGRESSvoidtakeBackup(long checkpointId, long checkpointPosition) Takes backup with id checkpointId.
-
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 backupcheckpointPosition- position of the record until which must be included in the backup.
-
getBackupStatus
Get the status of the backup- Parameters:
checkpointId-- Returns:
- backup status
-
listBackups
ActorFuture<Collection<BackupStatus>> listBackups()Get all available backups where status is one ofBackupStatusCode.COMPLETED,BackupStatusCode.FAILED,BackupStatusCode.IN_PROGRESS- Returns:
- a collection of backup status
-
deleteBackup
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)
-