Deprecate the abstract listeners included in sfc-provider 54/64754/2
authorDavid Suarez <[email protected]>
Thu, 26 Oct 2017 06:07:25 +0000 (08:07 +0200)
committerBrady Johnson <[email protected]>
Fri, 27 Oct 2017 15:34:59 +0000 (15:34 +0000)
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 <[email protected]>
sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractClusteredDataTreeChangeListener.java
sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/AbstractDataTreeChangeListener.java

index c78f1f703b1fdaccca946983e62cc0fbc1d62424..4fa4d55586e10f8236935d42ad002f88550b3401 100644 (file)
@@ -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 <T> type of the data object the listener is registered to.
  * @author David Suárez ([email protected])
  *
- * @param <T>
- *            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<T extends DataObject>
         implements ClusteredDataTreeChangeListener<T>, AutoCloseable {
 
     @Override
-    public void onDataTreeChanged(Collection<DataTreeModification<T>> collection) {
+    public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<T>> collection) {
         for (final DataTreeModification<T> dataTreeModification : collection) {
             final DataObjectModification<T> dataObjectModification = dataTreeModification.getRootNode();
             switch (dataObjectModification.getModificationType()) {
index a3397c82bed4f577052f81f4c0190dbc47ec403f..3593212d5652713bc7a7752de7a0755d2d02f56d 100644 (file)
@@ -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 <T> type of the data object the listener is registered to.
  * @author David Suárez ([email protected])
- *
- * @param <T>
- *            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<T extends DataObject>
         implements DataTreeChangeListener<T>, AutoCloseable {
 
     @Override
-    public void onDataTreeChanged(Collection<DataTreeModification<T>> collection) {
+    public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<T>> collection) {
         for (final DataTreeModification<T> dataTreeModification : collection) {
             final DataObjectModification<T> dataObjectModification = dataTreeModification.getRootNode();
             switch (dataObjectModification.getModificationType()) {