* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
* 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.modification;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
package org.opendaylight.controller.cluster.datastore.modification;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
-import org.opendaylight.controller.cluster.datastore.utils.SerializationUtils;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
+import org.opendaylight.controller.cluster.datastore.node.utils.stream.SerializationUtils;
+import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- setPath(SerializationUtils.deserializePath(in));
+ public void readExternal(final ObjectInput in) throws IOException {
+ setPath(SerializationUtils.readPath(in));
+ }
+
+ @Override
+ public void writeExternal(final ObjectOutput out) throws IOException {
+ SerializationUtils.writePath(out, getPath());
- public void writeExternal(ObjectOutput out) throws IOException {
- SerializationUtils.serializePath(getPath(), out);
+ public void writeTo(final NormalizedNodeDataOutput out) throws IOException {
+ out.writeYangInstanceIdentifier(getPath());
- public static DeleteModification fromStream(ObjectInput in, short version)
- throws ClassNotFoundException, IOException {
- DeleteModification mod = new DeleteModification(version);
- mod.readExternal(in);
- return mod;
+ public static DeleteModification fromStream(final NormalizedNodeDataInput in, final short version)
+ throws IOException {
+ return new DeleteModification(version, in.readYangInstanceIdentifier());