Class NotifyingDataChangeListener

  • All Implemented Interfaces:
    AutoCloseable, EventListener, org.opendaylight.mdsal.binding.api.DataTreeChangeListener<org.opendaylight.yangtools.yang.binding.DataObject>

    public final class NotifyingDataChangeListener
    extends Object
    implements AutoCloseable, org.opendaylight.mdsal.binding.api.DataTreeChangeListener<org.opendaylight.yangtools.yang.binding.DataObject>
    This class provides methods for checking or waiting for various md-sal operations to complete. Once an instance is created one must invoke the registerDataChangeListener method with a DataBroker.
    • Constructor Detail

      • NotifyingDataChangeListener

        public NotifyingDataChangeListener​(org.opendaylight.mdsal.common.api.LogicalDatastoreType type,
                                           int mask,
                                           org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> iid,
                                           List<NotifyingDataChangeListener> waitList)
      • NotifyingDataChangeListener

        public NotifyingDataChangeListener​(org.opendaylight.mdsal.common.api.LogicalDatastoreType type,
                                           org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> iid,
                                           List<NotifyingDataChangeListener> waitList)
        Create a new NotifyingDataChangeListener.
        Parameters:
        type - DataStore type
        iid - of the md-sal object we're waiting for
        waitList - for tracking outstanding changes
    • Method Detail

      • modify

        public void modify​(org.opendaylight.mdsal.common.api.LogicalDatastoreType newType,
                           org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> newIid)
        Completely reset the state of this NotifyingDataChangeListener.
        Parameters:
        newType - DataStore type
        newIid - of the md-sal object we're waiting for
      • setlisten

        public void setlisten​(boolean value)
      • setMask

        public void setMask​(int mask)
      • onDataTreeChanged

        public void onDataTreeChanged​(Collection<org.opendaylight.mdsal.binding.api.DataTreeModification<org.opendaylight.yangtools.yang.binding.DataObject>> changes)
        Specified by:
        onDataTreeChanged in interface org.opendaylight.mdsal.binding.api.DataTreeChangeListener<org.opendaylight.yangtools.yang.binding.DataObject>
      • isCreated

        public boolean isCreated​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
      • isUpdated

        public boolean isUpdated​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
      • isRemoved

        public boolean isRemoved​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
      • clear

        public void clear()
      • registerDataChangeListener

        public void registerDataChangeListener​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker)