Skip to main content

IFluidParentContext Interface

Context for an IDataStore like object.

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.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature​

/** @sealed */
export interface IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry>

Extends: IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry>

Remarks​

This context does NOT represent common information provided to all channels under a specific parent. Each implementation of IFluidDataStoreChannel will receive its own instance of this context that contains specifically the data it needs.

This layout is temporary, as IFluidParentContext and IFluidDataStoreContext will converge. Therefore the semantics of these two interfaces is not really distinct.

Properties​

PropertyAlertsModifiersTypeDescription
attachStateBetareadonlyAttachStateIndicates the attachment state of the data store to a host service.
baseLoggerBetareadonlyITelemetryBaseLogger
clientDetailsBetareadonlyIClientDetails
clientIdBetareadonlystring | undefined
connectedBetareadonlyboolean
containerRuntimeBetareadonlyIContainerRuntimeBase
deltaManagerBetareadonlyIDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
gcThrowOnTombstoneUsageDeprecated, Betareadonlyboolean
gcTombstoneEnforcementAllowedDeprecated, Betareadonlyboolean
idCompressorBetaoptional, readonlyIIdCompressor
isReadOnlyBetaoptional, readonly() => booleanIndicates if the parent context is readonly. If isReadOnly is true, the consumer of the context should also consider themselves readonly.
loadingGroupIdBetaoptional, readonlystringRepresents the loading group to which the data store belongs to. Please refer to this readme for more context. README
minVersionForCollabBetareadonlyOldestSupportedClientVersionOldest Fluid Framework client version that must be able to process documents written by the runtime. Consumed by @fluidframework/container-runtime#FluidDataStoreContext. See oldestSupportedClient for more details.
optionsBetareadonlyRecord<string | number, any>
scopeBetareadonlyFluidObjectAmbient services provided with the context
storageBetareadonlyIRuntimeStorageService
submitSignalBeta(type: string, content: unknown, targetClientId?: string) => voidSubmits the signal to be sent to other clients.

Methods​

MethodAlertsReturn TypeDescription
addedGCOutboundRoute(fromPath, toPath, messageTimestampMs)BetavoidCalled when a new outbound reference is added to another node. This is used by garbage collection to identify all references added in the system.
deleteChildSummarizerNode(id)Betavoid
getAbsoluteUrl(relativeUrl)BetaPromise<string | undefined>Get an absolute url to the container based on the provided relativeUrl. Returns undefined if the container or data store isn't attached to storage.
getAudience()BetaIAudienceReturns the current audience.
getCreateChildSummarizerNodeFn(id, createParam)BetaCreateChildSummarizerNodeFn
getQuorum()BetaIQuorumClientsReturns the current quorum.
makeLocallyVisible()BetavoidCalled to make the data store locally visible in the container. This happens automatically for root data stores when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
setChannelDirty(address)BetavoidCalled by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
submitMessage(type, content, localOpMetadata)BetavoidSubmits the message to be sent to other clients.
uploadBlob(blob, signal)BetaPromise<IFluidHandleInternal<ArrayBufferLike>>

Property Details​

attachState​

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

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 attachState: AttachState;

Type: AttachState

baseLogger​

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 baseLogger: ITelemetryBaseLogger;

Type: ITelemetryBaseLogger

clientDetails​

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 clientDetails: IClientDetails;

Type: IClientDetails

clientId​

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 clientId: string | undefined;

Type: string | undefined

connected​

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 connected: boolean;

Type: boolean

containerRuntime​

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 containerRuntime: IContainerRuntimeBase;

Type: IContainerRuntimeBase

deltaManager​

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 deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;

Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>

gcThrowOnTombstoneUsage​

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

this functionality has been removed.

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 gcThrowOnTombstoneUsage: boolean;

Type: boolean

gcTombstoneEnforcementAllowed​

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

this functionality has been removed.

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 gcTombstoneEnforcementAllowed: boolean;

Type: boolean

idCompressor​

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 idCompressor?: IIdCompressor;

Type: IIdCompressor

isReadOnly​

Indicates if the parent context is readonly. If isReadOnly is true, the consumer of the context should also consider themselves readonly.

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 isReadOnly?: () => boolean;

Type: () => boolean

loadingGroupId​

Represents the loading group to which the data store belongs to. Please refer to this readme for more context. README

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 loadingGroupId?: string;

Type: string

minVersionForCollab​

Oldest Fluid Framework client version that must be able to process documents written by the runtime. Consumed by @fluidframework/container-runtime#FluidDataStoreContext. See oldestSupportedClient for more details.

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 minVersionForCollab: OldestSupportedClientVersion;

Type: OldestSupportedClientVersion

Remarks​

The property name is retained while the cross-layer dual-property migration in https://github.com/microsoft/FluidFramework/issues/27851 is completed.

options​

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 options: Record<string | number, any>;

Type: Record<string | number, any>

scope​

Ambient services provided with the context

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 scope: FluidObject;

Type: FluidObject

storage​

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 storage: IRuntimeStorageService;

Type: IRuntimeStorageService

submitSignal​

Submits the signal to be sent to other clients.

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​

submitSignal: (type: string, content: unknown, targetClientId?: string) => void;

Type: (type: string, content: unknown, targetClientId?: string) => void

Method Details​

addedGCOutboundRoute​

Called when a new outbound reference is added to another node. This is used by garbage collection to identify all references added in the system.

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​

addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;

Parameters​

ParameterModifiersTypeDescription
fromPathstringThe absolute path of the node that added the reference.
toPathstringThe absolute path of the outbound node that is referenced.
messageTimestampMsoptionalnumberThe timestamp of the message that added the reference.

deleteChildSummarizerNode​

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​

deleteChildSummarizerNode(id: string): void;

Parameters​

ParameterTypeDescription
idstring

getAbsoluteUrl​

Get an absolute url to the container based on the provided relativeUrl. Returns undefined if the container or data store isn't attached to storage.

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​

getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;

Parameters​

ParameterTypeDescription
relativeUrlstringA relative request within the container

Returns​

Return type: Promise<string | undefined>

getAudience​

Returns the current audience.

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​

getAudience(): IAudience;

Returns​

Return type: IAudience

getCreateChildSummarizerNodeFn​

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​

getCreateChildSummarizerNodeFn(
id: string,
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;

Parameters​

ParameterTypeDescription
idstring
createParamCreateChildSummarizerNodeParam

Returns​

Return type: CreateChildSummarizerNodeFn

getQuorum​

Returns the current quorum.

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​

getQuorum(): IQuorumClients;

Returns​

Return type: IQuorumClients

makeLocallyVisible​

Called to make the data store locally visible in the container. This happens automatically for root data stores when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.

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​

makeLocallyVisible(): void;

setChannelDirty​

Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the 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​

setChannelDirty(address: string): void;

Parameters​

ParameterTypeDescription
addressstringThe address of the channel that is dirty.

submitMessage​

Submits the message to be sent to other clients.

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​

submitMessage(type: string, content: any, localOpMetadata: unknown): void;

Parameters​

ParameterTypeDescription
typestringType of the message.
contentanyContent of the message.
localOpMetadataunknownThe local metadata associated with the message. This is kept locally and not sent to the server. This will be sent back when this message is received back from the server. This is also sent if we are asked to resubmit the message.

uploadBlob​

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​

uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandleInternal<ArrayBufferLike>>;

Parameters​

ParameterModifiersTypeDescription
blobArrayBufferLike
signaloptionalAbortSignal

Returns​

Return type: Promise<IFluidHandleInternal<ArrayBufferLike>>