/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /// import { EventEmitter } from "events"; import { IContext, IQueuedMessage, IRoutingKey } from "@fluidframework/server-services-core"; import { DocumentContext } from "./documentContext"; /** * The DocumentContextManager manages a set of created DocumentContexts and computes an aggregate checkpoint offset * from them. */ export declare class DocumentContextManager extends EventEmitter { private readonly partitionContext; private readonly contexts; private head; private tail; private lastCheckpoint; private closed; private headPaused; private tailPaused; constructor(partitionContext: IContext); /** * Creates a context that should be used for a single document partition * This class is responsible for the lifetime of the context */ createContext(routingKey: IRoutingKey, head: IQueuedMessage): DocumentContext; removeContext(context: DocumentContext): void; getHeadOffset(): number; /** * Updates the head to the new offset. The head offset will not be updated if it stays the same or moves backwards, unless headPaused is true. * @returns True if the head was updated, false if it was not. */ setHead(head: IQueuedMessage): boolean; setTail(tail: IQueuedMessage): void; close(): void; private updateCheckpoint; } //# sourceMappingURL=contextManager.d.ts.map