X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FRaftActorRecoveryCohort.java;h=4df0e7b58b5eb4aff84a03ac21f4865987b7c264;hb=c1bae57105d04c2d13fcf6c0ca654177743b51f8;hp=c3760472ac2a11614b1bbb55ad64578deb21dc8f;hpb=c9943f5bc72d4cde9356d3bd4cf73d36f4b2f754;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoveryCohort.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoveryCohort.java index c3760472ac..4df0e7b58b 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoveryCohort.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoveryCohort.java @@ -7,8 +7,9 @@ */ package org.opendaylight.controller.cluster.raft; -import javax.annotation.Nullable; -import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload; +import org.eclipse.jdt.annotation.Nullable; +import org.opendaylight.controller.cluster.raft.messages.Payload; +import org.opendaylight.controller.cluster.raft.persisted.Snapshot; /** * Interface for a class that participates in raft actor persistence recovery. @@ -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,9 @@ 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(); + @Nullable Snapshot getRestoreFromSnapshot(); }