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
9 package org.opendaylight.controller.cluster.example.messages;
11 import java.io.Serializable;
12 import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload;
14 public class KeyValue extends Payload implements Serializable {
15 private static final long serialVersionUID = 1L;
22 public KeyValue(String key, String value) {
27 public String getKey() {
31 public String getValue() {
35 public void setKey(String key) {
39 public void setValue(String value) {
44 public String toString() {
45 return "KeyValue{" + "key='" + key + '\'' + ", value='" + value + '\'' + '}';
50 return this.value.length() + this.key.length();