IFluidDataStoreChannel Interface

Packages > @fluidframework/runtime-definitions > IFluidDataStoreChannel

Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.

Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint, and connection state notifications

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/runtime-definitions/legacy.

For more information about our API support guarantees, see here .

Signature

export interface IFluidDataStoreChannel extends IDisposable

Extends: IDisposable

Properties

Property Alerts Modifiers Type Description
entryPoint Alpha readonly IFluidHandleInternal<FluidObject> Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting with the component.

Methods

Method Alerts Modifiers Return Type Description
applyStashedOp(content) Alpha Promise<unknown>
getAttachGCData(telemetryContext) Alpha IGarbageCollectionData Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore
getAttachSummary(telemetryContext) Alpha ISummaryTreeWithStats Synchronously retrieves the summary used as part of the initial summary message
getGCData(fullGC) Alpha Promise<IGarbageCollectionData> Returns the data used for garbage collection. This includes a list of GC nodes that represent this context including any of its children. Each node has a list of outbound routes to other GC nodes in the document.
makeVisibleAndAttachGraph() Alpha void Makes the data store channel visible in the container. Also, runs through its graph and attaches all bound handles that represent its dependencies in the container's graph.
process(message, local, localOpMetadata) Deprecated, Alpha void Processes the op.
processMessages(messageCollection) Alpha optional void Process messages for this channel. The messages here are contiguous messages in a batch.
processSignal(message, local) Alpha void Processes the signal.
request(request) Alpha Promise<IResponse>
reSubmit(type, content, localOpMetadata) Alpha any Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.
rollback(type, content, localOpMetadata) Alpha optional void Revert a local message.
setAttachState(attachState) Alpha void
setConnectionState(connected, clientId) Alpha any Notifies this object about changes in the connection state.
summarize(fullTree, trackState, telemetryContext) Alpha Promise<ISummaryTreeWithStats> Generates a summary for the channel. Introduced with summarizerNode - will be required in a future release.
updateUsedRoutes(usedRoutes) Alpha void After GC has run, called to notify this channel of routes that are used in it.

Property Details

entryPoint

Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting with the component.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

readonly entryPoint: IFluidHandleInternal<FluidObject>;

Type: IFluidHandleInternal <FluidObject >

Method Details

applyStashedOp

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

applyStashedOp(content: any): Promise<unknown>;

Parameters

Parameter Type Description
content any

Returns

Return type: Promise<unknown>

getAttachGCData

Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;

Parameters

Parameter Modifiers Type Description
telemetryContext optional ITelemetryContext

Returns

Return type: IGarbageCollectionData

getAttachSummary

Synchronously retrieves the summary used as part of the initial summary message

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;

Parameters

Parameter Modifiers Type Description
telemetryContext optional ITelemetryContext

Returns

Return type: ISummaryTreeWithStats

getGCData

Returns the data used for garbage collection. This includes a list of GC nodes that represent this context including any of its children. Each node has a list of outbound routes to other GC nodes in the document.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;

Parameters

Parameter Modifiers Type Description
fullGC optional boolean true to bypass optimizations and force full generation of GC data.

Returns

Return type: Promise<IGarbageCollectionData >

makeVisibleAndAttachGraph

Makes the data store channel visible in the container. Also, runs through its graph and attaches all bound handles that represent its dependencies in the container’s graph.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

makeVisibleAndAttachGraph(): void;

process

Processes the op.

This API is deprecated and will be removed in a future release.

processMessages should be used instead to process messages for a channel.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;

Parameters

Parameter Type Description
message ISequencedDocumentMessage
local boolean
localOpMetadata unknown

processMessages

Process messages for this channel. The messages here are contiguous messages in a batch.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

processMessages?(messageCollection: IRuntimeMessageCollection): void;

Parameters

Parameter Type Description
messageCollection IRuntimeMessageCollection The collection of messages to process.

processSignal

Processes the signal.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

processSignal(message: IInboundSignalMessage, local: boolean): void;

Parameters

Parameter Type Description
message IInboundSignalMessage
local boolean

request

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

request(request: IRequest): Promise<IResponse>;

Parameters

Parameter Type Description
request IRequest

Returns

Return type: Promise<IResponse >

reSubmit

Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

reSubmit(type: string, content: any, localOpMetadata: unknown): any;

Parameters

Parameter Type Description
type string The type of the original message.
content any The content of the original message.
localOpMetadata unknown The local metadata associated with the original message.

Returns

Return type: any

rollback

Revert a local message.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

rollback?(type: string, content: any, localOpMetadata: unknown): void;

Parameters

Parameter Type Description
type string The type of the original message.
content any The content of the original message.
localOpMetadata unknown The local metadata associated with the original message.

setAttachState

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;

Parameters

Parameter Type Description
attachState AttachState.Attaching | AttachState.Attached

setConnectionState

Notifies this object about changes in the connection state.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

setConnectionState(connected: boolean, clientId?: string): any;

Parameters

Parameter Modifiers Type Description
connected boolean
clientId optional string ID of the client. It's old ID when in disconnected state and it's new client ID when we are connecting or connected.

Returns

Return type: any

summarize

Generates a summary for the channel. Introduced with summarizerNode - will be required in a future release.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;

Parameters

Parameter Modifiers Type Description
fullTree optional boolean true to bypass optimizations and force a full summary tree.
trackState optional boolean This tells whether we should track state from this summary.
telemetryContext optional ITelemetryContext summary data passed through the layers for telemetry purposes

Returns

Return type: Promise<ISummaryTreeWithStats >

updateUsedRoutes

After GC has run, called to notify this channel of routes that are used in it.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/runtime-definitions/alpha.

For more information about our API support guarantees, see here .

Signature

updateUsedRoutes(usedRoutes: string[]): void;

Parameters

Parameter Type Description
usedRoutes string[] The routes that are used in this channel.