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%2Fbase%2Fmessages%2FFollowerInitialSyncUpStatus.java;h=d2100cb950654785e748fa324431651ff44b46a0;hb=3676d1686706dbee6656e86a23c4bdb516d5267b;hp=3ce1f5d1e89038c7d4338f099cb0f49b909043cc;hpb=09b8efdb40105cd4cd3c21c9a9aea2c6687972be;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java index 3ce1f5d1e8..d2100cb950 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java @@ -8,22 +8,30 @@ package org.opendaylight.controller.cluster.raft.base.messages; +import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; + /** * The FollowerInitialSyncUpStatus is sent by a Follower to inform any RaftActor subclass whether the Follower * is at least at the same commitIndex as the Leader was when it sent the follower the very first heartbeat. * * This status can be used to determine if a Follower has caught up with the current Leader in an upgrade scenario * for example. - * */ -public class FollowerInitialSyncUpStatus { +public final class FollowerInitialSyncUpStatus { private final boolean initialSyncDone; + private final String name; - public FollowerInitialSyncUpStatus(boolean initialSyncDone){ + public FollowerInitialSyncUpStatus(final boolean initialSyncDone, @Nonnull final String name) { this.initialSyncDone = initialSyncDone; + this.name = Preconditions.checkNotNull(name); } public boolean isInitialSyncDone() { return initialSyncDone; } + + @Nonnull public String getName() { + return name; + } }