LiveIndexCache class

Stamp storage for the live-index cache: no tree knowledge and no refresh logic, just the generation algebra described above.

Refresh protocol: call beginRefresh once for a parent, then writeSlot for each live member of that list. Every readSlot is then valid until the next bump invalidates the whole cache.

Constructors

LiveIndexCache()

Properties

generation → int
The current validity generation, compared against the parent and slot stamps to decide whether a cached answer can be trusted.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

beginRefresh(int parentNid) → void
Stamps parentNid's list as refreshed at the current generation. The caller then writes every live member via writeSlot.
bump() → void
Invalidates every cached list with a single increment. Called by every mutator after its raw-list writes, and by the pending-deletion flip forwarders. The library doc's invariants explain why that placement is load-bearing rather than incidental.
isParentFresh(int parentNid) → bool
Whether parentNid's list (kRootListParentNid for roots) was refreshed at the current generation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readSlot(int nid) → int
Returns nid's cached live index, or -1 when its slot was not written at the current generation (not a live member of the list its parent stamp covers).
reset() → void
Drops every array and zeroes the roots stamp. Called from TreeController._clear (which covers VisibleOrderBuffer.reset's in-place roots.clear(), a raw-list write outside the mutating methods) and transitively from dispose. The generation is NOT rewound: monotonicity plus zero-filled regrowth is what makes stale slots unforgeable.
resizeForCapacity(int newCapacity) → void
Grows every per-nid array to at least newCapacity, zero-filled (zero stamps are stale by the generation invariant). Wired into TreeController._onStoreCapacityGrew, the same lockstep protocol every other per-nid array uses.
toString() → String
A string representation of this object.
inherited
writeSlot(int nid, int liveIndex) → void
Records liveIndex for nid at the current generation.

Operators

operator ==(Object other) → bool
The equality operator.
inherited