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

Constructor Alerts Description
(constructor)(deltaManager, logger) Beta Constructs a new instance of the SummaryCollection class

Properties

Property Alerts Modifiers Type Description
latestAck Beta readonly IAckedSummary | undefined
opsSinceLastAck Beta readonly number

Methods

Method Alerts Return Type Description
addOpListener(listener) Beta void
createWatcher(clientId) Beta IClientSummaryWatcher Creates and returns a summary watcher for a specific client. This will allow for local sent summaries to be better tracked.
emit(event, args) Beta boolean
removeOpListener(listener) Beta void
removeWatcher(clientId) Beta void
setPendingAckTimerTimeoutCallback(maxAckWaitTime, timeoutCallback) Beta void
unsetPendingAckTimerTimeoutCallback() Beta void
waitFlushed() Beta Promise<IAckedSummary | undefined> Returns a promise that resolves once all pending summary ops have been acked or nacked.
waitSummaryAck(referenceSequenceNumber) Beta Promise<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

Parameter Type Description
deltaManager IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
logger ITelemetryBaseLogger

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

Parameter Type Description
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

Parameter Type Description
clientId string client 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

Parameter Type Description
event OpActionEventName
args Parameters<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

Parameter Type Description
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

Parameter Type Description
clientId string

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

Parameter Type Description
maxAckWaitTime number
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

Parameter Type Description
referenceSequenceNumber number reference sequence number to wait for

Returns

The latest acked summary

Return type: Promise<IAckedSummary>