Handles the "corked" event, which is triggered when the bucket queue is corked.
Handles the "drain" event, which is triggered when the bucket queue becomes empty.
Handles the "error" event, which is triggered when an error occurs while processing items in the bucket queue.
The error object that was thrown.
Optional
itemOrItems: T | T[]The item or items that caused the error.
Handles the "finish" event, which is triggered when the bucket queue becomes empty and no more items are expected to be added.
Handles the "pipe" event, which is triggered when items are added to the bucket queue.
An array of items that were added to the bucket queue.
Handles the "spill" event, which is triggered when the bucket queue reaches its maximum batch size and spills.
The timestamp when the event was triggered.
The number of items currently in the bucket queue.
Handles the "spilled" event, which is triggered when the bucket queue has spilled and reduced its pressure.
The timestamp when the event was triggered.
The number of items currently in the bucket queue.
The number of items in the bucket queue before it spilled.
Handles the "tick" event, which is triggered on each interval if the bucket queue is not empty.
The timestamp when the event was triggered.
The number of items currently in the bucket queue.
Handles the "uncorked" event, which is triggered when the bucket queue is uncorked.
Handles the "unpipe" event, which is triggered when items are removed from the bucket queue.
An array of items that were removed from the bucket queue.
Generated using TypeDoc
Represents an object of event handlers used by the BucketQueue class.
Typeparam
T The type of items being handled by the event handlers.