Skip to main content

LoaderContainerTracker Class

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

To use, import via @fluidframework/test-utils/legacy.

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

Signature

export declare class LoaderContainerTracker implements IOpProcessingController

Implements: IOpProcessingController

Constructors

Constructor Alerts Description
(constructor)(syncSummarizerClients) Beta Constructs a new instance of the LoaderContainerTracker class

Methods

Method Alerts Return Type Description
add(loader) Beta void Add a loader to start to track any container created from them
addContainer(container) Beta void Utility function to add container to be tracked.
ensureSynchronized(containers) Beta Promise<void>

Make sure all the tracked containers are synchronized.

No isDirty (non-readonly) containers No extra clientId in quorum of any container that is not tracked and still opened. - i.e. no pending Join/Leave message. No unresolved proposal (minSeqNum >= lastProposalSeqNum) lastSequenceNumber of all container is the same clientSequenceNumberObserved is the same as clientSequenceNumber sent - this overlaps with !isDirty, but include task scheduler ops. - Trailing NoOp is tracked and don't count as pending ops.

Containers that are already pause will resume process and paused again once everything is synchronized. Containers that aren't paused will remain unpaused when this function returns.

pauseProcessing(containers) Beta Promise<void>

Pause all queue activities on the containers given, or all tracked containers Any containers given that is not tracked will be ignored.

When a container is paused, it is assumed that we want fine grain control over op sequencing. This function will prepare the container and force it into write mode to avoid missing join messages or change the sequence of event when switching from read to write mode.

processIncoming(containers) Beta Promise<void>

Pause all queue activities on all tracked containers, and resume only inbound to process ops until it is idle. All queues are left in the paused state after the function.

Pausing will switch the container to write mode. See pauseProcessing

processOutgoing(containers) Beta Promise<void>

Pause all queue activities on all tracked containers, and resume only outbound to process ops until it is idle. All queues are left in the paused state after the function.

Pausing will switch the container to write mode. See pauseProcessing

reset() Beta void Reset the tracker, closing all containers and stop tracking them.
resumeProcessing(containers) Beta IContainer[] Resume all queue activities on all paused tracked containers and return them

Constructor Details

(constructor)

Constructs a new instance of the LoaderContainerTracker class

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
constructor(syncSummarizerClients?: boolean);

Parameters

Parameter Modifiers Type Description
syncSummarizerClients optional boolean

Method Details

add

Add a loader to start to track any container created from them

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
add<LoaderType extends IHostLoader>(loader: LoaderType): void;
Type Parameters
Parameter Constraint Description
LoaderType IHostLoader

Parameters

Parameter Type Description
loader LoaderType loader to start tracking any container created.

addContainer

Utility function to add container to be tracked.

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
addContainer(container: IContainer): void;

Parameters

Parameter Type Description
container IContainer container to add

ensureSynchronized

Make sure all the tracked containers are synchronized.

No isDirty (non-readonly) containers No extra clientId in quorum of any container that is not tracked and still opened. - i.e. no pending Join/Leave message. No unresolved proposal (minSeqNum >= lastProposalSeqNum) lastSequenceNumber of all container is the same clientSequenceNumberObserved is the same as clientSequenceNumber sent - this overlaps with !isDirty, but include task scheduler ops. - Trailing NoOp is tracked and don't count as pending ops.

Containers that are already pause will resume process and paused again once everything is synchronized. Containers that aren't paused will remain unpaused when this function returns.

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
ensureSynchronized(...containers: IContainer[]): Promise<void>;

Parameters

Parameter Type Description
containers IContainer[]

Returns

Return type: Promise<void>

pauseProcessing

Pause all queue activities on the containers given, or all tracked containers Any containers given that is not tracked will be ignored.

When a container is paused, it is assumed that we want fine grain control over op sequencing. This function will prepare the container and force it into write mode to avoid missing join messages or change the sequence of event when switching from read to write mode.

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
pauseProcessing(...containers: IContainer[]): Promise<void>;

Parameters

Parameter Type Description
containers IContainer[]

Returns

Return type: Promise<void>

processIncoming

Pause all queue activities on all tracked containers, and resume only inbound to process ops until it is idle. All queues are left in the paused state after the function.

Pausing will switch the container to write mode. See pauseProcessing

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
processIncoming(...containers: IContainer[]): Promise<void>;

Parameters

Parameter Type Description
containers IContainer[]

Returns

Return type: Promise<void>

processOutgoing

Pause all queue activities on all tracked containers, and resume only outbound to process ops until it is idle. All queues are left in the paused state after the function.

Pausing will switch the container to write mode. See pauseProcessing

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
processOutgoing(...containers: IContainer[]): Promise<void>;

Parameters

Parameter Type Description
containers IContainer[]

Returns

Return type: Promise<void>

reset

Reset the tracker, closing all containers and stop tracking them.

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
reset(): void;

resumeProcessing

Resume all queue activities on all paused tracked containers and return them

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
resumeProcessing(...containers: IContainer[]): IContainer[];

Parameters

Parameter Type Description
containers IContainer[]

Returns

Return type: IContainer[]