Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "BUG 2820 - LLDP refactor"
[controller.git]
/
opendaylight
/
md-sal
/
sal-clustering-commons
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
notifications
/
LeaderStateChanged.java
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 ec35b03b0a5956176aeafadbdaa56fa990e23699..23c95ecc99c0dea3ca144092018fd303d6dd7511 100644
(file)
--- 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;
*/
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
*/
*
* @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;
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;
}
this.leaderId = leaderId;
}
- public String getMemberId() {
+ public
@Nonnull
String getMemberId() {
return memberId;
}
return memberId;
}
- public String getLeaderId() {
+ public
@Nullable
String getLeaderId() {
return leaderId;
}
return leaderId;
}