docs: protected void processParentEvent() throws Exception {
          // get current children snapshot and reset this watch.
          Set<String> children = new TreeSet<String>(m_zk.getChildren(m_rootNode, m_parentWatch));
          // intersect to get newChildren and update m_lastChildren to the current set.
          Set<String> newChildren = new HashSet<String>(children);
          newChildren.removeAll(m_lastChildren);
          m_lastChildren = children;
  
          List<ByteArrayCallback> callbacks = new ArrayList<ByteArrayCallback>();
          for (String child : children) {
              ByteArrayCallback cb = new ByteArrayCallback();
              // set watches on new children.
              if(newChildren.contains(child)) {
                  m_zk.getData(ZKUtil.joinZKPath(m_rootNode, child), m_childWatch, cb, null);
              } else {
                  m_zk.getData(ZKUtil.joinZKPath(m_rootNode, child), false, cb, null);
              }
  
              callbacks.add(cb);
          }
  
          HashMap<Integer, LeaderCallBackInfo> cache = new HashMap<Integer, LeaderCallBackInfo>();
          for (ByteArrayCallback callback : callbacks) {
              try {
                  byte payload[] = callback.get();
                  // During initialization children node may contain no data.
                  if (payload == null) {
                      continue;
                  }
                  String data = new String(payload, "UTF-8");
                  LeaderCallBackInfo info = LeaderCache.buildLeaderCallbackFromString(data);
                  Integer partitionId = getPartitionIdFromZKPath(callback.getPath());
                  cache.put(partitionId, info);
              } catch (KeeperException.NoNodeException e) {
                  // child may have been deleted between the parent trigger and getData.
              }
          }
  
          m_publicCache = ImmutableMap.copyOf(cache);
          if (m_cb != null) {
              m_cb.run(m_publicCache);
          }
      }