From 6d6f0b486ac42b6bd69ddb8862ee3af7b819f3a7 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 15 Feb 2021 17:52:53 +0800 Subject: Add tests. Implementing auto backup and configuration (not finished) --- .../kbackupfabric/autobackup/PlayerActivityTracker.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/com/keuin/kbackupfabric/autobackup/PlayerActivityTracker.java (limited to 'src/main/java/com/keuin/kbackupfabric/autobackup/PlayerActivityTracker.java') diff --git a/src/main/java/com/keuin/kbackupfabric/autobackup/PlayerActivityTracker.java b/src/main/java/com/keuin/kbackupfabric/autobackup/PlayerActivityTracker.java new file mode 100644 index 0000000..ef2b85e --- /dev/null +++ b/src/main/java/com/keuin/kbackupfabric/autobackup/PlayerActivityTracker.java @@ -0,0 +1,15 @@ +package com.keuin.kbackupfabric.autobackup; + +public interface PlayerActivityTracker { + /** + * Update the checkpoint, return accumulated result. + * + * @return if there is at least one player logged in since last checkpoint. + */ + boolean getCheckpoint(); + + /** + * Mark dirty. In the next checkpoint, the backup will be performed. + */ + void setCheckpoint(); +} -- cgit v1.2.3