Skip to main content

ISummarizerNode Interface

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 ISummarizerNode

Properties

PropertyAlertsModifiersTypeDescription
referenceSequenceNumberBetareadonlynumberLatest successfully acked summary reference sequence number

Methods

MethodAlertsModifiersReturn TypeDescription
createChild(summarizeInternalFn, id, createParam, config)BetaISummarizerNode
getChild(id)BetaISummarizerNode | undefined
invalidate(sequenceNumber)BetavoidMarks the node as having a change with the given sequence number.
isSummaryInProgress()BetaoptionalbooleanTrue if a summary is currently in progress
recordChange(op)BetavoidRecords an op representing a change to this node/subtree.
summarize(fullTree, trackState, telemetryContext)BetaPromise<ISummarizeResult>Calls the internal summarize function and handles internal state tracking.
updateBaseSummaryState(snapshot)Deprecated, BetavoidChecks if there are any additional path parts for children that need to be loaded from the base summary. Additional path parts represent parts of the path between this SummarizerNode and any child SummarizerNodes that it might have. For example: if datastore "a" contains dds "b", but the path is "/a/.channels/b", then the additional path part is ".channels".

Property Details

referenceSequenceNumber

Latest successfully acked summary reference sequence number

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

readonly referenceSequenceNumber: number;

Type: number

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?: ISummarizerNodeConfig): ISummarizerNode;

Parameters

ParameterModifiersTypeDescription
summarizeInternalFnSummarizeInternalFn
idstring
createParamCreateChildSummarizerNodeParam
configoptionalISummarizerNodeConfig

Returns

Return type: ISummarizerNode

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): ISummarizerNode | undefined;

Parameters

ParameterTypeDescription
idstring

Returns

Return type: ISummarizerNode | undefined

invalidate

Marks the node as having a change with the given sequence number.

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

invalidate(sequenceNumber: number): void;

Parameters

ParameterTypeDescription
sequenceNumbernumbersequence number of change

isSummaryInProgress

True if a summary is currently in progress

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

isSummaryInProgress?(): boolean;

Returns

Return type: boolean

recordChange

Records an op representing a change to this node/subtree.

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

recordChange(op: ISequencedDocumentMessage): void;

Parameters

ParameterTypeDescription
opISequencedDocumentMessageop of change to record

summarize

Calls the internal summarize function and handles internal state tracking.

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

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

Parameters

ParameterModifiersTypeDescription
fullTreebooleantrue to skip optimizations and always generate the full tree
trackStateoptionalbooleanindicates whether the summarizer node should track the state of the summary or not
telemetryContextoptionalITelemetryContextsummary data passed through the layers for telemetry purposes

Returns

Return type: Promise<ISummarizeResult>

updateBaseSummaryState

Checks if there are any additional path parts for children that need to be loaded from the base summary. Additional path parts represent parts of the path between this SummarizerNode and any child SummarizerNodes that it might have. For example: if datastore "a" contains dds "b", but the path is "/a/.channels/b", then the additional path part is ".channels".

This API is deprecated and will be removed in a future release.

The code now always assumes that all summary nodes have .channels in their handle so there is no need to maintain any additional path information.

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

updateBaseSummaryState(snapshot: ISnapshotTree): void;

Parameters

ParameterTypeDescription
snapshotISnapshotTreethe base summary to parse