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;
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);
*/
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);
}
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);
}
- return streamWriter;
+ return streamReader;
}
public static void serializePathAndNode(YangInstanceIdentifier path, NormalizedNode<?, ?> node,