ReducerCaller class

Constructors

ReducerCaller(SpacetimeDbConnection _connection, {OfflineStorage? offlineStorage, MutationHandler? mutationHandler})

Properties

defaultTimeout Duration
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String reducerName, Uint8List args, {Duration? timeout, bool dropIfOffline = false, List<OptimisticChange>? optimisticChanges}) Future<TransactionResult>
callWithBytes(String reducerName, Uint8List args, {Duration? timeout, String? requestId}) Future<TransactionResult>
completeRequest(int requestId, TransactionResult result) bool
Completes the pending request with the given requestId. Returns true if the request was found and completed, false if no pending request matched (e.g. requestId=0 from a protocol-level server error).
dispose() → void
failAllPendingRequests(String reason) → void
failOldestPendingByReducerName(String reducerName, TransactionResult result) bool
Fail the oldest in-flight request for the given reducer name. Used when the server returns a protocol-level failure (e.g. "no such reducer") with requestId=0 because it cannot associate the failure with a specific outbound call. Without this fallback, such failures silently miss the requestId lookup in completeRequest and the pending request sits until _timeoutRequest fires 10s later.
getUuidForRequest(int requestId) String?
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