// need to make a note of ALL nodes created here!!
List<NodeSPI> createdNodes = new LinkedList<NodeSPI>();
// we need to mark new nodes created as deleted since they are only created to form a path to the node being removed, to
// create a lock.
boolean created = acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, true, true, createdNodes, true);
TransactionEntry entry = null;
if (ctx.getGlobalTransaction() != null)
{
entry = tx_table.get(ctx.getGlobalTransaction());
entry.addRemovedNode(fqn);
for (NodeSPI nodeSPI : createdNodes)
{
entry.addRemovedNode(nodeSPI.getFqn());
nodeSPI.markAsDeleted(true);
}
}
acquireLocksOnChildren(peekNode(ctx, fqn, false, false, false), NodeLock.LockType.WRITE, ctx, entry, true);