RequestQueueManager class

Manages multiple request queues for different types of API operations.

This class provides three independent queues with different concurrency and delay settings optimized for different use cases:

  • foregroundQueue: For remoteFirst save operations
  • loadQueue: For remoteFirst load operations
  • backgroundQueue: For localFirst sync operations

Features:

  • Smart capacity management with queue-specific timeouts
  • Duplicate detection via idempotency keys
  • Connectivity-responsive queue clearing/restoration

Constructors

RequestQueueManager({SynquillStorageConfig? config})
Creates a new RequestQueueManager with configured queues.

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

clearQueuesOnDisconnect() Future<void>
Clears all queues when connectivity is lost.
dispose() Future<void>
Disposes all queues.
enqueueTask<T>(NetworkTask<T> task, {QueueType? queueType}) Future<T>
Enqueues a NetworkTask to the appropriate queue.
getQueueStats() Map<QueueType, QueueStats>
Gets statistics for all queues.
joinAll() Future<void>
Waits for all queues to complete their current tasks.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restoreQueuesOnConnect() Future<void>
Restores queue processing when connectivity returns.
toString() String
A string representation of this object.
inherited

Operators

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