2 * Copyright (c) 2014 Cisco 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.example.messages;
10 import java.io.Serializable;
11 import org.opendaylight.controller.cluster.raft.messages.Payload;
13 public class KeyValue extends Payload implements Serializable {
14 private static final long serialVersionUID = 1L;
21 public KeyValue(String key, String value) {
26 public String getKey() {
30 public String getValue() {
34 public void setKey(String key) {
38 public void setValue(String value) {
43 public String toString() {
44 return "KeyValue{" + "key='" + key + '\'' + ", value='" + value + '\'' + '}';
49 return value.length() + key.length();