Add default implementation of registerDataChangeListener 46/69046/2
authorTom Pantelis <>
Sun, 4 Mar 2018 03:19:34 +0000 (22:19 -0500)
committerStephen Kitt <>
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 <>

index 2af9f05..5283241 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.
-    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.");
+    }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.