Skip to main content
Version: v2

ISummarizerNodeWithGC Interface

Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:

usedRoutes: The routes in this node that are currently in use.

getGCData: A new API that can be used to get the garbage collection data for this node.

summarize: Added a trackState flag which indicates whether the summarizer node should track the state of the summary or not.

createChild: Added the following params:

  • getGCDataFn: This gets the GC data from the caller. This must be provided in order for getGCData to work.
  • getInitialGCDetailsFn: This gets the initial GC details from the caller.

deleteChild: Deletes a child node.

isReferenced: This tells whether this node is referenced in the document or not.

updateUsedRoutes: Used to notify this node of routes that are currently in use in it.

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 ISummarizerNodeWithGC extends ISummarizerNode

Extends: ISummarizerNode

Methods​

MethodAlertsReturn TypeDescription
createChild(summarizeInternalFn, id, createParam, config, getGCDataFn, getBaseGCDetailsFn)BetaISummarizerNodeWithGC
deleteChild(id)BetavoidDelete the child with the given id..
getChild(id)BetaISummarizerNodeWithGC | undefined
getGCData(fullGC)BetaPromise<IGarbageCollectionData>Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent this node. Each node has a set of outbound routes to other GC nodes in the document.
isReferenced()BetabooleanTells whether this node is being referenced in this document or not. Unreferenced node will get GC'd
updateUsedRoutes(usedRoutes)BetavoidAfter GC has run, called to notify this node of routes that are used in it. These are used for the following: 1. To identify if this node is being referenced in the document or not. 2. To identify if this node or any of its children's used routes changed since last summary.

Method Details​

createChild​

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

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

Signature​

createChild(
summarizeInternalFn: SummarizeInternalFn,
id: string,
createParam: CreateChildSummarizerNodeParam,
config?: ISummarizerNodeConfigWithGC, getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>): ISummarizerNodeWithGC;

Parameters​

ParameterModifiersTypeDescription
summarizeInternalFnSummarizeInternalFn
idstring
createParamCreateChildSummarizerNodeParam
configoptionalISummarizerNodeConfigWithGC
getGCDataFnoptional(fullGC?: boolean) => Promise<IGarbageCollectionData>
getBaseGCDetailsFnoptional() => Promise<IGarbageCollectionDetailsBase>

Returns​

Return type: ISummarizerNodeWithGC

deleteChild​

Delete the child with the given id..

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

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

Signature​

deleteChild(id: string): void;

Parameters​

ParameterTypeDescription
idstring

getChild​

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

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

Signature​

getChild(id: string): ISummarizerNodeWithGC | undefined;

Parameters​

ParameterTypeDescription
idstring

Returns​

Return type: ISummarizerNodeWithGC | undefined

getGCData​

Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent this node. Each node has a set of outbound routes to other GC nodes in the document.

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

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

Signature​

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

Parameters​

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

Returns​

Return type: Promise<IGarbageCollectionData>

isReferenced​

Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd

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

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

Signature​

isReferenced(): boolean;

Returns​

Return type: boolean

updateUsedRoutes​

After GC has run, called to notify this node of routes that are used in it. These are used for the following: 1. To identify if this node is being referenced in the document or not. 2. To identify if this node or any of its children's used routes changed since last summary.

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

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

Signature​

updateUsedRoutes(usedRoutes: string[]): void;

Parameters​

ParameterTypeDescription
usedRoutesstring[]The routes that are used in this node.