IContainerRuntime Interface
Signature
export interface IContainerRuntime extends IProvideContainerRuntime, IProvideFluidDataStoreRegistry, IContainerRuntimeBaseWithCombinedEvents
Extends: IProvideContainerRuntime, IProvideFluidDataStoreRegistry, IContainerRuntimeBaseWithCombinedEvents
Properties
Property | Type | Description |
---|---|---|
attachState | AttachState | Indicates the attachment state of the container to a host service. |
clientDetails | IClientDetails | |
clientId | string | undefined | |
connected | boolean | |
deltaManager | IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> | |
flushMode | FlushMode | |
isDirty | boolean | Returns true if document 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 | ILoaderOptions | |
scope | FluidObject | |
storage | IDocumentStorageService |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
createDetachedRootDataStore(pkg, rootDataStoreId) | IFluidDataStoreContextDetached | Creates detached data store context. Data store initialization is considered complete only after context.attachRuntime() is called. | |
createRootDataStore(pkg, rootDataStoreId) | Deprecated |
Promise<IFluidRouter> | Creates root data store in container. Such store is automatically bound to container, and thus is attached to storage when/if container is attached to storage. Such stores are never garbage collected and can be found / loaded by name. Majority of data stores in container should not be roots, and should be reachable (directly or indirectly) through one of the roots. |
flush() | Deprecated |
void | Flushes any ops currently being batched to the loader |
getAbsoluteUrl(relativeUrl) | Promise<string | undefined> | Get an absolute url for a provided container-relative request. Returns undefined if the container isn't attached to storage. | |
getRootDataStore(id, wait) | Promise<IFluidRouter> | Returns the runtime of the data store. | |
resolveHandle(request) | Promise<IResponse> | Resolves handle URI |
Property Details
attachState
Indicates the attachment state of the container to a host service.
Signature
readonly attachState: AttachState;
Type: AttachState
clientDetails
Signature
readonly clientDetails: IClientDetails;
Type: IClientDetails
clientId
Signature
readonly clientId: string | undefined;
Type: string | undefined
connected
Signature
readonly connected: boolean;
Type: boolean
deltaManager
Signature
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
flushMode
Signature
readonly flushMode: FlushMode;
Type: FlushMode
isDirty
Returns true if document is dirty, i.e. there are some pending local changes that either were not sent out to delta stream or were not yet acknowledged.
Signature
readonly isDirty: boolean;
Type: boolean
options
Signature
readonly options: ILoaderOptions;
Type: ILoaderOptions
scope
Signature
readonly scope: FluidObject;
Type: FluidObject
storage
Signature
readonly storage: IDocumentStorageService;
Type: IDocumentStorageService
Method Details
createDetachedRootDataStore
Creates detached data store context. Data store initialization is considered complete only after context.attachRuntime() is called.
Signature
createDetachedRootDataStore(pkg: Readonly<string[]>, rootDataStoreId: string): IFluidDataStoreContextDetached;
Parameters
Parameter | Type | Description |
---|---|---|
pkg | Readonly<string[]> | package path |
rootDataStoreId | string | data store ID (unique name). Must not contain slashes. |
Returns
Return type: IFluidDataStoreContextDetached
createRootDataStore
Creates root data store in container. Such store is automatically bound to container, and thus is attached to storage when/if container is attached to storage. Such stores are never garbage collected and can be found / loaded by name. Majority of data stores in container should not be roots, and should be reachable (directly or indirectly) through one of the roots.
- will be removed in an upcoming release. See #9660.
Signature
createRootDataStore(pkg: string | string[], rootDataStoreId: string): Promise<IFluidRouter>;
Parameters
Parameter | Type | Description |
---|---|---|
pkg | string | string[] | Package name of the data store factory |
rootDataStoreId | string | data store ID. Must not contain slashes. IDs naming space is global in container. If collision on name occurs, it results in container corruption - loading this file after that will always result in error. |
Returns
Return type: Promise<IFluidRouter>
flush
Flushes any ops currently being batched to the loader
- This will be removed in a later release. If a more manual flushing process is needed, move all usage to
IContainerRuntimeBase.orderSequentially
if possible.
Signature
flush(): void;
getAbsoluteUrl
Get an absolute url for a provided container-relative request. Returns undefined if the container isn't attached to storage.
Signature
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
relativeUrl | string | A relative request within the container |
Returns
Return type: Promise<string | undefined>
getRootDataStore
Returns the runtime of the data store.
Signature
getRootDataStore(id: string, wait?: boolean): Promise<IFluidRouter>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
id | string | Id supplied during creating the data store. | |
wait | optional | boolean | True if you want to wait for it. |
Returns
Return type: Promise<IFluidRouter>
resolveHandle
Resolves handle URI
Signature
resolveHandle(request: IRequest): Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest | request to resolve |
Returns
Return type: Promise<IResponse>