Skip to main content

IDeltaQueueEvents Interface

Events emitted by IDeltaQueue.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

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.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/container-definitions/alpha.

For more information about our API support guarantees, see here.

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.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/container-definitions/alpha.

For more information about our API support guarantees, see here.

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.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/container-definitions/alpha.

For more information about our API support guarantees, see here.

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).

See Also

idle