RestRequestSqliteCacheManager class
Constructors
- RestRequestSqliteCacheManager(String databaseName, {required DatabaseFactory databaseFactory, Duration? processingInterval, bool? serialProcessing})
Properties
- createdAtColumn → String
-
The file name for the database used.
finalinherited
- databaseFactory → DatabaseFactory
-
Access the SQLite,
instance agnostically across platforms.
finalinherited
- databaseName → String
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- lockedColumn → String
-
finalinherited
- orderByStatement → String
-
no setterinherited
- primaryKeyColumn → String
-
finalinherited
- processingInterval → Duration
-
Time between attempts to resubmit a request. Defaults to 5 seconds.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serialProcessing → bool
-
When
true
, results are processed one at a time in the order in which they were created. Defaultstrue
.finalinherited - tableName → String
-
finalinherited
- updateAtColumn → String
-
finalinherited
Methods
-
deleteUnprocessedRequest(
int id) → Future< bool> -
Delete job in queue. This is a destructive action and cannot be undone.
id
is retrieved from theprimaryKeyColumn
.inherited -
getDb(
) → Future< Database> -
inherited
-
migrate(
) → Future< void> - Prepare schema.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareNextRequestToProcess(
) → Future< Request?> -
Discover most recent unprocessed job in database convert it back to an HTTP request.
This method also locks the row to make it idempotent to subsequent processing.
inherited
-
sqliteToRequest(
Map< String, dynamic> data) → Request -
Builds a client-consumable
RequestMethod
from SQLite row output -
toString(
) → String -
A string representation of this object.
inherited
-
unprocessedRequests(
{bool onlyLocked = false}) → Future< List< Map< >String, dynamic> > -
Returns row data for all unprocessed job in database.
Accessing this list can be useful determining queue length.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited