Skip to content 

IFluidDataObjectFactory Interface

Packages > @fluidframework/aqueduct > IFluidDataObjectFactory

Signature:

export interface IFluidDataObjectFactory 

Methods

List of methods of this class
Method Description
createAnonymousChildInstance(subFactory, request) Similar to above, but uses any data store factory. Given that there is no type information about such factory (or objects it creates, hanse "Anonymous" in name), IFluidObject (by default) is returned by doing a request to created data store.
createChildInstance(subFactory, initialState) Creates a new child instance of the object. Uses PureDataObjectFactory for that, and thus we have type information about object created and can pass in initia state.

Methods

createAnonymousChildInstance

Similar to above, but uses any data store factory. Given that there is no type information about such factory (or objects it creates, hanse “Anonymous” in name), IFluidObject (by default) is returned by doing a request to created data store.

Signature:

createAnonymousChildInstance<T = IFluidObject>(subFactory: IFluidDataStoreFactory, request?: string | IRequest): Promise<T>;

Parameters

List of parameters
Parameter Type Description
subFactory IFluidDataStoreFactory
request string | IRequest

Returns:

Promise<T>

createChildInstance

Creates a new child instance of the object. Uses PureDataObjectFactory for that, and thus we have type information about object created and can pass in initia state.

Signature:

createChildInstance<P, S, TObject extends PureDataObject<P, S>, TFactory extends PureDataObjectFactory<TObject, P, S>>(subFactory: TFactory, initialState?: S): Promise<TObject>;

Parameters

List of parameters
Parameter Type Description
subFactory TFactory
initialState S The initial state to provide to the created component.

Returns:

Promise<TObject>

an object created by this factory. Data store and objects created are not attached to container. They get attached only when a handle to one of them is attached to already attached objects.