2 * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.raft.persisted;
10 import java.io.Serializable;
13 * Message class to persist election term information.
15 public final class UpdateElectionTerm implements Serializable {
17 private static final long serialVersionUID = 1L;
19 private final long currentTerm;
20 private final String votedFor;
22 public UpdateElectionTerm(final long currentTerm, final String votedFor) {
23 this.currentTerm = currentTerm;
24 this.votedFor = votedFor;
27 public long getCurrentTerm() {
31 public String getVotedFor() {
36 public String toString() {
37 return "UpdateElectionTerm [currentTerm=" + currentTerm + ", votedFor=" + votedFor + "]";
41 private Object writeReplace() {