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. \
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
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
For more information about our API support guarantees, see here.
Signature
get latestAck(): IAckedSummary | undefined;
Type: IAckedSummary | undefined
opsSinceLastAck
For more information about our API support guarantees, see here.
Signature
get opsSinceLastAck(): number;
Type: number
Method Details
addOpListener
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.
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
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
For more information about our API support guarantees, see here.
Signature
removeOpListener(listener: () => void): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| listener | () => void |
removeWatcher
For more information about our API support guarantees, see here.
Signature
removeWatcher(clientId: string): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| clientId | string |
setPendingAckTimerTimeoutCallback
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
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.
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.
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>