NodeKey lockKey = added.getKey();
ModeShapeLock lock = new ModeShapeLock(lockKey, props);
locksByNodeKey.put(lock.getLockedNodeKey(), lock);
}
} else if (change instanceof NodeRemoved) {
NodeRemoved removed = (NodeRemoved)change;
Path removedPath = removed.getPath();
if (locksPath.isAncestorOf(removedPath)) {
// This was a lock that was removed ...
if (locksToDelete == null) locksToDelete = new HashSet<NodeKey>();
// The key of the locked node is embedded in the lock key ...
NodeKey lockedNodeKey = lockedNodeKeyFromLockKey(removed.getKey());
locksByNodeKey.remove(lockedNodeKey);
}
}
// Lock nodes are never moved, and properties added or removed, and the only properties changed are those
// related to lock expiration, which we don't care about.