From dd48656bc2f31601c27c2587b2818e906e6d90a7 Mon Sep 17 00:00:00 2001 From: David Suarez Date: Thu, 26 Oct 2017 08:07:25 +0200 Subject: [PATCH] Deprecate the abstract listeners included in sfc-provider The AbstractClusteredDataTreeChangeListener and AbstractDataTreeChangeListener are replaced by the classes present in Genius' package org.opendaylight.genius.datastoreutils.listeners. Change-Id: I2fcb0187e2b3f43b7ea9d872c50de1543e89f384 Signed-off-by: David Suarez --- .../AbstractClusteredDataTreeChangeListener.java | 9 ++++++--- .../listeners/AbstractDataTreeChangeListener.java | 10 ++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractClusteredDataTreeChangeListener.java b/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractClusteredDataTreeChangeListener.java index c78f1f703..4fa4d5558 100644 --- a/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractClusteredDataTreeChangeListener.java +++ b/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractClusteredDataTreeChangeListener.java @@ -8,6 +8,7 @@ package org.opendaylight.sfc.provider.listeners; import java.util.Collection; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener; import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; @@ -19,16 +20,18 @@ import org.opendaylight.yangtools.yang.binding.DataObject; * date tree, and depending on the type of modification, it invokes the * appropriate method on the derived classes. * + * @param type of the data object the listener is registered to. * @author David Suárez (david.suarez.fuentes@ericsson.com) * - * @param - * type of the data object the listener is registered to. + * @deprecated this class is deprecated, use the + * {@link org.opendaylight.genius.datastoreutils.listeners.AbstractClusteredSyncDataTreeChangeListener} in Genius. */ +@Deprecated public abstract class AbstractClusteredDataTreeChangeListener implements ClusteredDataTreeChangeListener, AutoCloseable { @Override - public void onDataTreeChanged(Collection> collection) { + public void onDataTreeChanged(@Nonnull Collection> collection) { for (final DataTreeModification dataTreeModification : collection) { final DataObjectModification dataObjectModification = dataTreeModification.getRootNode(); switch (dataObjectModification.getModificationType()) { diff --git a/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractDataTreeChangeListener.java b/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractDataTreeChangeListener.java index a3397c82b..3593212d5 100644 --- a/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractDataTreeChangeListener.java +++ b/sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractDataTreeChangeListener.java @@ -8,6 +8,7 @@ package org.opendaylight.sfc.provider.listeners; import java.util.Collection; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; @@ -19,16 +20,17 @@ import org.opendaylight.yangtools.yang.binding.DataObject; * data tree, and depending on the type of modification, it invokes the * appropriate method on the derived classes. * + * @param type of the data object the listener is registered to. * @author David Suárez (david.suarez.fuentes@ericsson.com) - * - * @param - * type of the data object the listener is registered to. + * @deprecated this class is deprecated, use the + * {@link org.opendaylight.genius.datastoreutils.listeners.AbstractSyncDataTreeChangeListener} available in Genius. */ +@Deprecated public abstract class AbstractDataTreeChangeListener implements DataTreeChangeListener, AutoCloseable { @Override - public void onDataTreeChanged(Collection> collection) { + public void onDataTreeChanged(@Nonnull Collection> collection) { for (final DataTreeModification dataTreeModification : collection) { final DataObjectModification dataObjectModification = dataTreeModification.getRootNode(); switch (dataObjectModification.getModificationType()) { -- 2.36.6