+ void setSnapshotIndex(long snapshotIndex);
+
+ /**
+ * Sets snapshot term.
+ *
+ * @param snapshotTerm the term to set
+ */
+ void setSnapshotTerm(long snapshotTerm);
+
+ /**
+ * Clears the journal entries with startIndex (inclusive) and endIndex (exclusive).
+ *
+ * @param startIndex the start index (inclusive)
+ * @param endIndex the end index (exclusive)
+ */
+ void clear(int startIndex, int endIndex);
+
+ /**
+ * Handles all the bookkeeping in order to perform a rollback in the event of SaveSnapshotFailure.
+ *
+ * @param snapshotCapturedIndex the new snapshot index
+ * @param snapshotCapturedTerm the new snapshot term
+ */
+ void snapshotPreCommit(long snapshotCapturedIndex, long snapshotCapturedTerm);
+
+ /**
+ * Sets the Replicated log to state after snapshot success.
+ */
+ void snapshotCommit();
+
+ /**
+ * Restores the replicated log to a state in the event of a save snapshot failure.
+ */
+ void snapshotRollback();
+
+ /**
+ * Returns the size of the data in the log (in bytes).
+ *
+ * @return the size of the data in the log (in bytes)
+ */
+ int dataSize();
+
+ /**
+ * Determines if a snapshot needs to be captured based on the count/memory consumed and initiates the capture.
+ *
+ * @param replicatedLogEntry the last log entry.
+ */
+ void captureSnapshotIfReady(ReplicatedLogEntry replicatedLogEntry);
+
+ /**
+ * Determines if a snapshot should be captured based on the count/memory consumed.
+ *
+ * @param logIndex the log index to use to determine if the log count has exceeded the threshold
+ * @return true if a snapshot should be captured, false otherwise
+ */
+ boolean shouldCaptureSnapshot(long logIndex);