BaseQueueDriver class abstract
Abstract base driver with common functionality
- Implemented types
- Implementers
Constructors
- BaseQueueDriver({required DriverConfig config, QueueMetrics? metrics, FailedJobHandler? dlqHandler, QueueMiddlewarePipeline? middleware})
Properties
- config → DriverConfig
-
final
- dlqHandler → FailedJobHandler?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- metrics → QueueMetrics?
-
final
- middleware → QueueMiddlewarePipeline?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → Future< void> - Clear all jobs (for testing)
-
createJobContext(
QueueJob job, {Duration? delay}) → JobContext - Create job context
-
dispose(
) → Future< void> - Dispose resources
-
executeJob(
JobContext context) → Future< void> - Execute job with full lifecycle
-
generateJobId(
) → String - Generate unique job ID
-
getStats(
) → Future< Map< String, dynamic> > - Get driver statistics
-
handleJobFailure(
JobContext context) → Future< void> - Handle job failure with retry logic
-
isHealthy(
) → Future< bool> - Health check
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onJobCompleted(
JobContext context) → Future< void> - Called when a job is successfully completed
-
onJobFailed(
JobContext context) → Future< void> - Called when a job fails permanently
-
onJobRetried(
JobContext context) → Future< void> - Called when a job is retried
-
process(
) → Future< void> -
Starts processing queued jobs.
inherited
-
push(
QueueJob job, {Duration? delay}) → Future< void> -
Pushes a QueueJob to the queue with optional
delay.inherited -
retryJob(
JobContext context, {required Duration delay}) → Future< void> - Retry a failed job
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited