public final void addChild(Object nodeName, InternalNode<K, V> nodeToAdd) { delegate.addChild(nodeName, nodeToAdd); }
public final void addChild(InternalNode<K, V> child) { delegate.addChild(child); }
public final void addChild(InternalNode<K, V> child, boolean safe) { delegate.addChild(child, safe); }
@Override @SuppressWarnings("unchecked") protected void updateNode(Fqn fqn, InvocationContext ctx, DataContainer dataContainer) { if (fqn.isRoot()) { dataContainer.setRoot(node); } else if (!isFlagSet(DELETED)) { InternalNode parent = lookupParent(fqn, ctx, dataContainer); parent.addChild(node, true); // we know this is safe since we calculated the parent from the child. No need to have the parent re-do checks when adding the child again. } } }
@Override @SuppressWarnings("unchecked") public InternalNode<K, V> createChildNode(Fqn fqn, InternalNode<K, V> parent, InvocationContext ctx, boolean attachToParent) { InternalNode<K, V> child; if (fqn == null) throw new IllegalArgumentException("null child fqn"); child = dataContainer.peekInternalNode(fqn, false); if (child == null) { cache.getNotifier().notifyNodeCreated(fqn, true, ctx); InternalNode<K, V> newChild = createInternalNode(fqn); if (attachToParent) parent.addChild(newChild); // addChild actually succeeded! child = newChild; if (trace) log.trace("Created new child with fqn [" + fqn + "]"); // notify if we actually created a new child cache.getNotifier().notifyNodeCreated(fqn, false, ctx); } return child; } }
parent.getDelegationTarget().addChild(ref);
InternalNode descendant = cache.getNode(descFqn).getDelegationTarget(); prepareContextOptions(); ancestor.addChild(name, descendant);
parent.addChild(node, true); // we know this is safe since we calculated the parent from the child. No need to have the parent re-do checks when adding the child again.