SummaryCollection Class

Packages > @fluidframework/container-runtime > SummaryCollection

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.

Signature:

export declare class SummaryCollection 

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(deltaManager, logger, opActions) Constructs a new instance of the SummaryCollection class

Properties

List of properties for this class
Property Modifiers Type Description
latestAck IAckedSummary | undefined
opsSinceLastAck number

Methods

List of methods on this class
Method Modifiers Description
createWatcher(clientId) Creates and returns a summary watcher for a specific client. This will allow for local sent summaries to be better tracked.
removeWatcher(clientId)
setPendingAckTimerTimeoutCallback(maxAckWaitTime, timeoutCallback)
unsetPendingAckTimerTimeoutCallback()
waitFlushed() Returns a promise that resolves once all pending summary ops have been acked or nacked.
waitSummaryAck(referenceSequenceNumber) 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.

Constructors

SummaryCollection.(constructor)

Constructs a new instance of the SummaryCollection class

Signature:

constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, logger: ITelemetryLogger, opActions: SummaryCollectionOpActions);

Parameters

List of parameters
Parameter Type Description
deltaManager IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
logger ITelemetryLogger
opActions SummaryCollectionOpActions

Properties

latestAck

Signature:

get latestAck(): IAckedSummary | undefined;

opsSinceLastAck

Signature:

get opsSinceLastAck(): number;

Methods

createWatcher

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

Signature:

createWatcher(clientId: string): IClientSummaryWatcher;

Parameters

List of parameters
Parameter Type Description
clientId string client id for watcher

Returns:

IClientSummaryWatcher

removeWatcher

Signature:

removeWatcher(clientId: string): void;

Parameters

List of parameters
Parameter Type Description
clientId string

Returns:

void

setPendingAckTimerTimeoutCallback

Signature:

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

Parameters

List of parameters
Parameter Type Description
maxAckWaitTime number
timeoutCallback () => void

Returns:

void

unsetPendingAckTimerTimeoutCallback

Signature:

unsetPendingAckTimerTimeoutCallback(): void;

Returns:

void

waitFlushed

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

Signature:

waitFlushed(): Promise<IAckedSummary | undefined>;

Returns:

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.

Signature:

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

Parameters

List of parameters
Parameter Type Description
referenceSequenceNumber number reference sequence number to wait for

Returns:

Promise<IAckedSummary>

The latest acked summary