BaseContainerRuntimeFactory Class
BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries, request handlers, runtimeOptions, and entryPoint initialization function. It can be subclassed to implement a first-time initialization procedure for the containers it creates. \
To use, import via @fluidframework/aqueduct/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry
Extends: RuntimeFactoryHelper
Implements: IProvideFluidDataStoreRegistry
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(props) | Beta |
Constructs a new instance of the BaseContainerRuntimeFactory class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
IFluidDataStoreRegistry | Beta |
readonly |
IFluidDataStoreRegistry |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
containerHasInitialized(runtime) | Beta |
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) | Beta |
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) | Beta |
Promise<void> | Called the one time the container is created, and not on any subsequent load. i.e. only when it's initialized on the client that first created it |
instantiateFromExisting(runtime) | Beta |
Promise<void> | Called every time the container runtime is loaded for an existing container. i.e. every time it's initialized _except_ for when it is first created |
preInitialize(context, existing) | Beta |
Promise<IContainerRuntime & IRuntime> | Called at the start of initializing a container, to create the container runtime instance. |
Constructor Details
(constructor)
Constructs a new instance of the BaseContainerRuntimeFactory
class
For more information about our API support guarantees, see here.
Signature
constructor(props: BaseContainerRuntimeFactoryProps);
Parameters
Parameter | Type | Description |
---|---|---|
props | BaseContainerRuntimeFactoryProps |
Property Details
IFluidDataStoreRegistry
For more information about our API support guarantees, see here.
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.
For more information about our API support guarantees, see here.
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.
For more information about our API support guarantees, see here.
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
Called the one time the container is created, and not on any subsequent load. i.e. only when it's initialized on the client that first created it
For more information about our API support guarantees, see here.
Signature
instantiateFirstTime(runtime: IContainerRuntime): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
runtime | IContainerRuntime | The runtime for the container being initialized |
Returns
Return type: Promise<void>
instantiateFromExisting
Called every time the container runtime is loaded for an existing container. i.e. every time it's initialized _except_ for when it is first created
For more information about our API support guarantees, see here.
Signature
instantiateFromExisting(runtime: IContainerRuntime): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
runtime | IContainerRuntime | The runtime for the container being initialized |
Returns
Return type: Promise<void>
preInitialize
Called at the start of initializing a container, to create the container runtime instance.
For more information about our API support guarantees, see here.
Signature
preInitialize(context: IContainerContext, existing: boolean): Promise<IContainerRuntime & IRuntime>;
Parameters
Parameter | Type | Description |
---|---|---|
context | IContainerContext | The context for the container being initialized |
existing | boolean | Whether the container already exists and is being loaded (else it's being created new just now) |
Returns
Return type: Promise<IContainerRuntime & IRuntime>