Skip to main content
Version: v1

IChannel Interface

Signature​

export interface IChannel extends IFluidLoadable

Extends: IFluidLoadable

Properties​

PropertyModifiersTypeDescription
attributesIChannelAttributes
idstringA readonly identifier for the channel
owneroptionalstring

Methods​

MethodReturn TypeDescription
connect(services)voidEnables the channel to send and receive ops.
getAttachSummary(fullTree, trackState, telemetryContext)ISummaryTreeWithStatsGenerates summary of the channel synchronously. It is called when an attach message for a local channel is generated. In other words, when the channel is being attached to make it visible to other clients. Note: Since Attach Summary is generated for local channels when making them visible to remote clients, they don't have any previous summaries to compare against. For this reason, The attach summary cannot contain summary handles (paths to sub-trees or blobs). It can, however, contain ISummaryAttachment (handles to blobs uploaded async via the blob manager).
getGCData(fullGC)IGarbageCollectionDataReturns the GC data for this channel. It contains a list of GC nodes that contains references to other GC nodes.
isAttached()booleanChecks if the channel is attached to storage.
summarize(fullTree, trackState, telemetryContext)Promise<ISummaryTreeWithStats>Generates summary of the channel asynchronously. This should not be called where the channel can be modified while summarization is in progress.

Property Details​

attributes​

Signature​

readonly attributes: IChannelAttributes;

Type: IChannelAttributes

id​

A readonly identifier for the channel

Signature​

readonly id: string;

Type: string

owner​

Signature​

readonly owner?: string;

Type: string

Method Details​

connect​

Enables the channel to send and receive ops.

Signature​

connect(services: IChannelServices): void;

Parameters​

ParameterTypeDescription
servicesIChannelServicesServices to connect to

getAttachSummary​

Generates summary of the channel synchronously. It is called when an attach message for a local channel is generated. In other words, when the channel is being attached to make it visible to other clients. Note: Since Attach Summary is generated for local channels when making them visible to remote clients, they don't have any previous summaries to compare against. For this reason, The attach summary cannot contain summary handles (paths to sub-trees or blobs). It can, however, contain ISummaryAttachment (handles to blobs uploaded async via the blob manager).

Signature​

getAttachSummary(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;

Parameters​

ParameterModifiersTypeDescription
fullTreeoptionalbooleanflag indicating whether the attempt should generate a full summary tree without any handles for unchanged subtrees.
trackStateoptionalbooleanoptimization for tracking state of objects across summaries. If the state of an object did not change since last successful summary, an ISummaryHandle can be used instead of re-summarizing it. If this is false, the expectation is that you should never send an ISummaryHandle since you are not expected to track state. Note: The goal is to remove the trackState and automatically decided whether the handles will be used or not: https://github.com/microsoft/FluidFramework/issues/10455
telemetryContextoptionalITelemetryContext

Returns​

A summary capturing the current state of the channel.

Return type: ISummaryTreeWithStats

getGCData​

Returns the GC data for this channel. It contains a list of GC nodes that contains references to other GC nodes.

Signature​

getGCData(fullGC?: boolean): IGarbageCollectionData;

Parameters​

ParameterModifiersTypeDescription
fullGCoptionalbooleantrue to bypass optimizations and force full generation of GC data.

Returns​

Return type: IGarbageCollectionData

isAttached​

Checks if the channel is attached to storage.

Signature​

isAttached(): boolean;

Returns​

True iff the channel is attached.

Return type: boolean

summarize​

Generates summary of the channel asynchronously. This should not be called where the channel can be modified while summarization is in progress.

Signature​

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

Parameters​

ParameterModifiersTypeDescription
fullTreeoptionalbooleanflag indicating whether the attempt should generate a full summary tree without any handles for unchanged subtrees. It is only set to true when generating a summary from the entire container.
trackStateoptionalbooleanThis tells whether we should track state from this summary.
telemetryContextoptionalITelemetryContext

Returns​

A summary capturing the current state of the channel.

Return type: Promise<ISummaryTreeWithStats>