Constructs a new BucketQueue object.
If the provided options do not meet the requirements.
An object containing the options for this BucketQueue.
Returns a frozen object containing all stored construction events. The object keys represent the event types and the values are arrays of event arguments. Note that this method only returns stored construction events that have not been emitted yet. Once an event is emitted, it will be removed from the stored events map.
Returns the current options object used by the BucketQueue. The returned object is frozen and cannot be modified.
An object containing the current options of the BucketQueue.
Returns the current length of the bucket, representing the number of items waiting to be processed.
The current length of the bucket.
Alias for push() method.
Rest
...items: BucketQueuePushArguments<T>The items to add to the bucket.
Alias for push() method.
Rest
...items: BucketQueuePushArguments<T>The items to enqueue to the bucket.
Pushes items to the bucket and emits the 'pipe' and 'unpipe' events.
Rest
...items: BucketQueuePushArguments<T>The items to push to the bucket.
Generated using TypeDoc
A queue that batches and delays items to limit concurrent processing and reduce external API load.
Typeparam
T Type of items in the queue.