Fix delete snapshots criteria
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / SnapshotState.java
index 46e0c87fc21d6ca6bb9a5a49e4ec9aa8538cc969..a6bcddfc137a104684d40fd3d301b5513c60ebb7 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.controller.cluster.raft;
 
-import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior;
+import org.opendaylight.controller.cluster.raft.base.messages.ApplySnapshot;
 
 public interface SnapshotState {
     /**
@@ -42,7 +42,7 @@ public interface SnapshotState {
      *
      * @param snapshot the Snapshot to apply.
      */
-    void apply(Snapshot snapshot);
+    void apply(ApplySnapshot snapshot);
 
     /**
      * Persist the snapshot
@@ -51,14 +51,15 @@ public interface SnapshotState {
      * @param currentBehavior
      * @param totalMemory
      */
-    void persist(byte[] snapshotBytes, RaftActorBehavior currentBehavior, long totalMemory);
+    void persist(byte[] snapshotBytes, long totalMemory);
 
     /**
      * Commit the snapshot by trimming the log
      *
      * @param sequenceNumber
+     * @param timeStamp
      */
-    void commit(long sequenceNumber, RaftActorBehavior currentBehavior);
+    void commit(long sequenceNumber, long timeStamp);
 
     /**
      * Rollback the snapshot
@@ -71,5 +72,5 @@ public interface SnapshotState {
      * @param desiredTrimIndex
      * @return the actual trim index
      */
-    long trimLog(long desiredTrimIndex, RaftActorBehavior currentBehavior);
+    long trimLog(long desiredTrimIndex);
 }