Skip to content 

BaseContainerRuntimeFactory Class

Packages > @fluidframework/aqueduct > BaseContainerRuntimeFactory

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 implements IProvideFluidDataStoreRegistry, IRuntimeFactory 

Implements: IProvideFluidDataStoreRegistry, IRuntimeFactory

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(registryEntries, providerEntries, requestHandlers) Constructs a new instance of the BaseContainerRuntimeFactory class

Properties

List of properties for this class
Property Modifiers Type Description
IFluidDataStoreRegistry IFluidDataStoreRegistry
IRuntimeFactory this

Methods

List of methods on this class
Method Modifiers Description
containerHasInitialized(runtime) 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) 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.
instantiateRuntime(context)

Constructors

BaseContainerRuntimeFactory.(constructor)

Constructs a new instance of the BaseContainerRuntimeFactory class

Signature:

constructor(registryEntries: NamedFluidDataStoreRegistryEntries, providerEntries?: DependencyContainerRegistry, requestHandlers?: RuntimeRequestHandler[]);

Parameters

List of parameters
Parameter Type Description
registryEntries NamedFluidDataStoreRegistryEntries The data store registry for containers produced
providerEntries DependencyContainerRegistry
requestHandlers RuntimeRequestHandler[] Request handlers for containers produced

Properties

IFluidDataStoreRegistry

Signature:

get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;

IRuntimeFactory

Signature:

get IRuntimeFactory(): this;

Methods

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

List of parameters
Parameter Type Description
runtime IContainerRuntime The container runtime for the container being initialized

Returns:

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

List of parameters
Parameter Type Description
runtime IContainerRuntime The container runtime for the container being initialized

Returns:

Promise<void>

instantiateRuntime

Signature:

instantiateRuntime(context: IContainerContext): Promise<IRuntime>;

Parameters

List of parameters
Parameter Type Description
context IContainerContext

Returns:

Promise<IRuntime>