summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java b/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java
new file mode 100644
index 0000000..92dfb53
--- /dev/null
+++ b/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java
@@ -0,0 +1,17 @@
+package com.keuin.kbackupfabric.operation.abstracts;
+
+/**
+ * The most basic operation abstraction.
+ * This class represents an serial operation, which is limited in a non-public method.
+ * Note that the operation is not invokable by default, you should use InvokableOperation in order to provide a public method for users to call.
+ */
+public abstract class AbstractSerialOperation {
+ /**
+ * Do your operation here.
+ * This method is not designed to be public.
+ * When this method returns, the operation must have been finished.
+ *
+ * @return whether the operation succeed.
+ */
+ protected abstract boolean operate();
+}