public void register(Integer pid, Integer parentPid) {
      List<Integer> children = BY_PARENT.get(parentPid);
      if (children == null) BY_PARENT.put(parentPid, children = new LinkedList<>());
      children.add(pid);
    }
public void register(Integer pid, Integer parentPid)