FileQueueStore class

File-backed QueueStore that persists queued requests as JSON.

The queue is loaded synchronously during construction so startup code can inspect or flush it immediately. Persistence failures are swallowed and do not throw.

Implemented types

Constructors

FileQueueStore.new(File file)
Creates a queue store backed by file.

Properties

file File
The JSON file used to persist the queue.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clears the queue and persists the empty state.
override
enqueue(QueuedRequest r) Future<void>
Appends r to the queue and persists the whole file.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peekAll() Future<List<QueuedRequest>>
Returns an immutable snapshot of the queue.
override
peekAllSync() List<QueuedRequest>
Returns an immutable snapshot of the queue synchronously.
removeAt(int index) Future<void>
Removes the queued item at index and persists the change.
override
toString() String
A string representation of this object.
inherited

Operators

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