LocalRestApiModelAsyncSavingManager class
Manages asynchronous saving operations with a queue system.
This class handles save and delete operations asynchronously using a queue, processing them one by one with a timer.
非同期保存操作をキューシステムで管理します。
このクラスは保存と削除の操作を非同期でキューを使用して処理し、 タイマーで1つずつ処理します。
- Inheritance
-
- Object
- AsyncSavingManager
- LocalRestApiModelAsyncSavingManager
Constructors
- LocalRestApiModelAsyncSavingManager({required RestApiModelAdapter adapter, Duration timerInterval = const Duration(milliseconds: 1000)})
- Creates a new AsyncSavingManager.
Properties
- adapter → RestApiModelAdapter
-
The adapter to use for saving and deleting documents.
final
- database → NoSqlDatabase
-
The database instance for loading documents.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxRetryCount → int
-
The maximum retry count.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Dispose the manager and clean up resources.
inherited
-
enqueueOnDelete(
ModelAdapterDocumentQuery query) → Future< void> -
Add a delete operation to the queue.
inherited
-
enqueueOnSave(
ModelAdapterDocumentQuery query) → Future< void> -
Add a save operation to the queue.
inherited
-
initialize(
) → Future< void> -
Initialize the manager and start the timer.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDelete(
ModelAdapterDocumentQuery query) → Future< void> -
Callback for deleting documents.
override
-
onLoad(
) → Future< List< ModelAdapterDocumentQuery> > -
Callback for loading initial queue items.
override
-
onQueueChanged(
List< ModelAdapterDocumentQuery> queue) → Future<List< ModelAdapterDocumentQuery> > -
Callback when queue is updated.
override
-
onSave(
ModelAdapterDocumentQuery query, DynamicMap value) → Future< void> -
Callback for saving documents.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited