FileRegenerationQueue class
Persistent single-host filesystem queue with an O(1) persistent idempotency index, indexed pending job resolution, batch scheduling, and exclusive lock fencing.
Multi-instance note: This queue uses operating-system file locks and is designed for single-host deployments. Distributed multi-instance deployments require an external database or Redis queue adapter with distributed locks.
- Implemented types
Constructors
- FileRegenerationQueue(Directory directory, {int maxProcessingJobs = 4})
Properties
- capabilities → QueueCapabilities
-
no setteroverride
- directory → Directory
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxProcessingJobs → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
String id) → Future< RegenerationJob> -
override
-
checkpoint(
) → Future< void> -
Forces an atomic compaction checkpoint of the write-ahead journal to a snapshot.
override
-
claimNext(
{DateTime? now, Duration lease = const Duration(minutes: 2)}) → Future< RegenerationJob?> -
override
-
cleanupCompleted(
{Duration maxAge = const Duration(days: 7)}) → Future< int> -
override
-
complete(
String id, {required String leaseToken}) → Future< RegenerationJob> -
override
-
enqueue(
{required String siteId, required String tenantId, required String path, required String routeId, required List< String> tags, required String idempotencyKey, String? sourceVersion, int maxAttempts = 5, DateTime? now}) → Future<RegenerationJob> -
override
-
enqueueAll(
List< RegenerationJobRequest> requests, {DateTime? now}) → Future<List< RegenerationJob> > -
override
-
fail(
String id, {required String leaseToken, required String errorCode, DateTime? now}) → Future< RegenerationJob> -
override
-
getById(
String id) → Future< RegenerationJob?> -
override
-
list(
) → Future< List< RegenerationJob> > -
override
-
metrics(
) → Future< QueueMetrics> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuildIndexes(
) → Future< void> - Reconstructs corrupted or missing queue indexes from stored job records.
-
recover(
) → Future< QueueRecoveryReport> -
Recovers persistent queue state by validating journal entries and reconciling stored jobs.
override
-
renewLease(
String id, {required String leaseToken, Duration extension = const Duration(minutes: 2), DateTime? now}) → Future< RegenerationJob> -
Extends the lease duration of an actively processing job owned by
leaseToken.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited