code: public synchronized boolean addNode(Node nodeToAdd, int parentStreamID, boolean exclusive) {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "addNode entry: Node to add: " + nodeToAdd);
          }
  
          if (nodeToAdd == null) {
              return false;
          }
  
          Node parentNode = root.findNode(parentStreamID);
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "found parent node of: " + parentNode.hashCode());
          }
  
          if (parentNode != null) {
  
              // found the node that is to be the parent
              nodeToAdd.setParent(parentNode, true);
  
              if (exclusive) {
  
                  makeExclusiveDependency(nodeToAdd, parentNode);
  
              } else {
  
                  // need to start the write counting over, since a new node was added at this level, and re-sort
                  parentNode.clearDependentsWriteCount();
                  parentNode.sortDependents();
                  // special debug - too verbose for big trees
                  //if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  //    Tr.debug(tc, "addNode after sorting: tree is now:" + dumpTree());
                  //}
  
              }
              return true;
          }
  
          return false;
      }
docs: Add a node to the tree under the given parent.
  According to the spec, If exclusive is true then:
  1. make the added node the only child of the parent.
  2. all previous children of the parent become children of the added node.
  
  If the node was added to a set of current children, then restart the priority counting, since this added node's write count will start at 0
  
  @param node
  @param parentStreamID
  @param exclusive