ReplayGuard class abstract interface

The consumer-side record that makes SPEC §7.2 item 11 true.

An interface, so a deployment can back it with Redis, Postgres, or anything that survives a process restart. InMemoryReplayGuard is the default and is correct for a single-process consumer; it is not correct behind a load balancer, where two replicas would each accept the same document once.

Implementers

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

claim(String id, String digest, DateTime? retainUntil, DateTime now) → Future<ReplayVerdict>
Claim id for execution on behalf of a document with identity digest.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordResponse(String id, Object? response) → Future<void>
Attach the response a completed execution produced, so a later duplicate can be answered with it per §7.2 (Disposition of a duplicate) rather than merely absorbed in silence.
release(String id, String digest) → Future<void>
Release a claim whose execution is not to stand — for example a refusal the consumer marked retryable, where §8.4 has just invited the producer to re-send the same bytes. Without this, that invited retry would come back as an absorbed duplicate carrying the same failure forever.
toString() → String
A string representation of this object.
inherited

Operators

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