Measure follower activity in nanoseconds
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorRecoveryCohort.java
index c3760472ac2a11614b1bbb55ad64578deb21dc8f..e107be96c4652081c5c9e3876b6cce87b72c2505 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.cluster.raft;
 
 import javax.annotation.Nullable;
+import org.opendaylight.controller.cluster.raft.persisted.Snapshot;
 import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload;
 
 /**
@@ -36,9 +37,9 @@ public interface RaftActorRecoveryCohort {
     /**
      * This method is called during recovery to reconstruct the state of the actor.
      *
-     * @param snapshotBytes A snapshot of the state of the actor
+     * @param snapshotState A snapshot of the state of the actor
      */
-    void applyRecoverySnapshot(byte[] snapshotBytes);
+    void applyRecoverySnapshot(Snapshot.State snapshotState);
 
     /**
      * This method is called during recovery at the end of a batch to apply the current batched
@@ -47,10 +48,10 @@ public interface RaftActorRecoveryCohort {
     void applyCurrentLogRecoveryBatch();
 
     /**
-     * Returns the state snapshot to restore from on recovery.
+     * Returns the snapshot to restore from on recovery.
      *
-     * @return the snapshot bytes or null if there's no snapshot to restore
+     * @return the snapshot or null if there's no snapshot to restore
      */
     @Nullable
-    byte[] getRestoreFromSnapshot();
+    Snapshot getRestoreFromSnapshot();
 }