Skip to main content

RuntimeFactoryHelper Class

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

To use, import via @fluidframework/runtime-utils/legacy.

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

Signature

export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory

Implements: IRuntimeFactory

Type Parameters

Parameter Default Description
T IContainerRuntime

Properties

Property Alerts Modifiers Type Description
IRuntimeFactory Beta readonly this

Methods

Method Alerts Return Type Description
hasInitialized(_runtime) Beta Promise<void> Called at the end of initializing a container, after the runtime has been created or loaded.
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
instantiateRuntime(context, existing) Beta Promise<IRuntime>
preInitialize(context, existing) Beta Promise<IRuntime & T> Called at the start of initializing a container, to create the container runtime instance.

Property Details

IRuntimeFactory

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 IRuntimeFactory(): this;

Type: this

Method Details

hasInitialized

Called at the end of initializing a container, after the runtime has been created or loaded.

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
hasInitialized(_runtime: T): Promise<void>;

Parameters

Parameter Type Description
_runtime T

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: T): Promise<void>;

Parameters

Parameter Type Description
_runtime T

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: T): Promise<void>;

Parameters

Parameter Type Description
_runtime T

Returns

Return type: Promise<void>

instantiateRuntime

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
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;

Parameters

Parameter Type Description
context IContainerContext
existing boolean

Returns

Return type: Promise<IRuntime>

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
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;

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<IRuntime & T>