Add default implementation of registerDataChangeListener 46/69046/2
authorTom Pantelis <tompantelis@gmail.com>
Sun, 4 Mar 2018 03:19:34 +0000 (22:19 -0500)
committerStephen Kitt <skitt@redhat.com>
Mon, 5 Mar 2018 09:15:13 +0000 (09:15 +0000)
registerDataChangeListener is scheduled for removal howver
there are a few DataBroker implementations scattered about
that stub out this method. To facilitate smmooth removal,
add a default implementation in AsyncDataBroker that throws
UnsupportedOperationException - this will allow for the stubbed
implementations to be removed.

Change-Id: I784c5320f6c236cbb736799b9cf93f232d22e289
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataBroker.java

index 2af9f055f93566dd1e7d347d53435ac9ff1111f2..528324151710fdf8abd1c670c05f3de38744a04d 100644 (file)
@@ -232,6 +232,9 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
      *         your listener using {@link ListenerRegistration#close()} to stop
      *         delivery of change events.
      */
      *         your listener using {@link ListenerRegistration#close()} to stop
      *         delivery of change events.
      */
-    ListenerRegistration<L> registerDataChangeListener(LogicalDatastoreType store, P path, L listener,
-            DataChangeScope triggeringScope);
+    @Deprecated
+    default ListenerRegistration<L> registerDataChangeListener(LogicalDatastoreType store, P path, L listener,
+            DataChangeScope triggeringScope) {
+        throw new UnsupportedOperationException("Data change listeners are no longer supported.");
+    }
 }
 }