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);
}
Aggregations