Report non-present initial data in (DOM)DataTreeChangeListener
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / DataTreeChangeListener.java
index b6ae850e36945996b615461db125fc7dd2efae0b..3e066757d6a27353a35b597a42ab9cd7243f9612 100644 (file)
@@ -41,4 +41,16 @@ public interface DataTreeChangeListener<T extends DataObject> extends EventListe
      * @param changes Collection of change events, may not be null or empty.
      */
     void onDataTreeChanged(@NonNull Collection<DataTreeModification<T>> 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
+    }
 }