Search in sources :

Example 1 with ClusteredDataChangeListener

use of org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener in project controller by opendaylight.

the class AbstractForwardedDataBroker method registerDataChangeListener.

public ListenerRegistration<DataChangeListener> registerDataChangeListener(final LogicalDatastoreType store, final InstanceIdentifier<?> path, final DataChangeListener listener, final DataChangeScope triggeringScope) {
    final DOMDataChangeListener domDataChangeListener;
    if (listener instanceof ClusteredDataChangeListener) {
        domDataChangeListener = new TranslatingClusteredDataChangeInvoker(store, path, listener, triggeringScope);
    } else {
        domDataChangeListener = new TranslatingDataChangeInvoker(path, listener);
    }
    final YangInstanceIdentifier domPath = codec.toYangInstanceIdentifierBlocking(path);
    final ListenerRegistration<DOMDataChangeListener> domRegistration = domDataBroker.registerDataChangeListener(store, domPath, domDataChangeListener, triggeringScope);
    return new ListenerRegistrationImpl(listener, domRegistration);
}
Also used : ClusteredDataChangeListener(org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener) ClusteredDOMDataChangeListener(org.opendaylight.controller.md.sal.dom.api.ClusteredDOMDataChangeListener) DOMDataChangeListener(org.opendaylight.controller.md.sal.dom.api.DOMDataChangeListener) YangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)

Aggregations

ClusteredDataChangeListener (org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener)1 ClusteredDOMDataChangeListener (org.opendaylight.controller.md.sal.dom.api.ClusteredDOMDataChangeListener)1 DOMDataChangeListener (org.opendaylight.controller.md.sal.dom.api.DOMDataChangeListener)1 YangInstanceIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)1