RequestQueue class

A queue for managing and prioritizing web scraping requests

Constructors

RequestQueue({required RateLimiter rateLimiter, int maxConcurrentRequests = 5, int maxQueueSize = 100, Logger? logger})
Creates a new RequestQueue

Properties

executingRequestCount → int
Gets the number of currently executing requests
no setter
hashCode → int
The hash code for this object.
no setterinherited
logger → Logger?
Logger for logging queue operations
final
maxConcurrentRequests → int
The maximum number of concurrent requests
final
maxQueueSize → int
The maximum queue size
final
queueSize → int
Gets the number of requests in the queue
no setter
rateLimiter → RateLimiter
The rate limiter to use
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalRequestCount → int
Gets the total number of requests (queued + executing)
no setter

Methods

clear() → void
Clears the queue
enqueue<T>({required String domain, required Future<T> execute(), RequestPriority priority = RequestPriority.normal}) → Future<T>
Adds a request to the queue
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Pauses the queue (stops processing new requests)
resume() → void
Resumes the queue (starts processing new requests)
toString() → String
A string representation of this object.
inherited

Operators

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