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​

PropertyTypeDescription
attachStateAttachStateIndicates the attachment state of the data store to a host service.
channelsRoutingContextIFluidHandleContext
clientIdstring | undefined
connectedboolean
deltaManagerIDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
idstring
IFluidHandleContextIFluidHandleContext
loggerITelemetryLogger
objectsRoutingContextIFluidHandleContext
optionsILoaderOptions
rootRoutingContextIFluidHandleContext

Methods​

MethodReturn TypeDescription
bindChannel(channel)voidBind the channel with the data store runtime. If the runtime is attached then we attach the channel to make it live.
createChannel(id, type)IChannelCreates a new channel of the given type.
getAudience()IAudienceReturns the current audience.
getChannel(id)Promise<IChannel>Returns the channel with the given id
getQuorum()IQuorumClientsReturns the current quorum.
submitSignal(type, content)voidSubmits 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​

ParameterTypeDescription
channelIChannel

createChannel​

Creates a new channel of the given type.

Signature​

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

Parameters​

ParameterTypeDescription
idstring | undefinedID of the channel to be created. A unique ID will be generated if left undefined.
typestringType 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​

ParameterTypeDescription
idstring

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​

ParameterTypeDescription
typestringType of the signal.
contentanyContent of the signal.

uploadBlob​

Api to upload a blob of data.

Signature​

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

Parameters​

ParameterTypeDescription
blobArrayBufferLikeblob 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>