QueueManager class

Manages sync operation queue

Constructors

QueueManager(LocalStorage _localStorage, {void onEvent(SyncEvent)?})

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

getPendingOperations() Future<List<SyncOperation>>
Get all pending operations
incrementRetryCount(int operationId) Future<void>
Increment retry count for an operation
markAsFailed(int operationId, String error) Future<void>
Mark operation as failed
markAsSynced(int operationId) Future<void>
Mark operation as synced
markAsSyncing(int operationId) Future<void>
Mark operation as syncing
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queueDelete({required String collectionName, required String recordId}) Future<void>
Add delete operation to queue
queueDeltaUpdate({required String collectionName, required String recordId, required Map<String, dynamic> delta, required int baseVersion}) Future<void>
Add delta update operation to queue (partial update).
queueInsert({required String collectionName, required String recordId, required Map<String, dynamic> data}) Future<void>
Add insert operation to queue
queueInsertBatch({required String collectionName, required List<Map<String, dynamic>> items}) Future<void>
Add multiple insert operations to queue in a batch
queueUpdate({required String collectionName, required String recordId, required Map<String, dynamic> data}) Future<void>
Add update operation to queue
resetFailedOperations() Future<void>
Reset failed operations to pending (for retry after reconnect)
toString() String
A string representation of this object.
inherited

Operators

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