Reconciler class
The range-reconciliation state machine, pure over an injected digest function so it unit-tests without an engine.
The exchange: the initiator probes a whole collection as one range. For each probe, the responder compares fingerprints — a match ends that range; a small (or depth-capped) mismatch becomes a leaf, where the responder ships its records and asks for the peer's; anything else splits at the HLC-time midpoint of the responder's own data and probes back one level deeper. Every message handles a whole level, so a difference is found in O(log n) round trips, and maxProbesPerReply keeps a fully divergent pair from exploding the probe count — overflow ranges leaf-ship instead.
Constructors
-
Reconciler({required Future<
RangeDigest> digest(String? fromHlc, String? toHlc), int leafCount = 32, int maxDepth = 24, int maxProbesPerReply = 64}) -
Creates a reconciler over
digest(usuallyCollection.rangeDigest).
Properties
-
digest
→ Future<
RangeDigest> Function(String? fromHlc, String? toHlc) -
Summarises the local records in a half-open HLC range.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- leafCount → int
-
Ranges at or below this many records (on either side) stop splitting and
ship records.
final
- maxDepth → int
-
Split depth cap: beyond it a range ships records no matter its size.
final
- maxProbesPerReply → int
-
Cap on reply probes per message; overflow ranges leaf-ship instead.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handleProbes(
List< RangeProbe> probes) → Future<ReconcilePlan> -
Handles the peer's
probesand produces this side's plan. -
initialProbe(
) → Future< RangeProbe?> - The opening probe covering everything this side holds.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited