Skip to main content

SummaryCollection Class

Data structure that looks at the op stream to track summaries as they are broadcast, acked and nacked. It provides functionality for watching specific summaries.

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

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

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

Signature

export declare class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEvents>

Extends: TypedEventEmitter<ISummaryCollectionOpEvents>

Constructors

ConstructorAlertsDescription
(constructor)(deltaManager, logger)BetaConstructs a new instance of the SummaryCollection class

Properties

PropertyAlertsModifiersTypeDescription
latestAckBetareadonlyIAckedSummary | undefined
opsSinceLastAckBetareadonlynumber

Methods

MethodAlertsReturn TypeDescription
addOpListener(listener)Betavoid
createWatcher(clientId)BetaIClientSummaryWatcherCreates and returns a summary watcher for a specific client. This will allow for local sent summaries to be better tracked.
emit(event, args)Betaboolean
removeOpListener(listener)Betavoid
removeWatcher(clientId)Betavoid
setPendingAckTimerTimeoutCallback(maxAckWaitTime, timeoutCallback)Betavoid
unsetPendingAckTimerTimeoutCallback()Betavoid
waitFlushed()BetaPromise<IAckedSummary | undefined>Returns a promise that resolves once all pending summary ops have been acked or nacked.
waitSummaryAck(referenceSequenceNumber)BetaPromise<IAckedSummary>Returns a promise that resolves once a summary is acked that has a reference sequence number greater than or equal to the passed in sequence number.

Constructor Details

(constructor)

Constructs a new instance of the SummaryCollection class

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

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

Signature

constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, logger: ITelemetryBaseLogger);

Parameters

ParameterTypeDescription
deltaManagerIDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
loggerITelemetryBaseLogger

Property Details

latestAck

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

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

Signature

get latestAck(): IAckedSummary | undefined;

Type: IAckedSummary | undefined

opsSinceLastAck

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

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

Signature

get opsSinceLastAck(): number;

Type: number

Method Details

addOpListener

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

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

Signature

addOpListener(listener: () => void): void;

Parameters

ParameterTypeDescription
listener() => void

createWatcher

Creates and returns a summary watcher for a specific client. This will allow for local sent summaries to be better tracked.

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

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

Signature

createWatcher(clientId: string): IClientSummaryWatcher;

Parameters

ParameterTypeDescription
clientIdstringclient id for watcher

Returns

Return type: IClientSummaryWatcher

emit

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

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

Signature

emit(event: OpActionEventName, ...args: Parameters<OpActionEventListener>): boolean;

Parameters

ParameterTypeDescription
eventOpActionEventName
argsParameters<OpActionEventListener>

Returns

Return type: boolean

removeOpListener

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

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

Signature

removeOpListener(listener: () => void): void;

Parameters

ParameterTypeDescription
listener() => void

removeWatcher

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

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

Signature

removeWatcher(clientId: string): void;

Parameters

ParameterTypeDescription
clientIdstring

setPendingAckTimerTimeoutCallback

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

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

Signature

setPendingAckTimerTimeoutCallback(maxAckWaitTime: number, timeoutCallback: () => void): void;

Parameters

ParameterTypeDescription
maxAckWaitTimenumber
timeoutCallback() => void

unsetPendingAckTimerTimeoutCallback

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

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

Signature

unsetPendingAckTimerTimeoutCallback(): void;

waitFlushed

Returns a promise that resolves once all pending summary ops have been acked or nacked.

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

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

Signature

waitFlushed(): Promise<IAckedSummary | undefined>;

Returns

Return type: Promise<IAckedSummary | undefined>

waitSummaryAck

Returns a promise that resolves once a summary is acked that has a reference sequence number greater than or equal to the passed in sequence number.

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

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

Signature

waitSummaryAck(referenceSequenceNumber: number): Promise<IAckedSummary>;

Parameters

ParameterTypeDescription
referenceSequenceNumbernumberreference sequence number to wait for

Returns

The latest acked summary

Return type: Promise<IAckedSummary>