IChannel Interface
To use, import via @fluidframework/datastore-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IChannel extends IFluidLoadable
Extends: IFluidLoadable
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
attributes | Alpha |
readonly |
IChannelAttributes | |
id | Alpha |
readonly |
string | A readonly identifier for the channel |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
connect(services) | Alpha |
void | Enables the channel to send and receive ops. |
getAttachSummary(fullTree, trackState, telemetryContext) | Alpha |
ISummaryTreeWithStats | 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. |
getGCData(fullGC) | Alpha |
IGarbageCollectionData | Returns the GC data for this channel. It contains a list of GC nodes that contains references to other GC nodes. |
isAttached() | Alpha |
boolean | Checks if the channel is attached to storage. |
summarize(fullTree, trackState, telemetryContext, incrementalSummaryContext) | Alpha |
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
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly attributes: IChannelAttributes;
Type: IChannelAttributes
id
A readonly identifier for the channel
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly id: string;
Type: string
Method Details
connect
Enables the channel to send and receive ops.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
connect(services: IChannelServices): void;
Parameters
Parameter | Type | Description |
---|---|---|
services | IChannelServices | The services 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.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
getAttachSummary(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
Remarks
Note: Since the 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 @fluidframework/protocol-definitions#ISummaryAttachment (handles to blobs uploaded async via the blob manager).
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
fullTree | optional | boolean |
A flag indicating whether the attempt should generate a full summary tree without any handles for unchanged subtrees. Default: |
trackState | optional | boolean |
An optimization for tracking state of objects across summaries. If the state of an object did not change since last successful summary, an @fluidframework/protocol-definitions#ISummaryHandle can be used instead of re-summarizing it. If this is 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 Default: |
telemetryContext | optional | ITelemetryContext | See ITelemetryContext. |
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.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
getGCData(fullGC?: boolean): IGarbageCollectionData;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
fullGC | optional | boolean | true to bypass optimizations and force full generation of GC data. |
Returns
Return type: IGarbageCollectionData
isAttached
Checks if the channel is attached to storage.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
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.
To use, import via @fluidframework/datastore-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext): Promise<ISummaryTreeWithStats>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
fullTree | optional | boolean |
flag indicating whether the attempt should generate a full summary tree without any handles for unchanged subtrees. It should only be set to true when generating a summary from the entire container. Default: |
trackState | optional | boolean |
An optimization for tracking state of objects across summaries. If the state of an object did not change since last successful summary, an @fluidframework/protocol-definitions#ISummaryHandle can be used instead of re-summarizing it. If this is Default: 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 |
telemetryContext | optional | ITelemetryContext | See ITelemetryContext. |
incrementalSummaryContext | optional | IExperimentalIncrementalSummaryContext |
Returns
A summary capturing the current state of the channel.
Return type: Promise<ISummaryTreeWithStats>