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

ZfaRevisionTracker()

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 revision as the last applied for id after a successful apply.
hasGap(String id, int revision) → bool
Whether revision for id would skip a revision (a gap) without observing it.
isContiguous(String id, int revision) → bool
Whether revision for id is contiguous with the last applied revision (the first for id, or exactly one past it) — without recording it.
isDuplicateOrRegressive(String id, int revision) → bool
Whether revision for id is a duplicate/regressive delivery (at or below the last applied revision) — without recording it.
lastApplied(String id) → int?
The last revision applied for id, or null when none has been.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe(String id, int revision) → bool
Records revision as the last applied for id.
toString() → String
A string representation of this object.
inherited

Operators

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