From: Robert Varga Date: Sat, 13 Feb 2016 23:24:06 +0000 (+0100) Subject: Make FollowerInitialSyncUpStatus final X-Git-Tag: release/boron~371 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F34613%2F4;hp=3d4e718d0fe598b33e50b8d3bbcca3ff3bbb8b3a;p=controller.git Make FollowerInitialSyncUpStatus final Change-Id: Ie39c26f077311e0ec5b9dd9b8734bdfabf26b581 Signed-off-by: Robert Varga --- 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 72b5ac9515..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,28 +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, String name){ + public FollowerInitialSyncUpStatus(final boolean initialSyncDone, @Nonnull final String name) { this.initialSyncDone = initialSyncDone; - this.name = name; + this.name = Preconditions.checkNotNull(name); } public boolean isInitialSyncDone() { return initialSyncDone; } - public String getName() { + @Nonnull public String getName() { return name; } }