InvalidationTree

The purpose of this data structure is to store which nodes changed and need to be synchronized, but limit the memory consumption via the sizeLimit, which determines the maximum number of nodes in a subtree.

If there are many changes in one part of the model (changed subtree size sizeLimit), we do not keep track of the individual changes anymore and just synchronize the entire subtree.

Constructors

Link copied to clipboard
constructor(sizeLimit: Int)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun invalidate(containmentPath: LongArray)

Marks the node stored in the given containment path as changed.

fun invalidate(tree: ITree, nodeId: Long)

Marks the node as changed.

Link copied to clipboard
open override fun needsDescentIntoSubtree(subtreeRoot: INode): Boolean

Checks if a subtree needs synchronization.

Link copied to clipboard
open override fun needsSynchronization(node: INode): Boolean

Checks if a single node needs synchronization.