ZfaRevisionTracker class final
Per-id revision bookkeeping that flags a gap in a ZfaLink stream (ZFA-009).
A link delivers a monotonic ZfaRevisionTracker.observe revision per entity id. The first envelope for an id is always contiguous; after that an envelope is contiguous only when its revision is at most one past the last applied revision. A skipped revision means a delta was dropped and the receiver must resync that id from a full snapshot.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
commit(
String id, int revision) → void -
Records
revisionas the last applied foridafter a successful apply. -
hasGap(
String id, int revision) → bool -
Whether
revisionforidwould skip a revision (a gap) without observing it. -
isContiguous(
String id, int revision) → bool -
Whether
revisionforidis contiguous with the last applied revision (the first forid, or exactly one past it) — without recording it. -
isDuplicateOrRegressive(
String id, int revision) → bool -
Whether
revisionforidis a duplicate/regressive delivery (at or below the last applied revision) — without recording it. -
lastApplied(
String id) → int? -
The last revision applied for
id, ornullwhen none has been. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observe(
String id, int revision) → bool -
Records
revisionas the last applied forid. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited