Skip to main content
Version: v1

IFluidDataStoreChannel Interface

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

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

Signature​

export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable

Extends: IFluidRouter, IDisposable

Properties​

PropertyModifiersTypeDescription
attachStateAttachStateIndicates the attachment state of the channel to a host service.
idstring
visibilityStateoptionalVisibilityState

Methods​

MethodAlertsModifiersReturn TypeDescription
applyStashedOp(content)Promise<unknown>
attachGraph()Deprecatedvoid
bindToContext()Deprecatedvoid
getAttachSummary(telemetryContext)ISummaryTreeWithStatsRetrieves the summary used as part of the initial summary message
getGCData(fullGC)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()optionalvoidMakes 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)voidProcesses the op.
processSignal(message, local)voidProcesses the signal.
reSubmit(type, content, localOpMetadata)anyAsk the DDS to resubmit a message. This could be because we reconnected and this message was not acked.
rollback(type, content, localOpMetadata)optionalvoidRevert a local message.
setConnectionState(connected, clientId)anyNotifies this object about changes in the connection state.
summarize(fullTree, trackState, telemetryContext)Promise<ISummaryTreeWithStats>Generates a summary for the channel. Introduced with summarizerNode - will be required in a future release.
updateUsedRoutes(usedRoutes, gcTimestamp)voidAfter GC has run, called to notify this channel of routes that are used in it.

Property Details​

attachState​

Indicates the attachment state of the channel to a host service.

Signature​

readonly attachState: AttachState;

Type: AttachState

id​

Signature​

readonly id: string;

Type: string

visibilityState​

Signature​

readonly visibilityState?: VisibilityState;

Type: VisibilityState

Method Details​

applyStashedOp​

Signature​

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

Parameters​

ParameterTypeDescription
contentany

Returns​

Return type: Promise<unknown>

attachGraph​

This API is deprecated and will be removed in a future release.
  • This will be removed in favor of makeVisibleAndAttachGraph. Runs through the graph and attaches the bound handles. Then binds this runtime to the container.

Signature​

attachGraph(): void;

bindToContext​

This API is deprecated and will be removed in a future release.
  • This is an internal method that should not be exposed. Called to bind the runtime to the container. If the container is not attached to storage, then this would also be unknown to other clients.

Signature​

bindToContext(): void;

getAttachSummary​

Retrieves the summary used as part of the initial summary message

Signature​

getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;

Parameters​

ParameterModifiersTypeDescription
telemetryContextoptionalITelemetryContext

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.

Signature​

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

Parameters​

ParameterModifiersTypeDescription
fullGCoptionalbooleantrue 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.

Signature​

makeVisibleAndAttachGraph?(): void;

process​

Processes the op.

Signature​

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

Parameters​

ParameterTypeDescription
messageISequencedDocumentMessage
localboolean
localOpMetadataunknown

processSignal​

Processes the signal.

Signature​

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

Parameters​

ParameterTypeDescription
messageany
localboolean

reSubmit​

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

Signature​

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

Parameters​

ParameterTypeDescription
typestringThe type of the original message.
contentanyThe content of the original message.
localOpMetadataunknownThe local metadata associated with the original message.

Returns​

Return type: any

rollback​

Revert a local message.

Signature​

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

Parameters​

ParameterTypeDescription
typestringThe type of the original message.
contentanyThe content of the original message.
localOpMetadataunknownThe local metadata associated with the original message.

setConnectionState​

Notifies this object about changes in the connection state.

Signature​

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

Parameters​

ParameterModifiersTypeDescription
connectedboolean
clientIdoptionalstringID 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.

Signature​

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

Parameters​

ParameterModifiersTypeDescription
fullTreeoptionalbooleantrue to bypass optimizations and force a full summary tree.
trackStateoptionalbooleanThis tells whether we should track state from this summary.
telemetryContextoptionalITelemetryContextsummary 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.

Signature​

updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;

Parameters​

ParameterModifiersTypeDescription
usedRoutesstring[]The routes that are used in this channel.
gcTimestampoptionalnumberThe time when GC was run that generated these used routes. If any node becomes unreferenced as part of this GC run, this should be used to update the time when it happens.