Skip to main content

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.

This API is provided for existing users, but is not recommended for new users.

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

ConstructorAlertsDescription
(constructor)(props)BetaConstructs a new instance of the BaseContainerRuntimeFactory class

Properties

PropertyAlertsModifiersTypeDescription
IFluidDataStoreRegistryBetareadonlyIFluidDataStoreRegistry

Methods

MethodAlertsReturn TypeDescription
containerHasInitialized(runtime)BetaPromise<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)BetaPromise<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)BetaPromise<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)BetaPromise<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)BetaPromise<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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

constructor(props: BaseContainerRuntimeFactoryProps);

Parameters

ParameterTypeDescription
propsBaseContainerRuntimeFactoryProps

Property Details

IFluidDataStoreRegistry

This API is provided for existing users, but is not recommended for new users.

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.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;

Parameters

ParameterTypeDescription
runtimeIContainerRuntimeThe 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.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;

Parameters

ParameterTypeDescription
runtimeIContainerRuntimeThe 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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

instantiateFirstTime(runtime: IContainerRuntime): Promise<void>;

Parameters

ParameterTypeDescription
runtimeIContainerRuntimeThe 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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

instantiateFromExisting(runtime: IContainerRuntime): Promise<void>;

Parameters

ParameterTypeDescription
runtimeIContainerRuntimeThe 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.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

preInitialize(context: IContainerContext, existing: boolean): Promise<IContainerRuntime & IRuntime>;

Parameters

ParameterTypeDescription
contextIContainerContextThe context for the container being initialized
existingbooleanWhether the container already exists and is being loaded (else it's being created new just now)

Returns

Return type: Promise<IContainerRuntime & IRuntime>