Packages > @fluidframework/container-definitions > IDeltaManagerEvents

IDeltaManagerEvents Interface

Events emitted by IDeltaManager .

Signature

/** @sealed */
export interface IDeltaManagerEvents extends IEvent

Extends: IEvent

Call Signatures

CallSignature Alerts Description
(event: "prepareSend", listener: (messageBuffer: any[]) => void): any DEPRECATED
(event: "submitOp", listener: (message: IDocumentMessage) => void): any DEPRECATED
(event: "op", listener: (message: ISequencedDocumentMessage, processingTime: number) => void): any Emitted immediately after processing an incoming operation (op).
(event: "pong", listener: (latency: number) => void): any Emitted periodically with latest information on network roundtrip latency
(event: "connect", listener: (details: IConnectionDetails, opsBehind?: number) => void): any Emitted when the IDeltaManager completes connecting to the Fluid service.
(event: "disconnect", listener: (reason: string, error?: IAnyDriverError) => void): any Emitted when the IDeltaManager becomes disconnected from the Fluid service.
(event: "readonly", listener: (readonly: boolean, readonlyConnectionReason?: { reason: string; error?: IErrorBase; }) => void): any Emitted when read/write permissions change.

Call Signature Details

(event: “prepareSend”, listener: (messageBuffer: any[]) => void): any

API This

No replacement API recommended.

Signature

(event: "prepareSend", listener: (messageBuffer: any[]) => void): any;

(event: “submitOp”, listener: (message: IDocumentMessage) => void): any

API This

No replacement API recommended.

Signature

(event: "submitOp", listener: (message: IDocumentMessage) => void): any;

(event: “op”, listener: (message: ISequencedDocumentMessage, processingTime: number) => void): any

Emitted immediately after processing an incoming operation (op).

Signature

(event: "op", listener: (message: ISequencedDocumentMessage, processingTime: number) => 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 IDeltaManager .

Listener parameters:

  • message: The op that was processed.

  • processingTime: The amount of time it took to process the inbound operation (op), expressed in milliseconds.

(event: “pong”, listener: (latency: number) => void): any

Emitted periodically with latest information on network roundtrip latency

Signature

(event: "pong", listener: (latency: number) => void): any;

(event: “connect”, listener: (details: IConnectionDetails, opsBehind?: number) => void): any

Emitted when the IDeltaManager completes connecting to the Fluid service.

Signature

(event: "connect", listener: (details: IConnectionDetails, opsBehind?: number) => void): any;

Remarks

This occurs once we’ve received the connect_document_success message from the server, and happens prior to the client’s join message (if there is a join message).

Listener parameters:

  • details: Connection metadata.

  • opsBehind: An estimate of far behind the client is relative to the service in terms of ops. Will not be specified if an estimate cannot be determined.

(event: “disconnect”, listener: (reason: string, error?: IAnyDriverError) => void): any

Emitted when the IDeltaManager becomes disconnected from the Fluid service.

Signature

(event: "disconnect", listener: (reason: string, error?: IAnyDriverError) => void): any;

Remarks

Listener parameters:

  • reason: Describes the reason for which the delta manager was disconnected. - error : error if any for the disconnect.

(event: “readonly”, listener: (readonly: boolean, readonlyConnectionReason?: { reason: string; error?: IErrorBase; }) => void): any

Emitted when read/write permissions change.

Signature

(event: "readonly", listener: (readonly: boolean, readonlyConnectionReason?: {
        reason: string;
        error?: IErrorBase;
    }) => void): any;

Remarks

Listener parameters:

  • readonly: Whether or not the delta manager is now read-only.