Skip to main content

IFluidParentContext Interface

Represents the context for the data store like objects. It is used by the data store runtime to get information and call functionality to its parent.

This layout is temporary, as IFluidParentContext and IFluidDataStoreContext will converge.

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 IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry>

Extends: IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry>

Properties

Property Alerts Modifiers Type Description
attachState Alpha readonly AttachState Indicates the attachment state of the data store to a host service.
baseLogger Alpha readonly ITelemetryBaseLogger
clientDetails Alpha readonly IClientDetails
clientId Alpha readonly string | undefined
connected Alpha readonly boolean
containerRuntime Alpha readonly IContainerRuntimeBase
deltaManager Alpha readonly IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
gcThrowOnTombstoneUsage Deprecated, Alpha readonly boolean
gcTombstoneEnforcementAllowed Deprecated, Alpha readonly boolean
idCompressor Alpha optional, readonly IIdCompressor
isReadOnly Alpha optional, readonly () => boolean Indicates if the parent context is readonly. If isReadOnly is true, the consumer of the context should also consider themselves readonly.
loadingGroupId Alpha optional, readonly string Represents the loading group to which the data store belongs to. Please refer to this readme for more context. README
options Alpha readonly Record<string | number, any>
scope Alpha readonly FluidObject Ambient services provided with the context
storage Alpha readonly IDocumentStorageService
submitSignal Alpha (type: string, content: unknown, targetClientId?: string) => void Submits the signal to be sent to other clients.

Methods

Method Alerts Return Type Description
addedGCOutboundRoute(fromPath, toPath, messageTimestampMs) Alpha void 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.
deleteChildSummarizerNode(id) Alpha void
getAbsoluteUrl(relativeUrl) Alpha Promise<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() Alpha IAudience Returns the current audience.
getCreateChildSummarizerNodeFn(id, createParam) Alpha CreateChildSummarizerNodeFn
getQuorum() Alpha IQuorumClients Returns the current quorum.
makeLocallyVisible() Alpha void 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.
setChannelDirty(address) Alpha void Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
submitMessage(type, content, localOpMetadata) Alpha void Submits the message to be sent to other clients.
uploadBlob(blob, signal) Alpha Promise<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

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: IDocumentStorageService;

Type: IDocumentStorageService

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

Parameter Modifiers Type Description
fromPath string The absolute path of the node that added the reference.
toPath string The absolute path of the outbound node that is referenced.
messageTimestampMs optional number The 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

Parameter Type Description
id string

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

Parameter Type Description
relativeUrl string A 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

Parameter Type Description
id string
createParam CreateChildSummarizerNodeParam

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

Parameter Type Description
address string The 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

Parameter Type Description
type string Type of the message.
content any Content of the message.
localOpMetadata unknown The 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

Parameter Modifiers Type Description
blob ArrayBufferLike
signal optional AbortSignal

Returns

Return type: Promise<IFluidHandleInternal<ArrayBufferLike>>