createNodeInCache(cache, newParentFqn);
if (trace) log.tracef("The new parent (%s) did not exists, was created", newParentFqn);
}
// create an empty node for this new parent
Fqn newFqn = Fqn.fromRelativeElements(newParentFqn, nodeToMoveFqn.getLastElement());
createNodeInCache(cache, newFqn);
Node<K, V> newNode = getNode(cache, newFqn);
Map<K, V> oldData = nodeToMove.getData();
if (oldData != null && !oldData.isEmpty()) newNode.putAll(oldData);
for (Object child : nodeToMove.getChildrenNames()) {
// move kids
if (trace) log.tracef("Moving child %s", child);
Fqn oldChildFqn = Fqn.fromRelativeElements(nodeToMoveFqn, child);
move(cache, oldChildFqn, newFqn);
}
removeNode(cache, nodeToMoveFqn);
success = true;
} finally {