X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FReadDataReply.java;h=2ed53ad0501a81e6ce9615fa318f4fa7a3fbb1c3;hb=HEAD;hp=eda5c262802669bfcc9eca9aed4f398187728edd;hpb=0ed60f58d8a8d73544df74f5bb4f93c13cd3ca7d;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java index eda5c26280..2ed53ad050 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore.messages; import java.io.IOException; @@ -14,40 +13,41 @@ import java.io.ObjectOutput; import org.opendaylight.controller.cluster.datastore.node.utils.stream.SerializationUtils; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +@Deprecated(since = "9.0.0", forRemoval = true) public class ReadDataReply extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; - private NormalizedNode normalizedNode; + private NormalizedNode normalizedNode; public ReadDataReply() { } - public ReadDataReply(NormalizedNode normalizedNode, short version) { + public ReadDataReply(final NormalizedNode normalizedNode, final short version) { super(version); this.normalizedNode = normalizedNode; } - public NormalizedNode getNormalizedNode() { + public NormalizedNode getNormalizedNode() { return normalizedNode; } @Override - public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); - normalizedNode = SerializationUtils.deserializeNormalizedNode(in); + normalizedNode = SerializationUtils.readNormalizedNode(in).orElse(null); } @Override - public void writeExternal(ObjectOutput out) throws IOException { + public void writeExternal(final ObjectOutput out) throws IOException { super.writeExternal(out); - SerializationUtils.serializeNormalizedNode(normalizedNode, out); + SerializationUtils.writeNormalizedNode(out, getStreamVersion(), normalizedNode); } - public static ReadDataReply fromSerializable(Object serializable) { + public static ReadDataReply fromSerializable(final Object serializable) { return (ReadDataReply) serializable; } - public static boolean isSerializedType(Object message) { + public static boolean isSerializedType(final Object message) { return message instanceof ReadDataReply; } }