+ Collection<DataChangeListenerRegistration<?>> potential = listenerRegistrationNode.getListeners();
+ if(!potential.isEmpty()) {
+ final Set<DataChangeListenerRegistration<?>> toNotify = new HashSet<>(potential.size());
+ for(DataChangeListenerRegistration<?> listener : potential) {
+ if(scope.equals(listener.getScope())) {
+ toNotify.add(listener);
+ }
+ }
+
+ if (!toNotify.isEmpty()) {
+ tasks.add(new ChangeListenerNotifyTask(toNotify, event));
+ }
+ }