An internally used helper class for an atomic update of an {@link InMemoryNodeModel}.
This class performs updates on the node structure of a node model consisting of {@link ImmutableNode} objects. Because the nodes themselves cannot bechanged updates are achieved by replacing parts of the structure with new nodes; the new nodes are copies of original nodes with the corresponding manipulations applied. Therefore, each update of a node in the structure results in a new structure in which the affected node is replaced by a new one, and this change bubbles up to the root node (because all parent nodes have to be replaced by instances with an updated child reference).
A single update of a model may consist of multiple changes on nodes. For instance, a remove property operation can include many nodes. There are some reasons why such updates should be handled in a single "transaction" rather than executing them on altered node structures one by one:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|