diff options
author | Keuin <[email protected]> | 2021-01-21 01:50:08 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2021-01-21 01:50:08 +0800 |
commit | ac3b5e1476dedcefb723f19bd0fdd9a22fcb16e9 (patch) | |
tree | 75d0994f3f7aa37c3d240933f0f2d179d318e597 /src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java | |
parent | 82e3986045ac7eaca6aaa290fb2283fd6c6c901a (diff) | |
parent | 7a5297de3467b1069fdf5e4a1b2aaf510ca35663 (diff) |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/main/java/com/keuin/kbackupfabric/operation/backup/PrimitiveBackupMethod.java
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; - } - } -} |