BaseContainerRuntimeFactory Class
BaseContainerRuntimeFactory produces container runtimes with a given data store and service registry, as well as given request handlers. It can be subclassed to implement a first-time initialization procedure for the containers it creates.
Signature
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry
Extends: RuntimeFactoryHelper
Implements: IProvideFluidDataStoreRegistry
Constructors
| Constructor | Description |
|---|---|
| (constructor)(registryEntries, dependencyContainer, requestHandlers, runtimeOptions) | Constructs a new instance of the BaseContainerRuntimeFactory class |
Properties
| Property | Type | Description |
|---|---|---|
| IFluidDataStoreRegistry | IFluidDataStoreRegistry |
Methods
| Method | Return Type | Description |
|---|---|---|
| containerHasInitialized(runtime) | Promise<void> | Subclasses may override containerHasInitialized to perform any steps after the container has initialized. This likely includes loading any data stores that are expected to be there at the outset. |
| containerInitializingFirstTime(runtime) | Promise<void> | Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container is created. This likely includes creating any initial data stores that are expected to be there at the outset. |
| instantiateFirstTime(runtime) | Promise<void> | |
| instantiateFromExisting(runtime) | Promise<void> | |
| preInitialize(context, existing) | Promise<ContainerRuntime> |
Constructor Details
(constructor)
Constructs a new instance of the BaseContainerRuntimeFactory class
Signature
constructor(registryEntries: NamedFluidDataStoreRegistryEntries, dependencyContainer?: IFluidDependencySynthesizer | undefined, requestHandlers?: RuntimeRequestHandler[], runtimeOptions?: IContainerRuntimeOptions | undefined);
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| registryEntries | NamedFluidDataStoreRegistryEntries | The data store registry for containers produced | |
| dependencyContainer | optional | IFluidDependencySynthesizer | undefined | |
| requestHandlers | optional | RuntimeRequestHandler[] | Request handlers for containers produced |
| runtimeOptions | optional | IContainerRuntimeOptions | undefined | The runtime options passed to the ContainerRuntime when instantiating it |
Property Details
IFluidDataStoreRegistry
Signature
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
Type: IFluidDataStoreRegistry
Method Details
containerHasInitialized
Subclasses may override containerHasInitialized to perform any steps after the container has initialized. This likely includes loading any data stores that are expected to be there at the outset.
Signature
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| runtime | IContainerRuntime | The container runtime for the container being initialized |
Returns
Return type: Promise<void>
containerInitializingFirstTime
Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container is created. This likely includes creating any initial data stores that are expected to be there at the outset.
Signature
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| runtime | IContainerRuntime | The container runtime for the container being initialized |
Returns
Return type: Promise<void>
instantiateFirstTime
Signature
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| runtime | ContainerRuntime |
Returns
Return type: Promise<void>
instantiateFromExisting
Signature
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| runtime | ContainerRuntime |
Returns
Return type: Promise<void>
preInitialize
Signature
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| context | IContainerContext | |
| existing | boolean |
Returns
Return type: Promise<ContainerRuntime>