package org.opendaylight.controller.cluster.raft;
+import org.opendaylight.controller.cluster.raft.base.messages.ApplySnapshot;
import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior;
public interface SnapshotState {
/**
- * Should return true when a snapshot is being captured
- * @return
+ * @return true when a snapshot is being captured
*/
boolean isCapturing();
*/
boolean captureToInstall(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex, String targetFollower);
+ /**
+ * Applies a snapshot on a follower that was installed by the leader.
+ *
+ * @param snapshot the Snapshot to apply.
+ */
+ void apply(ApplySnapshot snapshot);
+
/**
* Persist the snapshot
*
*
* @param sequenceNumber
*/
- void commit(long sequenceNumber);
+ void commit(long sequenceNumber, RaftActorBehavior currentBehavior);
/**
* Rollback the snapshot