Report non-present initial data in (DOM)DataTreeChangeListener
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMDataTreeChangeListener.java
index 2ae4f780dbb322495302c18321193dce865ea62b..7068210858a2d1036450b2269a50b37368976b64 100644 (file)
@@ -36,4 +36,16 @@ public interface DOMDataTreeChangeListener extends EventListener {
      * @throws NullPointerException if {@code changes} is null
      */
     void onDataTreeChanged(@NonNull Collection<DataTreeCandidate> changes);
+
+    /**
+     * Invoked only once during registration of the listener if there was no data in the conceptual data tree
+     * for the supplied path, which was used to register this listener, and after this {@link #onDataTreeChanged}
+     * would always be invoked for data changes.
+     *
+     * <p>
+     * Users not care about this event could leave it as default with no-op.
+     */
+    default void onInitialData() {
+        //no-op
+    }
 }