Packages > @fluidframework/merge-tree > Client

Client Class

This API is deprecated and will be removed in a future release.

This functionality was not meant to be exported and will be removed in a future release

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

To use, import via @fluidframework/merge-tree/legacy.

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

Signature

export declare class Client extends TypedEventEmitter<IClientEvents>

Extends: TypedEventEmitter <IClientEvents >

Constructors

Constructor Alerts Description
(constructor)(specToSegment, logger, options, getMinInFlightRefSeq) Alpha Constructs a new instance of the Client class

Properties

Property Alerts Modifiers Type Description
logger Alpha readonly ITelemetryLoggerExt
longClientId Alpha string | undefined
specToSegment Alpha readonly (spec: IJSONSegment) => ISegment

Constructor Details

(constructor)

Constructs a new instance of the Client class

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

To use, import via @fluidframework/merge-tree/alpha.

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

Signature

constructor(specToSegment: (spec: IJSONSegment) => ISegment, logger: ITelemetryLoggerExt, options?: IMergeTreeOptions & PropertySet, getMinInFlightRefSeq?: () => number | undefined);

Parameters

Parameter Modifiers Type Description
specToSegment (spec: IJSONSegment) => ISegment Rehydrates a segment from its JSON representation
logger ITelemetryLoggerExt Telemetry logger for diagnostics
options optional IMergeTreeOptions & PropertySet Options for this client. See IMergeTreeOptions for details.
getMinInFlightRefSeq optional () => number | undefined Upon applying a message (see Client.applyMsg), client purges collab-window information which is no longer necessary based on that message's minimum sequence number. However, if the user of this client has in-flight messages which refer to positions in this Client, they may wish to preserve additional merge information. The effective minimum sequence number will be the minimum of the message's minimumSequenceNumber and the result of this function. If this function returns undefined, the message's minimumSequenceNumber will be used.

Property Details

logger

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

To use, import via @fluidframework/merge-tree/alpha.

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

Signature

readonly logger: ITelemetryLoggerExt;

Type: ITelemetryLoggerExt

longClientId

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

To use, import via @fluidframework/merge-tree/alpha.

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

Signature

longClientId: string | undefined;

Type: string | undefined

specToSegment

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

To use, import via @fluidframework/merge-tree/alpha.

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

Signature

readonly specToSegment: (spec: IJSONSegment) => ISegment;

Type: (spec: IJSONSegment ) => ISegment