Deprecate old MD-SAL APIs for removal
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMDataTreeChangeListener.java
index 257879070d22ad160d702714a5dd23ebcb0108b1..28aaeb45b3dc2e4bd4bc12cd814978962303f63c 100644 (file)
@@ -9,15 +9,21 @@ package org.opendaylight.controller.md.sal.dom.api;
 
 import java.util.Collection;
 import java.util.EventListener;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 
 /**
  * Interface implemented by classes interested in receiving notifications about
- * data tree changes. This interface differs from {@link DOMDataChangeListener}
- * in that it provides a cursor-based view of the change, which has potentially
+ * data tree changes. This interface provides a cursor-based view of the change, which has potentially
  * lower overhead.
+ *
+ * <p>
+ * Note: this interface enables notifications only at the leader of the data store, if clustered. If you want
+ * notifications on all instances in a cluster, use the {@link ClusteredDOMDataTreeChangeListener}.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener} instead.
  */
+@Deprecated(forRemoval = true)
 public interface DOMDataTreeChangeListener extends EventListener {
     /**
      * Invoked when there was data change for the supplied path, which was used
@@ -34,6 +40,7 @@ public interface DOMDataTreeChangeListener extends EventListener {
      * to recover from such events. Event producers are expected to exert reasonable
      * effort to suppress such events.
      *
+     * <p>
      * In other words, it is completely acceptable to observe
      * a {@link org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode},
      * which reports a {@link org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType}
@@ -42,5 +49,5 @@ public interface DOMDataTreeChangeListener extends EventListener {
      *
      * @param changes Collection of change events, may not be null or empty.
      */
-    void onDataTreeChanged(@Nonnull Collection<DataTreeCandidate> changes);
+    void onDataTreeChanged(@NonNull Collection<DataTreeCandidate> changes);
 }