IDeltaQueueEvents Interface
Events emitted by IDeltaQueue.
To use, import via @fluidframework/container-definitions/legacy
.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export interface IDeltaQueueEvents<T> extends IErrorEvent
Extends: IErrorEvent
Type Parameters
Parameter | Description |
---|---|
T |
Call Signatures
CallSignature | Alerts | Description |
---|---|---|
(event: "push", listener: (task: T) => void): any | Alpha |
Emitted when a task is enqueued. |
(event: "op", listener: (task: T) => void): any | Alpha |
Emitted immediately after processing an enqueued task and removing it from the queue. |
(event: "idle", listener: (count: number, duration: number) => void): any | Alpha |
Emitted when the queue of tasks to process is emptied. |
Call Signature Details
(event: "push", listener: (task: T) => void): any
Emitted when a task is enqueued.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
(event: "push", listener: (task: T) => void): any;
Remarks
Listener parameters:
task
: The task being enqueued.
(event: "op", listener: (task: T) => void): any
Emitted immediately after processing an enqueued task and removing it from the queue.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
(event: "op", listener: (task: T) => void): any;
Remarks
Note: this event is not intended for general use. Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the ops directly on the IDeltaQueue.
Listener parameters:
task
: The task that was processed.
(event: "idle", listener: (count: number, duration: number) => void): any
Emitted when the queue of tasks to process is emptied.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
(event: "idle", listener: (count: number, duration: number) => void): any;
Remarks
Listener parameters:
-
count
: The number of events (T
) processed before becoming idle. -
duration
: The amount of time it took to process elements (in milliseconds).