Skip to main content
Version: v1

IFluidDataStoreRuntime Interface

Represents the runtime for the data store. Contains helper functions/state of the data store.

Signature

export interface IFluidDataStoreRuntime extends IFluidRouter, IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable, Partial<IProvideFluidDataStoreRegistry>

Extends: IFluidRouter, IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable, Partial<IProvideFluidDataStoreRegistry

Properties

Property Type Description
attachState AttachState Indicates the attachment state of the data store to a host service.
channelsRoutingContext IFluidHandleContext
clientId string | undefined
connected boolean
deltaManager IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
id string
IFluidHandleContext IFluidHandleContext
logger ITelemetryLogger
objectsRoutingContext IFluidHandleContext
options ILoaderOptions
rootRoutingContext IFluidHandleContext

Methods

Method Return Type Description
bindChannel(channel) void Bind the channel with the data store runtime. If the runtime is attached then we attach the channel to make it live.
createChannel(id, type) IChannel Creates a new channel of the given type.
getAudience() IAudience Returns the current audience.
getChannel(id) Promise<IChannel> Returns the channel with the given id
getQuorum() IQuorumClients Returns the current quorum.
submitSignal(type, content) void Submits the signal to be sent to other clients.
uploadBlob(blob) Promise<IFluidHandle<ArrayBufferLike>> Api to upload a blob of data.
waitAttached() Promise<void> Resolves when a local data store is attached.

Property Details

attachState

Indicates the attachment state of the data store to a host service.

Signature

readonly attachState: AttachState;

Type: AttachState

channelsRoutingContext

Signature

readonly channelsRoutingContext: IFluidHandleContext;

Type: IFluidHandleContext

clientId

Signature

readonly clientId: string | undefined;

Type: string | undefined

connected

Signature

readonly connected: boolean;

Type: boolean

deltaManager

Signature

readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;

Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>

id

Signature

readonly id: string;

Type: string

IFluidHandleContext

Signature

readonly IFluidHandleContext: IFluidHandleContext;

Type: IFluidHandleContext

logger

Signature

readonly logger: ITelemetryLogger;

Type: ITelemetryLogger

objectsRoutingContext

Signature

readonly objectsRoutingContext: IFluidHandleContext;

Type: IFluidHandleContext

options

Signature

readonly options: ILoaderOptions;

Type: ILoaderOptions

rootRoutingContext

Signature

readonly rootRoutingContext: IFluidHandleContext;

Type: IFluidHandleContext

Method Details

bindChannel

Bind the channel with the data store runtime. If the runtime is attached then we attach the channel to make it live.

Signature

bindChannel(channel: IChannel): void;

Parameters

Parameter Type Description
channel IChannel

createChannel

Creates a new channel of the given type.

Signature

createChannel(id: string | undefined, type: string): IChannel;

Parameters

Parameter Type Description
id string | undefined ID of the channel to be created. A unique ID will be generated if left undefined.
type string Type of the channel.

Returns

Return type: IChannel

getAudience

Returns the current audience.

Signature

getAudience(): IAudience;

Returns

Return type: IAudience

getChannel

Returns the channel with the given id

Signature

getChannel(id: string): Promise<IChannel>;

Parameters

Parameter Type Description
id string

Returns

Return type: Promise<IChannel>

getQuorum

Returns the current quorum.

Signature

getQuorum(): IQuorumClients;

Returns

Return type: IQuorumClients

submitSignal

Submits the signal to be sent to other clients.

Signature

submitSignal(type: string, content: any): void;

Parameters

Parameter Type Description
type string Type of the signal.
content any Content of the signal.

uploadBlob

Api to upload a blob of data.

Signature

uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;

Parameters

Parameter Type Description
blob ArrayBufferLike blob to be uploaded.

Returns

Return type: Promise<IFluidHandle<ArrayBufferLike>>

waitAttached

Resolves when a local data store is attached.

Signature

waitAttached(): Promise<void>;

Returns

Return type: Promise<void>