IFluidDataStoreRuntime Interface
Represents the runtime for the data store. Contains helper functions/state of the data store.
To use, import via @fluidframework/datastore-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
/** @sealed */
export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable
Extends: IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
attachState | Alpha |
readonly |
AttachState | Indicates the attachment state of the data store to a host service. |
channelsRoutingContext | Alpha |
readonly |
IFluidHandleContext | |
clientId | Alpha |
readonly |
string | undefined | |
connected | Alpha |
readonly |
boolean | |
deltaManager | Alpha |
readonly |
IDeltaManagerErased | |
entryPoint | Alpha |
readonly |
IFluidHandle<FluidObject> | Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting with it. |
id | Alpha |
readonly |
string | |
idCompressor | Alpha |
readonly |
IIdCompressor | undefined | |
IFluidHandleContext | Alpha |
readonly |
IFluidHandleContext | |
logger | Alpha |
readonly |
ITelemetryBaseLogger | |
objectsRoutingContext | Alpha |
readonly |
IFluidHandleContext | |
options | Alpha |
readonly |
Record<string | number, any> | |
rootRoutingContext | Alpha |
readonly |
IFluidHandleContext | |
submitSignal | Alpha |
(type: string, content: unknown, targetClientId?: string) => void | Submits the signal to be sent to other clients. |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
addChannel(channel) | Alpha |
void | This api allows adding channel to data store after it was created. This allows callers to cusmomize channel instance. For example, channel implementation could have various modes of operations. As long as such configuration is provided at creation and stored in summaries (such that all users of such channel instance behave the same), this could be useful technique to have customized solutions without introducing a number of data structures that all have same implementation. This is also useful for scenarios like SharedTree DDS, where schema is provided at creation and stored in a summary. The channel type should be present in the registry, otherwise the runtime would reject the channel. The runtime used to create the channel object should be same to which it is added. |
bindChannel(channel) | Alpha |
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) | Alpha |
IChannel | Creates a new channel of the given type. |
getAudience() | Alpha |
IAudience | Returns the current audience. |
getChannel(id) | Alpha |
Promise<IChannel> | Returns the channel with the given id |
getQuorum() | Alpha |
IQuorumClients | Returns the current quorum. |
uploadBlob(blob, signal) | Alpha |
Promise<IFluidHandle<ArrayBufferLike>> | Api to upload a blob of data. |
waitAttached() | Alpha |
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.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly attachState: AttachState;
Type: AttachState
channelsRoutingContext
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly channelsRoutingContext: IFluidHandleContext;
Type: IFluidHandleContext
clientId
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly clientId: string | undefined;
Type: string | undefined
connected
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly connected: boolean;
Type: boolean
deltaManager
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly deltaManager: IDeltaManagerErased;
Type: IDeltaManagerErased
entryPoint
Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting with it.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly entryPoint: IFluidHandle<FluidObject>;
Type: IFluidHandle<FluidObject>
id
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly id: string;
Type: string
idCompressor
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly idCompressor: IIdCompressor | undefined;
Type: IIdCompressor | undefined
IFluidHandleContext
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly IFluidHandleContext: IFluidHandleContext;
Type: IFluidHandleContext
logger
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly logger: ITelemetryBaseLogger;
Type: ITelemetryBaseLogger
objectsRoutingContext
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly objectsRoutingContext: IFluidHandleContext;
Type: IFluidHandleContext
options
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly options: Record<string | number, any>;
Type: Record<string | number, any>
rootRoutingContext
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly rootRoutingContext: IFluidHandleContext;
Type: IFluidHandleContext
submitSignal
Submits the signal to be sent to other clients.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
submitSignal: (type: string, content: unknown, targetClientId?: string) => void;
Type: (type: string, content: unknown, targetClientId?: string) => void
Method Details
addChannel
This api allows adding channel to data store after it was created. This allows callers to cusmomize channel instance. For example, channel implementation could have various modes of operations. As long as such configuration is provided at creation and stored in summaries (such that all users of such channel instance behave the same), this could be useful technique to have customized solutions without introducing a number of data structures that all have same implementation. This is also useful for scenarios like SharedTree DDS, where schema is provided at creation and stored in a summary. The channel type should be present in the registry, otherwise the runtime would reject the channel. The runtime used to create the channel object should be same to which it is added.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
addChannel(channel: IChannel): void;
Parameters
Parameter | Type | Description |
---|---|---|
channel | IChannel | channel which needs to be added to the runtime. |
bindChannel
Bind the channel with the data store runtime. If the runtime is attached then we attach the channel to make it live.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
bindChannel(channel: IChannel): void;
Parameters
Parameter | Type | Description |
---|---|---|
channel | IChannel |
createChannel
Creates a new channel of the given type.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
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.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
getAudience(): IAudience;
Returns
Return type: IAudience
getChannel
Returns the channel with the given id
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
getChannel(id: string): Promise<IChannel>;
Parameters
Parameter | Type | Description |
---|---|---|
id | string |
Returns
Return type: Promise<IChannel>
getQuorum
Returns the current quorum.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
getQuorum(): IQuorumClients;
Returns
Return type: IQuorumClients
uploadBlob
Api to upload a blob of data.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
blob | ArrayBufferLike | blob to be uploaded. | |
signal | optional | AbortSignal |
Returns
Return type: Promise<IFluidHandle<ArrayBufferLike>>
waitAttached
Resolves when a local data store is attached.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
waitAttached(): Promise<void>;
Returns
Return type: Promise<void>