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

ParameterDefaultDescription
TIContainerRuntime

Properties

PropertyAlertsModifiersTypeDescription
IRuntimeFactoryBetareadonlythis

Methods

MethodAlertsReturn TypeDescription
hasInitialized(_runtime)BetaPromise<void>Called at the end of initializing a container, after the runtime has been created or loaded.
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
instantiateRuntime(context, existing)BetaPromise<IRuntime>
preInitialize(context, existing)BetaPromise<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

ParameterTypeDescription
_runtimeT

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

ParameterTypeDescription
_runtimeT

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

ParameterTypeDescription
_runtimeT

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

ParameterTypeDescription
contextIContainerContext
existingboolean

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

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