Interface DOMDataTreeChangeListener

  • All Superinterfaces:
    EventListener
    All Known Subinterfaces:
    ClusteredDOMDataTreeChangeListener

    @Deprecated(forRemoval=true)
    public interface DOMDataTreeChangeListener
    extends EventListener
    Deprecated, for removal: This API element is subject to removal in a future version.
    Interface implemented by classes interested in receiving notifications about data tree changes. This interface provides a cursor-based view of the change, which has potentially lower overhead.

    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 ClusteredDOMDataTreeChangeListener.

    • Method Detail

      • onDataTreeChanged

        void onDataTreeChanged​(@NonNull Collection<DataTreeCandidate> changes)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Invoked when there was data change for the supplied path, which was used to register this listener.

        This method may be also invoked during registration of the listener if there is any pre-existing data in the conceptual data tree for supplied path. This initial event will contain all pre-existing data as created.

        A data change event may be triggered spuriously, e.g. such that data before and after compare as equal. Implementations of this interface are expected 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 DataTreeCandidateNode, which reports a ModificationType other than UNMODIFIED, while the before- and after- data items compare as equal.

        Parameters:
        changes - Collection of change events, may not be null or empty.