X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsamples%2Fclustering-test-app%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fclustering%2Fit%2Fprovider%2FCarDataTreeChangeListener.java;h=6acf6744a0a57d0141de5d2f30b17acb075874ce;hb=0cb5ce07fc959deed2e7887ed22dfde81cb2c9a2;hp=8d9eb77ddc812f6a5538a2dbd7fc99cb96b7dbd7;hpb=b4bf55727093657662d8c16a50fa85f87978a586;p=controller.git diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarDataTreeChangeListener.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarDataTreeChangeListener.java index 8d9eb77ddc..6acf6744a0 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarDataTreeChangeListener.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarDataTreeChangeListener.java @@ -7,10 +7,10 @@ */ package org.opendaylight.controller.clustering.it.provider; -import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; -import org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType; -import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; -import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; +import org.opendaylight.mdsal.binding.api.DataObjectModification; +import org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType; +import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; +import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.sal.clustering.it.car.rev140818.Cars; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; @@ -29,22 +29,20 @@ public class CarDataTreeChangeListener implements DataTreeChangeListener { public void onDataTreeChanged(final java.util.Collection> changes) { if (LOG.isTraceEnabled()) { for (DataTreeModification change : changes) { - ouputChanges(change); + outputChanges(change); } } } - private static void ouputChanges(final DataTreeModification change) { + private static void outputChanges(final DataTreeModification change) { final DataObjectModification rootNode = change.getRootNode(); final ModificationType modificationType = rootNode.getModificationType(); final InstanceIdentifier rootIdentifier = change.getRootPath().getRootIdentifier(); switch (modificationType) { case WRITE: case SUBTREE_MODIFIED: { - final Cars dataBefore = rootNode.getDataBefore(); - final Cars dataAfter = rootNode.getDataAfter(); LOG.trace("onDataTreeChanged - Cars config with path {} was added or changed from {} to {}", - rootIdentifier, dataBefore, dataAfter); + rootIdentifier, rootNode.getDataBefore(), rootNode.getDataAfter()); break; } case DELETE: {