X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fnotifications%2FLeaderStateChanged.java;h=23c95ecc99c0dea3ca144092018fd303d6dd7511;hp=ec35b03b0a5956176aeafadbdaa56fa990e23699;hb=a2c4e27ea137ce9e2929916b2964116c4df188a0;hpb=4ded8407b8cc21fe329f49b378a088a703c707fc diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/LeaderStateChanged.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/LeaderStateChanged.java index ec35b03b0a..23c95ecc99 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/LeaderStateChanged.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/LeaderStateChanged.java @@ -7,29 +7,30 @@ */ package org.opendaylight.controller.cluster.notifications; -import java.io.Serializable; +import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + /** - * A message initiated internally from the RaftActor when some state of a leader has changed + * A local message initiated internally from the RaftActor when some state of a leader has changed. * * @author Thomas Pantelis */ -public class LeaderStateChanged implements Serializable { - private static final long serialVersionUID = 1L; - +public class LeaderStateChanged { private final String memberId; private final String leaderId; - public LeaderStateChanged(String memberId, String leaderId) { - this.memberId = memberId; + public LeaderStateChanged(@Nonnull String memberId, @Nullable String leaderId) { + this.memberId = Preconditions.checkNotNull(memberId); this.leaderId = leaderId; } - public String getMemberId() { + public @Nonnull String getMemberId() { return memberId; } - public String getLeaderId() { + public @Nullable String getLeaderId() { return leaderId; }