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 EmptyExternalizable implements VersionedSerializableMessage {
19 private final Object legacySerializedInstance;
21 protected EmptyReply(Object legacySerializedInstance) {
23 this.legacySerializedInstance = legacySerializedInstance;
27 public Object toSerializable(short toVersion) {
28 return toVersion >= DataStoreVersions.LITHIUM_VERSION ? this : legacySerializedInstance;