Use NormalizedNodeDataInput instead.
Change-Id: I8c16fcdd1f69354a2616fe89b5a368feea1d3090
Signed-off-by: Robert Varga <rovarga@cisco.com>
import java.util.Map;
import java.util.Set;
import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
import java.util.Map;
import java.util.Set;
import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
+import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeDataInput;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeDataOutput;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeInputOutput;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeInputStreamReader;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeDataOutput;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeInputOutput;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeInputStreamReader;
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
in.readShort(); // Read the version
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
in.readShort(); // Read the version
- NormalizedNodeInputStreamReader streamReader = new NormalizedNodeInputStreamReader(in);
+ NormalizedNodeDataInput streamReader = new NormalizedNodeInputStreamReader(in);
// Note: the scope passed to builder is not actually used.
Builder builder = DOMImmutableDataChangeEvent.builder(DataChangeScope.SUBTREE);
// Note: the scope passed to builder is not actually used.
Builder builder = DOMImmutableDataChangeEvent.builder(DataChangeScope.SUBTREE);
*/
public final class SerializationUtils {
public static final ThreadLocal<NormalizedNodeDataOutput> REUSABLE_WRITER_TL = new ThreadLocal<>();
*/
public final class SerializationUtils {
public static final ThreadLocal<NormalizedNodeDataOutput> REUSABLE_WRITER_TL = new ThreadLocal<>();
- public static final ThreadLocal<NormalizedNodeInputStreamReader> REUSABLE_READER_TL = new ThreadLocal<>();
+ public static final ThreadLocal<NormalizedNodeDataInput> REUSABLE_READER_TL = new ThreadLocal<>();
public static interface Applier<T> {
void apply(T instance, YangInstanceIdentifier path, NormalizedNode<?, ?> node);
public static interface Applier<T> {
void apply(T instance, YangInstanceIdentifier path, NormalizedNode<?, ?> node);
}
private static NormalizedNodeDataInput streamReader(DataInput in) throws IOException {
}
private static NormalizedNodeDataInput streamReader(DataInput in) throws IOException {
- NormalizedNodeInputStreamReader streamWriter = REUSABLE_READER_TL.get();
- if(streamWriter == null) {
- streamWriter = new NormalizedNodeInputStreamReader(in);
+ NormalizedNodeDataInput streamReader = REUSABLE_READER_TL.get();
+ if(streamReader == null) {
+ streamReader = new NormalizedNodeInputStreamReader(in);
}
public static void serializePathAndNode(YangInstanceIdentifier path, NormalizedNode<?, ?> node,
}
public static void serializePathAndNode(YangInstanceIdentifier path, NormalizedNode<?, ?> node,