RecordingObserver<TId> class

A BatchFetcherObserver that records what happened, for assertions.

Inheritance

Constructors

RecordingObserver()
Creates an empty recorder.

Properties

batchErrors List<Object?>
One entry per request that finished, with the error if it threw.
final
batches List<List<TId>>
One entry per request started, holding the ids it carried.
final
gaveUp List<TId>
Ids the retry policy gave up on.
final
hashCode int
The hash code for this object.
no setterinherited
retries List<(TId, int, Duration)>
Retries scheduled, as (id, attempt, delay).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unsettled List<(TId, int, Duration)>
Unsettled values re-queued, as (id, attempt, delay).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onBatchEnd(Object? key, List<TId> ids, {Object? error}) → void
A request finished. error is set if the whole batch threw.
override
onBatchStart(Object? key, List<TId> ids) → void
A request is about to be sent for ids under key.
override
onGaveUp(TId id, Object error) → void
The retry policy has given up on id.
override
onRetryScheduled(TId id, int attempt, Duration delay) → void
id is being retried after a failure, after delay.
override
onUnsettled(TId id, int attempt, Duration delay) → void
id resolved to a value its settle policy considers non-final, and will be re-fetched.
override
toString() String
A string representation of this object.
inherited

Operators

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