/**
* 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 final long currentTerm;
private final String votedFor;
- private final boolean migrated;
- private UpdateElectionTerm(final long currentTerm, final String votedFor, final boolean migrated) {
+ public UpdateElectionTerm(final long currentTerm, final String 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() {
return votedFor;
}
- @Override
- public boolean isMigrated() {
- return migrated;
- }
-
- @Override
- public Object writeReplace() {
+ private Object writeReplace() {
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 + "]";