2 * Copyright (c) 2015 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.datastore.messages;
10 import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
13 * A reply with no data.
15 * @author Thomas Pantelis
17 public abstract class EmptyReply extends VersionedExternalizableMessage {
18 protected EmptyReply() {
21 protected EmptyReply(short version) {
25 protected abstract Object newLegacySerializedInstance();
28 public Object toSerializable() {
29 return getVersion() >= DataStoreVersions.BORON_VERSION ? this : newLegacySerializedInstance();
33 public String toString() {
34 return getClass().getSimpleName() + " [version=" + getVersion() + "]";