/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { ISequencedDocumentMessage, ISequencedDocumentAugmentedMessage } from "@fluidframework/protocol-definitions"; import { IGitManager } from "@fluidframework/server-services-client"; import { ICollection, IDeltaService, IScribe, ISequencedOperationMessage } from "@fluidframework/server-services-core"; import { ISummaryWriteResponse, ISummaryWriter } from "./interfaces"; /** * Git specific implementation of ISummaryWriter * @internal */ export declare class SummaryWriter implements ISummaryWriter { private readonly tenantId; private readonly documentId; private readonly summaryStorage; private readonly deltaService; private readonly opStorage; private readonly enableWholeSummaryUpload; private readonly lastSummaryMessages; private readonly getDeltasViaAlfred; private readonly maxRetriesOnError; private readonly maxLogtailLength; private readonly lumberProperties; constructor(tenantId: string, documentId: string, summaryStorage: IGitManager, deltaService: IDeltaService | undefined, opStorage: ICollection | undefined, enableWholeSummaryUpload: boolean, lastSummaryMessages: ISequencedDocumentMessage[], getDeltasViaAlfred: boolean, maxRetriesOnError?: number, maxLogtailLength?: number); /** * The flag indicates whether the actual storing process happens locally or externally. As writing to external * storage is an expensive process, a service provider may choose to use asynchronous out of process solution * such as a job queue. If set to 'true', the return value of writeClientSummary/writeServiceSummary will not * be used by the lambda. The external process will be responsible for sending the updates to the op stream. */ get isExternal(): boolean; /** * Helper function that finalizes the summary sent by client. After validating the summary op, * it appends .protocol, .serviceProtocol, and .logTail to the summary. Once done, it creates * a git summary, commits the change, and finalizes the ref. * @param op - Operation that triggered the write * @param lastSummaryHead - Points to the last summary head if available * @param checkpoint - State of the scribe service at current sequence number * @param pendingOps - List of unprocessed ops currently present in memory * @returns ISummaryWriteResponse; that represents the success or failure of the write, along with an * Ack or Nack message */ writeClientSummary(op: ISequencedDocumentAugmentedMessage, lastSummaryHead: string | undefined, checkpoint: IScribe, pendingOps: ISequencedOperationMessage[], isEphemeralContainer?: boolean): Promise; /** * Helper function that writes a new summary. Unlike client summaries, service summaries can be * triggered at any point in time. At first it fetches the last summary written by client. Once done, * it appends .protocol, .serviceProtocol, and .logTail to that summary. Finally it creates * a git summary, commits the change, and finalizes the ref. * @param op - Operation that triggered the write * @param currentProtocolHead - Protocol head of the last client summary. * @param checkpoint - State of the scribe service at current sequence number * @param pendingOps - List of unprocessed ops currently present in memory * @returns a boolean, which represents the success or failure of the write */ writeServiceSummary(op: ISequencedDocumentAugmentedMessage, currentProtocolHead: number, checkpoint: IScribe, pendingOps: ISequencedOperationMessage[], isEphemeralContainer?: boolean): Promise; private setSummaryProperties; private generateLogtailEntries; private getLogTail; private retrieveOps; private findMissingGapsInLogtail; private updateWholeSummary; private createWholeServiceSummary; private createSummaryTreeFromEntry; private createSummaryTreeFromEntryCore; } //# sourceMappingURL=summaryWriter.d.ts.map