X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FRaftActorSnapshotCohort.java;h=8887a650c099e9c0427ca5f28db7922557f02bfc;hp=a02b295dbc1ed7b39180d880c9b5eade21f78b54;hb=7cb260aeb0738104e3bee8a086de9e2e5f77b7e0;hpb=2faf656bf68dd3843fd59520b27a7ec2abbdcc68 diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotCohort.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotCohort.java index a02b295dbc..8887a650c0 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotCohort.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotCohort.java @@ -12,8 +12,8 @@ import com.google.common.io.ByteSource; import java.io.IOException; import java.io.OutputStream; import java.util.Optional; -import javax.annotation.Nonnull; -import org.opendaylight.controller.cluster.raft.persisted.Snapshot; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.controller.cluster.raft.persisted.Snapshot.State; /** * Interface for a class that participates in raft actor snapshotting. @@ -35,14 +35,14 @@ public interface RaftActorSnapshotCohort { * serialized data back to a State instance on the follower end. The serialization for snapshot install is * passed off so the cost of serialization is not charged to the raft actor's thread. */ - void createSnapshot(@Nonnull ActorRef actorRef, @Nonnull Optional installSnapshotStream); + void createSnapshot(@NonNull ActorRef actorRef, @NonNull Optional installSnapshotStream); /** * This method is called to apply a snapshot installed by the leader. * * @param snapshotState a snapshot of the state of the actor */ - void applySnapshot(@Nonnull Snapshot.State snapshotState); + void applySnapshot(@NonNull State snapshotState); /** * This method is called to de-serialize snapshot data that was previously serialized via {@link #createSnapshot} @@ -52,6 +52,5 @@ public interface RaftActorSnapshotCohort { * @return the converted snapshot State * @throws IOException if an error occurs accessing the ByteSource or de-serializing */ - @Nonnull - Snapshot.State deserializeSnapshot(@Nonnull ByteSource snapshotBytes) throws IOException; + @NonNull State deserializeSnapshot(@NonNull ByteSource snapshotBytes) throws IOException; }