/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { IChannel, IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/internal"; import type { ISnapshotTree } from "@fluidframework/driver-definitions/internal"; import type { IExperimentalIncrementalSummaryContext, ISummaryTreeWithStats, ITelemetryContext, IGarbageCollectionData, IFluidDataStoreContext, ISummarizeResult, IRuntimeMessageCollection, IRuntimeStorageService } from "@fluidframework/runtime-definitions/internal"; import { type TelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal"; import { ChannelDeltaConnection } from "./channelDeltaConnection.js"; import { ChannelStorageService } from "./channelStorageService.js"; import type { ISharedObjectRegistry } from "./dataStoreRuntime.js"; export declare const attributesBlobKey = ".attributes"; export interface IChannelContext { getChannel(): Promise; setConnectionState(connected: boolean, clientId?: string): any; /** * Process messages for this channel context. The messages here are contiguous messages for this context in a batch. * @param messageCollection - The collection of messages to process. */ processMessages(messageCollection: IRuntimeMessageCollection): void; summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise; reSubmit(content: unknown, localOpMetadata: unknown, squash: boolean): void; applyStashedOp(content: unknown): unknown; rollback(message: unknown, localOpMetadata: unknown): void; /** * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context * including any of its children. Each node has a set of outbound routes to other GC nodes in the document. * @param fullGC - true to bypass optimizations and force full generation of GC data. */ getGCData(fullGC?: boolean): Promise; /** * After GC has run, called to notify this context of routes that are used in it. These are used for the following: * 1. To identify if this context is being referenced in the document or not. * 2. To identify if this context or any of its children's used routes changed since last summary. * 3. They are added to the summary generated by this context. */ updateUsedRoutes(usedRoutes: string[]): void; } export interface ChannelServiceEndpoints { deltaConnection: ChannelDeltaConnection; objectStorage: ChannelStorageService; } export declare function createChannelServiceEndpoints(connected: boolean, submitFn: (content: unknown, localOpMetadata: unknown) => void, dirtyFn: () => void, isAttachedAndVisible: () => boolean, storageService: IRuntimeStorageService, logger: TelemetryLoggerExt, tree?: ISnapshotTree, extraBlobs?: Map): ChannelServiceEndpoints; /** * Used to get the channel's summary for the DDS or DataStore attach op. */ export declare function summarizeChannel(channel: IChannel, fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats; export declare function summarizeChannelAsync(channel: IChannel, fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext): Promise; export declare function loadChannelFactoryAndAttributes(dataStoreContext: IFluidDataStoreContext, services: ChannelServiceEndpoints, channelId: string, registry: ISharedObjectRegistry, attachMessageType?: string): Promise<{ factory: IChannelFactory; attributes: IChannelAttributes; }>; export declare function loadChannel(dataStoreRuntime: IFluidDataStoreRuntime, attributes: IChannelAttributes, factory: IChannelFactory, services: ChannelServiceEndpoints, logger: TelemetryLoggerExt, channelId: string): Promise; //# sourceMappingURL=channelContext.d.ts.map