Skip to main content
Version: v1

IFluidDataStoreFactory Interface

IFluidDataStoreFactory create data stores. It is associated with an identifier (its type member) and usually provided to consumers using this mapping through a data store registry.

Signature​

export interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory

Extends: IProvideFluidDataStoreFactory

Properties​

PropertyTypeDescription
typestringString that uniquely identifies the type of data store created by this factory.

Methods​

MethodReturn TypeDescription
instantiateDataStore(context, existing)Promise<IFluidDataStoreChannel>Generates runtime for the data store from the data store context. Once created should be bound to the context.

Property Details​

type​

String that uniquely identifies the type of data store created by this factory.

Signature​

type: string;

Type: string

Method Details​

instantiateDataStore​

Generates runtime for the data store from the data store context. Once created should be bound to the context.

Signature​

instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;

Parameters​

ParameterTypeDescription
contextIFluidDataStoreContextContext for the data store.
existingbooleanIf instantiating from an existing file.

Returns​

Return type: Promise<IFluidDataStoreChannel>