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%2Fbase%2Fmessages%2FFollowerInitialSyncUpStatus.java;h=e4571c64a8dffd31cdbb0b09ed33f87f9f9b1d35;hp=3ce1f5d1e89038c7d4338f099cb0f49b909043cc;hb=HEAD;hpb=a8469dc0d7cacf28a09c24074bd48f380a2b8409 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..e4571c64a8 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 @@ -5,25 +5,32 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.raft.base.messages; +import static java.util.Objects.requireNonNull; + +import org.eclipse.jdt.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. - * + * is at least at the same commitIndex as the Leader was when it sent the follower the very first heart beat. * 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, final @NonNull String name) { this.initialSyncDone = initialSyncDone; + this.name = requireNonNull(name); } public boolean isInitialSyncDone() { return initialSyncDone; } + + public @NonNull String getName() { + return name; + } }