KeyedTransactionLifecycleChecker<KeyType, ResourceType> class

Tracks outstanding keyed transactions and their attributed resources.

Tests call observeRequest for each accepted request and observeResponse for every accepted response beat. A response only releases a key when its caller-provided completes argument is true. observeCancellation records an explicit terminal cancellation. Every method is deterministic and does not require a particular hardware interface or protocol payload type.

Constructors

KeyedTransactionLifecycleChecker()

Properties

failures → List<TransactionLifecycleFailure<KeyType, ResourceType>>
Failures in observation order.
no setter
hashCode → int
The hash code for this object.
no setterinherited
outstanding → Map<KeyType, ResourceType>
Outstanding key-to-resource ownership in insertion-independent form.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observeCancellation({required KeyType key, required int cycle}) → ResourceType?
Records an explicit cancellation and returns its released resource.
observeRequest({required KeyType key, required ResourceType resource, required int cycle}) → void
Records one accepted request and its selected resource.
observeResponse({required KeyType key, required bool completes, required int cycle}) → ResourceType?
Records one accepted response beat and returns its attributed resource.
toString() → String
A string representation of this object.
inherited
verifyComplete({required int cycle}) → List<TransactionLifecycleFailure<KeyType, ResourceType>>
Returns failures for requests that never reached a terminal outcome.

Operators

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