Search in sources :

Example 1 with AbstractDOMDataTreeChangeListenerRegistration

use of org.opendaylight.controller.md.sal.dom.spi.AbstractDOMDataTreeChangeListenerRegistration in project controller by opendaylight.

the class AbstractDOMStoreTreeChangePublisher method lookupAndNotify.

private void lookupAndNotify(final List<PathArgument> args, final int offset, final RegistrationTreeNode<AbstractDOMDataTreeChangeListenerRegistration<?>> node, final DataTreeCandidate candidate) {
    if (args.size() != offset) {
        final PathArgument arg = args.get(offset);
        final RegistrationTreeNode<AbstractDOMDataTreeChangeListenerRegistration<?>> exactChild = node.getExactChild(arg);
        if (exactChild != null) {
            lookupAndNotify(args, offset + 1, exactChild, candidate);
        }
        for (RegistrationTreeNode<AbstractDOMDataTreeChangeListenerRegistration<?>> c : node.getInexactChildren(arg)) {
            lookupAndNotify(args, offset + 1, c, candidate);
        }
    } else {
        notifyNode(candidate.getRootPath(), node, candidate.getRootNode());
    }
}
Also used : AbstractDOMDataTreeChangeListenerRegistration(org.opendaylight.controller.md.sal.dom.spi.AbstractDOMDataTreeChangeListenerRegistration) PathArgument(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument)

Aggregations

AbstractDOMDataTreeChangeListenerRegistration (org.opendaylight.controller.md.sal.dom.spi.AbstractDOMDataTreeChangeListenerRegistration)1 PathArgument (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument)1