diff options
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java')
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java b/src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java deleted file mode 100644 index 4e9eb6c..0000000 --- a/src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.keuin.kbackupfabric.operation.backup; - -import com.keuin.kbackupfabric.util.backup.builder.BackupFileNameBuilder; -import com.keuin.kbackupfabric.util.backup.formatter.BackupFileNameFormatter; - -import java.io.IOException; - -/** - * Provide specific backup method, which is implemented statelessly. - */ -public interface BackupMethod { - - /** - * Perform a backup with given method. The backup will be saved as the given name. - * Note: real file name depends on the backup type. - * @param backupName the backup name. - * @return if the backup operation succeed. - */ - BackupResult backup(String backupName, String levelPath, String backupSaveDirectory) throws IOException; - - boolean restore(String backupName, String levelPath, String backupSaveDirectory) throws IOException; - - BackupFileNameBuilder getBackupFileNameBuilder(); - - BackupFileNameFormatter getBackupFileNameFormatter(); - - class BackupResult { - private final boolean success; - private final long backupSizeBytes; - - public BackupResult(boolean success, long backupSizeBytes) { - this.success = success; - this.backupSizeBytes = backupSizeBytes; - } - - public boolean isSuccess() { - return success; - } - - public long getBackupSizeBytes() { - return backupSizeBytes; - } - } -} |