X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmodification%2FDeleteModification.java;h=168b80a2080886afb12caf2ce5d1f040f8715e7f;hb=461173ce10acbd8597b8f4c6ccb6c98c7a99447c;hp=3a63f5b17361a0015ac43ba293bcd54ee29339cb;hpb=2a735bfd69e79cfcf0cbd08d4596e48e3cc1069c;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/DeleteModification.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/DeleteModification.java index 3a63f5b173..168b80a208 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/DeleteModification.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/DeleteModification.java @@ -12,14 +12,13 @@ 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.util.InstanceIdentifierUtils; -import org.opendaylight.controller.cluster.datastore.utils.SerializationUtils; -import org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages; -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; /** - * DeleteModification store all the parameters required to delete a path from the data tree + * DeleteModification store all the parameters required to delete a path from the data tree. */ public class DeleteModification extends AbstractModification { private static final long serialVersionUID = 1L; @@ -41,6 +40,11 @@ public class DeleteModification extends AbstractModification { transaction.delete(getPath()); } + @Override + public void apply(DataTreeModification transaction) { + transaction.delete(getPath()); + } + @Override public byte getType() { return DELETE; @@ -56,19 +60,6 @@ public class DeleteModification extends AbstractModification { SerializationUtils.serializePath(getPath(), out); } - @Override - @Deprecated - public Object toSerializable() { - return PersistentMessages.Modification.newBuilder().setType(this.getClass().toString()) - .setPath(InstanceIdentifierUtils.toSerializable(getPath())).build(); - } - - @Deprecated - public static DeleteModification fromSerializable(Object serializable) { - PersistentMessages.Modification o = (PersistentMessages.Modification) serializable; - return new DeleteModification(InstanceIdentifierUtils.fromSerializable(o.getPath())); - } - public static DeleteModification fromStream(ObjectInput in, short version) throws ClassNotFoundException, IOException { DeleteModification mod = new DeleteModification(version);