ContainerRuntime Class
Packages > @fluidframework/container-runtime > ContainerRuntime
Represents the runtime of the container. Contains helper functions/state of the container. It will define the store level mappings.
This API is provided for existing users, but is not recommended for new users.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-runtime/alpha
.
For more information about our API support guarantees, see here .
Signature
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
Type: IDeltaManager <ISequencedDocumentMessage , IDocumentMessage >
disposed
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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.
This API is deprecated and will be removed in a future release.
NOT SUPPORTED - hardcoded to return false since it’s deprecated.
This API is provided as an alpha preview and may change without notice.
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.
This API is deprecated and will be removed in a future release.
NOT SUPPORTED - hardcoded to return false since it’s deprecated.
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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.
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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.
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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.
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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
This API is provided as an alpha preview and may change without notice.
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