code: @Override
    public Set<Long> getClientsForNotification(NamespaceNotification n) {
      String eventPath = NotifierUtils.getBasePath(n);
      if (LOG.isDebugEnabled()) {
        LOG.debug("getClientsForNotification called for " +
            NotifierUtils.asString(n) + ". Searching at path " + eventPath);
      }
      List<String> ancestors = NotifierUtils.getAllAncestors(eventPath);
      Set<Long> clients = new HashSet<Long>();
      synchronized (subscriptions) {
        for (String path : ancestors) {
          Set<Long> clientsOnPath = subscriptions.get(new NamespaceEventKey(path, n.type));
          if (clientsOnPath != null) {
            clients.addAll(clientsOnPath);
          }
        }
      }
      return clients;
    }
docs: Used to get the set of clients for which a notification should be sent.
  While iterating over this set, you should use synchronized() on it to
  avoid data inconsistency (or ordering problems).
  
  @param n the notification for which we want to get the set of clients
  @return the set of clients or null if there are no clients subscribed
  for this notification