Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bug 7391: Fix out-of-order LeaderStateChange events
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
base
/
messages
/
FollowerInitialSyncUpStatus.java
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 72b5ac95153f07c1b315e01c809f0b76f985b433..00ef63cf36fb76803c868a569f32e53057ae9d33 100644
(file)
--- 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,29
@@
package org.opendaylight.controller.cluster.raft.base.messages;
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
/**
* 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.
* 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;
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.initialSyncDone = initialSyncDone;
- this.name =
name
;
+ this.name =
Preconditions.checkNotNull(name)
;
}
public boolean isInitialSyncDone() {
return initialSyncDone;
}
}
public boolean isInitialSyncDone() {
return initialSyncDone;
}
- public String getName() {
+
@Nonnull
public String getName() {
return name;
}
}
return name;
}
}