diff options
author | Keuin <[email protected]> | 2021-01-13 14:32:08 +0800 |
---|---|---|
committer | keuin <[email protected]> | 2021-01-13 14:32:08 +0800 |
commit | 2bc659d8f95a97d0514491e48ed9c66828a4e308 (patch) | |
tree | 202962a05caadf652ec117812cc6704ea64d001c /src/main/java/com/keuin/kbackupfabric/util/backup | |
parent | 1c6d68ee303ad3d4b1df5c3d433bf972256f0c8e (diff) |
BackupMethod now becomes stateful
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/util/backup')
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectCollectionFactory.java b/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectCollectionFactory.java index ac87883..627cb5c 100644 --- a/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectCollectionFactory.java +++ b/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectCollectionFactory.java @@ -15,7 +15,7 @@ import java.util.*; * identifiers. Usually, identifier is the combination of hash and other short information (such as size and another hash). * The identifier should use hashes that are strong enough, to prevent possible collisions. */ -public class ObjectCollectionFactory <T extends ObjectIdentifier> { +public class ObjectCollectionFactory<T extends ObjectIdentifier> { private final FileIdentifierProvider<T> identifierFactory; diff --git a/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java b/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java index ae54930..a0d4128 100644 --- a/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java +++ b/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java @@ -9,6 +9,10 @@ public class IncrementalBackupFileNameEncoder implements BackupFileNameEncoder { private static final String backupFileNamePrefix = "incremental-"; private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss"); + // TODO: make this private and use singleton pattern + public IncrementalBackupFileNameEncoder() { + } + @Override public String encode(String customName, LocalDateTime time) { if (!isValidCustomName(customName)) |