Skip to main content
Version: v1

@fluidframework/container-runtime Package

Interfaces

InterfaceAlertsDescription
ContainerRuntimeMessage
IAckedSummaryA single summary which has already been acked by the server.
IAckSummaryResult
IBaseSummarizeResultBase results for all submitSummary attempts.
IBroadcastSummaryResult
ICancellableSummarizerController
ICancellationTokenSimilar to AbortSignal, but using promise instead of events
IChunkedOp
IClientSummaryWatcherWatches summaries created by a specific client.
IConnectableRuntime
IContainerRuntimeOptionsOptions for container runtime.
IEnqueueSummarizeOptionsOptions to use when enqueueing a summarize attempt.
IGarbageCollectionRuntimeDefines the APIs for the runtime object to be passed to the garbage collector.
IGCRuntimeOptions
IGCStatsThe statistics of the system state after a garbage collection run.
IGeneratedSummaryStatsIn addition to the normal summary tree + stats, this contains additional stats only relevant at the root of the tree.
IGenerateSummaryTreeResultResults of submitSummary after generating the summary tree.
INackSummaryResult
IOnDemandSummarizeOptions
IPendingFlushThis represents an explicit flush call and is added to the pending queue when flush is called on the ContainerRuntime to flush pending messages.
IPendingFlushModeThis represents a FlushMode update and is added to the pending queue when setFlushMode is called on the ContainerRuntime and the FlushMode changes.
IPendingLocalState
IPendingMessageThis represents a message that has been submitted and is added to the pending queue when submit is called on the ContainerRuntime. This message has either not been ack'd by the server or has not been submitted to the server yet.
IPendingRuntimeStateState saved when the container closes, to be given back to a newly instantiated runtime in a new instance of the container, so it can load to the same state
IProvideSummarizerDeprecated
IRootSummaryTreeWithStatsThe summary tree returned by the root node. It adds state relevant to the root of the tree.
ISubmitSummaryOpResultResults of submitSummary after submitting the summarize op.
ISubmitSummaryOptions
ISummarizeOptionsOptions affecting summarize behavior.
ISummarizer
ISummarizeResults
ISummarizerEvents
ISummarizerInternalsProvider
ISummarizerRuntime
ISummarizingWarning
ISummaryA single summary which can be tracked as it goes through its life cycle. The life cycle is: Local to Broadcast to Acked/Nacked.
ISummaryAckMessageInterface for summary ack messages with typed contents.
ISummaryBaseConfiguration
ISummaryCollectionOpEvents
ISummaryConfigurationDisableHeuristics
ISummaryConfigurationDisableSummarizer
ISummaryConfigurationHeuristics
ISummaryNackMessageInterface for summary nack messages with typed contents.
ISummaryOpMessageInterface for summary op messages with typed contents.
ISummaryRuntimeOptions
IUploadSummaryResultResults of submitSummary after uploading the tree to storage.

Classes

ClassDescription
ContainerRuntimeRepresents the runtime of the container. Contains helper functions/state of the container. It will define the store level mappings.
DeltaSchedulerDeltaScheduler is responsible for the scheduling of inbound delta queue in cases where there is more than one op a particular run of the queue. It does not schedule if there is just one op or just one batch in the run. It does the following two things: 1. If the ops have been processed for more than a specific amount of time, it pauses the queue and calls setTimeout to schedule a resume of the queue. This ensures that we don't block the JS thread for a long time processing ops synchronously (for example, when catching up ops right after boot or catching up ops / delayed realizing data stores by summarizer). 2. If we scheduled a particular run of the queue, it logs telemetry for the number of ops processed, the time and number of turns it took to process the ops.
FluidDataStoreRegistry
ScheduleManagerThis class has the following responsibilities: 1. It tracks batches as we process ops and raises "batchBegin" and "batchEnd" events. As part of it, it validates batch correctness (i.e. no system ops in the middle of batch) 2. It creates instance of ScheduleManagerCore that ensures we never start processing ops from batch unless all ops of the batch are in.
SummarizerSummarizer is responsible for coordinating when to generate and send summaries. It is the main entry point for summary work. It is created only by summarizing container (i.e. one with clientType === "summarizer")
SummaryCollectionData structure that looks at the op stream to track summaries as they are broadcast, acked and nacked. It provides functionality for watching specific summaries.

Enumerations

EnumDescription
ContainerMessageType
RuntimeHeadersAccepted header keys for requests coming to the runtime.
RuntimeMessage

Types

TypeAliasDescription
EnqueueSummarizeResult
IPendingState
ISummaryCancellationToken
ISummaryConfiguration
OpActionEventListener
OpActionEventName
SubmitSummaryResultStrict type representing result of a submitSummary attempt. The result consists of 4 possible stages, each with its own data. The data is cumulative, so each stage will contain the data from the previous stages. If the final "submitted" stage is not reached, the result may contain the error object. Stages: 1. "base" - stopped before the summary tree was even generated, and the result only contains the base data 2. "generate" - the summary tree was generated, and the result will contain that tree + stats 3. "upload" - the summary was uploaded to storage, and the result contains the server-provided handle 4. "submit" - the summarize op was submitted, and the result contains the op client sequence number.
SummarizeResultPart
SummarizerStopReason

Functions

FunctionReturn TypeDescription
isRuntimeMessage(message)boolean
unpackRuntimeMessage(message)ISequencedDocumentMessage

Variables

VariableAlertsTypeDescription
agentSchedulerIdLegacy ID for the built-in AgentScheduler. To minimize disruption while removing it, retaining this as a special-case for document dirty state. Ultimately we should have no special-cases from the ContainerRuntime's perspective.
DefaultSummaryConfigurationISummaryConfiguration
gcBlobPrefix
gcTreeKey
ISummarizerDeprecatedkeyof IProvideSummarizer
neverCancelledSummaryTokenISummaryCancellationTokenCan be useful in testing as well as in places where caller does not use cancellation. This object implements ISummaryCancellationToken interface but cancellation is never leveraged.

Function Details

isRuntimeMessage

Signature

export declare function isRuntimeMessage(message: ISequencedDocumentMessage): boolean;

Parameters

ParameterTypeDescription
messageISequencedDocumentMessage

Returns

Return type: boolean

unpackRuntimeMessage

Signature

export declare function unpackRuntimeMessage(message: ISequencedDocumentMessage): ISequencedDocumentMessage;

Parameters

ParameterTypeDescription
messageISequencedDocumentMessage

Returns

Return type: ISequencedDocumentMessage

Variable Details

agentSchedulerId

Legacy ID for the built-in AgentScheduler. To minimize disruption while removing it, retaining this as a special-case for document dirty state. Ultimately we should have no special-cases from the ContainerRuntime's perspective.

Signature

agentSchedulerId = "_scheduler"

DefaultSummaryConfiguration

Signature

DefaultSummaryConfiguration: ISummaryConfiguration

Type: ISummaryConfiguration

gcBlobPrefix

Signature

gcBlobPrefix = "__gc"

gcTreeKey

Signature

gcTreeKey = "gc"

ISummarizer

This API is deprecated and will be removed in a future release.
  • This will be removed in a later release.

Signature

ISummarizer: keyof IProvideSummarizer

Type: keyof IProvideSummarizer

neverCancelledSummaryToken

Can be useful in testing as well as in places where caller does not use cancellation. This object implements ISummaryCancellationToken interface but cancellation is never leveraged.

Signature

neverCancelledSummaryToken: ISummaryCancellationToken

Type: ISummaryCancellationToken