Skip to content 

IFluidDataStoreChannel Interface

Packages > @fluidframework/runtime-definitions > IFluidDataStoreChannel

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, Partial<IProvideFluidDataStoreRegistry>, IDisposable 

Extends: IFluidRouter, Partial<IProvideFluidDataStoreRegistry>, IDisposable

Properties

List of properties of this interface
Property Type Description
attachState AttachState Indicates the attachment state of the data store to a host service.
changeConnectionState (value: ConnectionState, clientId?: string) => void
id string

Methods

List of methods of this class
Method Description
bindToContext() 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.
getAttachSnapshot() Retrieves the snapshot used as part of the initial snapshot message
process(message, local, localOpMetadata) Processes the op.
processSignal(message, local) Processes the signal.
reSubmit(type, content, localOpMetadata) Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.
setConnectionState(connected, clientId) Notifies this object about changes in the connection state.
snapshotInternal(fullTree) Generates a snapshot of the given data store
summarize(fullTree) Generates a summary for the data store. Introduced with summarizerNode - will be required in a future release.

Events

attachState

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

Signature:

readonly attachState: AttachState;

changeConnectionState

Signature:

changeConnectionState?: (value: ConnectionState, clientId?: string) => void;

id

Signature:

readonly id: string;

Methods

bindToContext

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;

Returns:

void

getAttachSnapshot

Retrieves the snapshot used as part of the initial snapshot message

Signature:

getAttachSnapshot(): ITreeEntry[];

Returns:

ITreeEntry[]

process

Processes the op.

Signature:

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

Parameters

List of parameters
Parameter Type Description
message ISequencedDocumentMessage
local boolean
localOpMetadata unknown

Returns:

void

processSignal

Processes the signal.

Signature:

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

Parameters

List of parameters
Parameter Type Description
message any
local boolean

Returns:

void

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

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

any

setConnectionState

Notifies this object about changes in the connection state.

Signature:

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

Parameters

List of parameters
Parameter Type Description
connected boolean
clientId 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:

any

snapshotInternal

Warning: This API is now obsolete.

in 0.22 summarizerNode

Generates a snapshot of the given data store

Signature:

snapshotInternal(fullTree?: boolean): Promise<ITreeEntry[]>;

Parameters

List of parameters
Parameter Type Description
fullTree boolean

Returns:

Promise<ITreeEntry[]>

summarize

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

Signature:

summarize?(fullTree?: boolean): Promise<ISummaryTreeWithStats>;

Parameters

List of parameters
Parameter Type Description
fullTree boolean true to bypass optimizations and force a full summary tree

Returns:

Promise<ISummaryTreeWithStats>