IFluidDataStoreRuntime Interface

Packages > @fluidframework/datastore-definitions > IFluidDataStoreRuntime

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

List of properties of this interface
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>
documentId string
existing boolean
id string
IFluidHandleContext IFluidHandleContext
IFluidSerializer IFluidSerializer
loader ILoader
logger ITelemetryLogger
objectsRoutingContext IFluidHandleContext
options ILoaderOptions
rootRoutingContext IFluidHandleContext

Methods

List of methods of this class
Method Description
bindChannel(channel) 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) Creates a new channel of the given type.
getAudience() Returns the current audience.
getChannel(id) Returns the channel with the given id
getQuorum() Returns the current quorum.
raiseContainerWarning(warning) Errors raised by distributed data structures
submitSignal(type, content) Submits the signal to be sent to other clients.
uploadBlob(blob) Api to upload a blob of data.
waitAttached() Resolves when a local data store is attached.

Events

attachState

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

Signature:

readonly attachState: AttachState;

channelsRoutingContext

Signature:

readonly channelsRoutingContext: IFluidHandleContext;

clientId

Signature:

readonly clientId: string | undefined;

connected

Signature:

readonly connected: boolean;

deltaManager

Signature:

readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;

documentId

Signature:

readonly documentId: string;

existing

Signature:

readonly existing: boolean;

id

Signature:

readonly id: string;

IFluidHandleContext

Signature:

readonly IFluidHandleContext: IFluidHandleContext;

IFluidSerializer

Signature:

readonly IFluidSerializer: IFluidSerializer;

loader

Warning: This API is now obsolete.

0.37 Containers created using a loader will make automatically it available through scope instead

Signature:

readonly loader: ILoader;

logger

Signature:

readonly logger: ITelemetryLogger;

objectsRoutingContext

Signature:

readonly objectsRoutingContext: IFluidHandleContext;

options

Signature:

readonly options: ILoaderOptions;

rootRoutingContext

Signature:

readonly rootRoutingContext: IFluidHandleContext;

Methods

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

List of parameters
Parameter Type Description
channel IChannel

Returns:

void

createChannel

Creates a new channel of the given type.

Signature:

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

Parameters

List of 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:

IChannel

getAudience

Returns the current audience.

Signature:

getAudience(): IAudience;

Returns:

IAudience

getChannel

Returns the channel with the given id

Signature:

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

Parameters

List of parameters
Parameter Type Description
id string

Returns:

Promise<IChannel>

getQuorum

Returns the current quorum.

Signature:

getQuorum(): IQuorum;

Returns:

IQuorum

raiseContainerWarning

Errors raised by distributed data structures

Signature:

raiseContainerWarning(warning: ContainerWarning): void;

Parameters

List of parameters
Parameter Type Description
warning ContainerWarning

Returns:

void

submitSignal

Submits the signal to be sent to other clients.

Signature:

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

Parameters

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

Returns:

void

uploadBlob

Api to upload a blob of data.

Signature:

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

Parameters

List of parameters
Parameter Type Description
blob ArrayBufferLike blob to be uploaded.

Returns:

Promise<IFluidHandle<ArrayBufferLike>>

waitAttached

Resolves when a local data store is attached.

Signature:

waitAttached(): Promise<void>;

Returns:

Promise<void>