ContainerRuntime Class
Represents the runtime of the container. Contains helper functions/state of the container. It will define the store level mappings.
To use, import via @fluidframework/container-runtime/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents & ISummarizerEvents> implements IContainerRuntime, IRuntime, ISummarizerRuntime, ISummarizerInternalsProvider, IProvideFluidHandleContext
Extends: TypedEventEmitter<IContainerRuntimeEvents & ISummarizerEvents>
Implements: IContainerRuntime, IRuntime, ISummarizerRuntime, ISummarizerInternalsProvider, IProvideFluidHandleContext
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, baseLogger, existing, blobManagerSnapshot, _storage, createIdCompressor, documentsSchemaController, featureGatesForTelemetry, provideEntryPoint, requestHandler, summaryConfiguration) | Alpha |
Constructs a new instance of the ContainerRuntime class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
_loadIdCompressor | Alpha |
Promise<void> | undefined | True if we have ID compressor loading in-flight (async operation). Useful only for this.idCompressorMode === "delayed" mode | |
attachState | Alpha |
readonly |
AttachState | |
baseLogger | Alpha |
readonly |
ITelemetryBaseLogger | |
clientDetails | Alpha |
readonly |
IClientDetails | |
clientId | Alpha |
readonly |
string | undefined | |
closeFn | Alpha |
readonly |
(error?: ICriticalContainerError) => void | |
connected | Alpha |
readonly |
boolean | |
containerRuntime | Alpha |
readonly |
this | |
deltaManager | Alpha |
readonly |
IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> | This is a proxy to the delta manager provided by the container context (innerDeltaManager). It restricts certain accesses such as sets "read-only" mode for the summarizer client. This is the default delta manager that should be used unless the innerDeltaManager is required. |
disposed | Alpha |
readonly |
boolean | |
disposeFn | Alpha |
readonly |
(error?: ICriticalContainerError) => void | |
flushMode | Alpha |
readonly |
FlushMode | |
gcThrowOnTombstoneUsage | Deprecated , Alpha |
readonly |
boolean | If true, throw an error when a tombstone data store is used. |
gcTombstoneEnforcementAllowed | Deprecated , Alpha |
readonly |
boolean | If false, loading or using a Tombstoned object should merely log, not fail. |
getAbsoluteUrl | Alpha |
readonly |
(relativeUrl: string) => Promise<string | undefined> | |
idCompressor | Alpha |
readonly |
(IIdCompressor & IIdCompressorCore) | undefined | See IContainerRuntimeBase.idCompressor() for details. |
idCompressorMode | Alpha |
readonly |
IdCompressorMode | |
IFluidDataStoreRegistry | Alpha |
readonly |
IFluidDataStoreRegistry | |
IFluidHandleContext | Alpha |
readonly |
IFluidHandleContext | |
isDirty | Alpha |
readonly |
boolean | Returns true of container is dirty, i.e. there are some pending local changes that either were not sent out to delta stream or were not yet acknowledged. |
options | Alpha |
readonly |
Record<string | number, any> | |
scope | Alpha |
readonly |
FluidObject | |
sessionSchema | Alpha |
readonly |
{ explicitSchemaControl?: true | undefined; compressionLz4?: true | undefined; idCompressorMode?: IdCompressorMode; opGroupingEnabled?: true | undefined; disallowedVersions?: string[] | undefined; } | Current session schema - defines what options are on & off. It's overlap of document schema (controlled by summary & ops) and options controlling this session. For example, document schema might have compression ON, but feature gates / runtime options turn it Off. In such case it will be off in session schema (i.e. this session should not use compression), but this client has to deal with compressed ops as other clients might send them. And in reverse, session schema can have compression Off, but feature gates / runtime options want it On. In such case it will be off in session schema, however this client will propose change to schema, and once / if this op rountrips, compression will be On. Client can't send compressed ops until it's change in schema. |
storage | Alpha |
readonly |
IDocumentStorageService | |
summarizerClientId | Alpha |
readonly |
string | undefined | clientId of parent (non-summarizing) container that owns summarizer container |
Constructor Details
(constructor)
Constructs a new instance of the ContainerRuntime
class
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>, containerScope: FluidObject, baseLogger: ITelemetryBaseLogger, existing: boolean, blobManagerSnapshot: IBlobManagerLoadInfo, _storage: IDocumentStorageService, createIdCompressor: () => Promise<IIdCompressor & IIdCompressorCore>, documentsSchemaController: DocumentsSchemaController, featureGatesForTelemetry: Record<string, boolean | number | undefined>, provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
context | IContainerContext | ||
registry | IFluidDataStoreRegistry | ||
metadata | IContainerRuntimeMetadata | undefined | ||
electedSummarizerData | ISerializedElection | undefined | ||
chunks | [string, string[]][] | ||
dataStoreAliasMap | [string, string][] | ||
runtimeOptions | Readonly<Required<IContainerRuntimeOptions>> | ||
containerScope | FluidObject | ||
baseLogger | ITelemetryBaseLogger | ||
existing | boolean | ||
blobManagerSnapshot | IBlobManagerLoadInfo | ||
_storage | IDocumentStorageService | ||
createIdCompressor | () => Promise<IIdCompressor & IIdCompressorCore> | ||
documentsSchemaController | DocumentsSchemaController | ||
featureGatesForTelemetry | Record<string, boolean | number | undefined> | ||
provideEntryPoint | (containerRuntime: IContainerRuntime) => Promise<FluidObject> | ||
requestHandler | optional | ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined | |
summaryConfiguration | optional | ISummaryConfiguration |
Property Details
_loadIdCompressor
True if we have ID compressor loading in-flight (async operation). Useful only for this.idCompressorMode === "delayed" mode
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
protected _loadIdCompressor: Promise<void> | undefined;
Type: Promise<void> | undefined
attachState
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get attachState(): AttachState;
Type: AttachState
baseLogger
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly baseLogger: ITelemetryBaseLogger;
Type: ITelemetryBaseLogger
clientDetails
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly clientDetails: IClientDetails;
Type: IClientDetails
clientId
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get clientId(): string | undefined;
Type: string | undefined
closeFn
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly closeFn: (error?: ICriticalContainerError) => void;
Type: (error?: ICriticalContainerError) => void
connected
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get connected(): boolean;
Type: boolean
containerRuntime
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get containerRuntime(): this;
Type: this
deltaManager
This is a proxy to the delta manager provided by the container context (innerDeltaManager). It restricts certain accesses such as sets "read-only" mode for the summarizer client. This is the default delta manager that should be used unless the innerDeltaManager is required.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get deltaManager(): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
disposed
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get disposed(): boolean;
Type: boolean
disposeFn
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly disposeFn: (error?: ICriticalContainerError) => void;
Type: (error?: ICriticalContainerError) => void
flushMode
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get flushMode(): FlushMode;
Type: FlushMode
gcThrowOnTombstoneUsage
If true, throw an error when a tombstone data store is used.
NOT SUPPORTED - hardcoded to return false since it's deprecated.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get gcThrowOnTombstoneUsage(): boolean;
Type: boolean
gcTombstoneEnforcementAllowed
If false, loading or using a Tombstoned object should merely log, not fail.
NOT SUPPORTED - hardcoded to return false since it's deprecated.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get gcTombstoneEnforcementAllowed(): boolean;
Type: boolean
getAbsoluteUrl
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>;
Type: (relativeUrl: string) => Promise<string | undefined>
idCompressor
See IContainerRuntimeBase.idCompressor() for details.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get idCompressor(): (IIdCompressor & IIdCompressorCore) | undefined;
Type: (IIdCompressor & IIdCompressorCore) | undefined
idCompressorMode
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get idCompressorMode(): IdCompressorMode;
Type: IdCompressorMode
IFluidDataStoreRegistry
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
Type: IFluidDataStoreRegistry
IFluidHandleContext
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get IFluidHandleContext(): IFluidHandleContext;
Type: IFluidHandleContext
isDirty
Returns true of container is dirty, i.e. there are some pending local changes that either were not sent out to delta stream or were not yet acknowledged.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get isDirty(): boolean;
Type: boolean
options
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly options: Record<string | number, any>;
Type: Record<string | number, any>
scope
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get scope(): FluidObject;
Type: FluidObject
sessionSchema
Current session schema - defines what options are on & off. It's overlap of document schema (controlled by summary & ops) and options controlling this session. For example, document schema might have compression ON, but feature gates / runtime options turn it Off. In such case it will be off in session schema (i.e. this session should not use compression), but this client has to deal with compressed ops as other clients might send them. And in reverse, session schema can have compression Off, but feature gates / runtime options want it On. In such case it will be off in session schema, however this client will propose change to schema, and once / if this op rountrips, compression will be On. Client can't send compressed ops until it's change in schema.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get sessionSchema(): {
explicitSchemaControl?: true | undefined;
compressionLz4?: true | undefined;
idCompressorMode?: IdCompressorMode;
opGroupingEnabled?: true | undefined;
disallowedVersions?: string[] | undefined;
};
Type: { explicitSchemaControl?: true | undefined; compressionLz4?: true | undefined; idCompressorMode?: IdCompressorMode; opGroupingEnabled?: true | undefined; disallowedVersions?: string[] | undefined; }
storage
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get storage(): IDocumentStorageService;
Type: IDocumentStorageService
summarizerClientId
clientId of parent (non-summarizing) container that owns summarizer container
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here.
Signature
get summarizerClientId(): string | undefined;
Type: string | undefined