Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add optional timeout parameter for backup rpc
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
persisted
/
UpdateElectionTerm.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/UpdateElectionTerm.java
b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/UpdateElectionTerm.java
index 55096d677e60019cfd86378a0f5fda71b8e61fdb..939d893a2ec505538f918a1f30ad5c927c56666a 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/UpdateElectionTerm.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/UpdateElectionTerm.java
@@
-16,7
+16,7
@@
import java.io.Serializable;
/**
* Message class to persist election term information.
*/
/**
* Message class to persist election term information.
*/
-public class UpdateElectionTerm implements Serializable
, MigratedSerializable
{
+public class UpdateElectionTerm implements Serializable {
private static final class Proxy implements Externalizable {
private static final long serialVersionUID = 1L;
private static final class Proxy implements Externalizable {
private static final long serialVersionUID = 1L;
@@
-53,16
+53,10
@@
public class UpdateElectionTerm implements Serializable, MigratedSerializable {
private final long currentTerm;
private final String votedFor;
private final long currentTerm;
private final String votedFor;
- private final boolean migrated;
- p
rivate UpdateElectionTerm(final long currentTerm, final String votedFor, final boolean migrated
) {
+ p
ublic UpdateElectionTerm(final long currentTerm, final String votedFor
) {
this.currentTerm = currentTerm;
this.votedFor = votedFor;
this.currentTerm = currentTerm;
this.votedFor = votedFor;
- this.migrated = migrated;
- }
-
- public UpdateElectionTerm(final long currentTerm, final String votedFor) {
- this(currentTerm, votedFor, false);
}
public long getCurrentTerm() {
}
public long getCurrentTerm() {
@@
-73,21
+67,10
@@
public class UpdateElectionTerm implements Serializable, MigratedSerializable {
return votedFor;
}
return votedFor;
}
- @Override
- public boolean isMigrated() {
- return migrated;
- }
-
- @Override
- public Object writeReplace() {
+ private Object writeReplace() {
return new Proxy(this);
}
return new Proxy(this);
}
- @Deprecated
- public static UpdateElectionTerm createMigrated(final long currentTerm, final String votedFor) {
- return new UpdateElectionTerm(currentTerm, votedFor, true);
- }
-
@Override
public String toString() {
return "UpdateElectionTerm [currentTerm=" + currentTerm + ", votedFor=" + votedFor + "]";
@Override
public String toString() {
return "UpdateElectionTerm [currentTerm=" + currentTerm + ", votedFor=" + votedFor + "]";