package org.opendaylight.controller.cluster.raft;
+import akka.japi.Procedure;
import java.util.List;
/**
* information
*
* @param index the index of the log entry
+ * @return the adjusted index of the first log entry removed or -1 if log entry not found.
*/
- void removeFrom(long index);
+ long removeFrom(long index);
/**
*/
void appendAndPersist(final ReplicatedLogEntry replicatedLogEntry);
+ void appendAndPersist(ReplicatedLogEntry replicatedLogEntry, Procedure<ReplicatedLogEntry> callback);
+
/**
*
* @param index the index of the log entry
*/
int dataSize();
+ /**
+ * We decide if snapshot need to be captured based on the count/memory consumed.
+ * @param replicatedLogEntry
+ */
+ void captureSnapshotIfReady(ReplicatedLogEntry replicatedLogEntry);
+
}