summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-20 19:50:42 +0800
committerkeuin <[email protected]>2021-01-20 19:50:42 +0800
commitac7e70883c18602e7fd4b525b9e6fb9ea9620a6b (patch)
tree63b2d65d2fe489ef0cc1fe6e9a87b65c0b69de84 /src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java
parent7a5297de3467b1069fdf5e4a1b2aaf510ca35663 (diff)
refactor
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java b/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java
new file mode 100644
index 0000000..e1039d6
--- /dev/null
+++ b/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/FileIdentifierProvider.java
@@ -0,0 +1,15 @@
+package com.keuin.kbackupfabric.backup.incremental.identifier;
+
+import java.io.File;
+import java.io.IOException;
+
+public interface FileIdentifierProvider<T extends ObjectIdentifier> {
+ /**
+ * Generate file identifier from a random file. The file is not necessarily in the object base.
+ *
+ * @param file the file.
+ * @return the file identifier.
+ * @throws IOException when an I/O error occurs.
+ */
+ T fromFile(File file) throws IOException;
+}