X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fapi%2FDataTreeChangeListener.java;h=222242e37c38e26cdca3e57ac1ed7386de5ac6f2;hb=refs%2Fchanges%2F11%2F80211%2F6;hp=93ab968451be9882e91379c867ae11a13dc111ad;hpb=dea515c8870769408b9bea29f555d6b71ff43211;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeChangeListener.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeChangeListener.java index 93ab968451..222242e37c 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeChangeListener.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeChangeListener.java @@ -9,14 +9,17 @@ package org.opendaylight.controller.md.sal.binding.api; import java.util.Collection; import java.util.EventListener; -import javax.annotation.Nonnull; +import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.binding.DataObject; /** * Interface implemented by classes interested in receiving notifications about - * data tree changes. This interface differs from {@link DataChangeListener} - * 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 and allow more flexible consumption of change event. + * + *

+ * 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 ClusteredDataTreeChangeListener}. */ public interface DataTreeChangeListener extends EventListener { /** @@ -34,11 +37,12 @@ public interface DataTreeChangeListener extends EventListe * to recover from such events. Event producers are expected to exert reasonable * effort to suppress such events. * + *

* In other words, it is completely acceptable to observe * a {@link DataObjectModification}, while the state observed before and * after- data items compare as equal. * * @param changes Collection of change events, may not be null or empty. */ - void onDataTreeChanged(@Nonnull Collection> changes); + void onDataTreeChanged(@NonNull Collection> changes); }