JBoss.org Community Documentation
By default, before inserting a new node into the tree or removing an existing node from the
tree, JBoss Cache will only attempt to acquire a read lock on the new node's parent node.
This approach does not treat child nodes as an integral part of a parent node's state.
This approach allows greater concurrency if nodes are frequently added or removed, but
at a cost of lesser correctness. For use cases where greater correctness is necessary, JBoss
Cache provides a configuration option
LockParentForChildInsertRemove
.
If this is set to
true
, insertions and removals of child nodes
require the acquisition of a
write lock
on the parent node.
In addition to the above, in version 2.1.0 and above, JBoss Cache offers the ability to override this
configuration on a per-node basis. See
Node.setLockForChildInsertRemove()
and it's
corresponding javadocs for details.