TransactionRetry class final Sessions and transactions

Explicit opt-in: callback logic must be safe to repeat after rollback. The budget counts every scheduled retry, including commit-only retries.

Constructors

TransactionRetry({int maxAttempts = 3, Duration timeout = const Duration(seconds: 30), Duration delay = const Duration(milliseconds: 10), Duration maxDelay = const Duration(milliseconds: 250)})
Enables bounded retries only for callbacks safe to repeat after rollback.
const

Properties

delay → Duration
Initial backoff, randomized between approximately half and all this delay.
final
hashCode → int
The hash code for this object.
no setterinherited
maxAttempts → int
Initial attempt plus callback replays and COMMIT-only retries combined.
final
maxDelay → Duration
Upper bound as the backoff doubles after each retry.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
Total budget including connection acquisition, callbacks, SQL and backoff.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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