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

ConstructorAlertsDescription
(constructor)(syncSummarizerClients)BetaConstructs a new instance of the LoaderContainerTracker class

Methods

MethodAlertsReturn TypeDescription
add(loader)BetavoidAdd a loader to start to track any container created from them
addContainer(container)BetavoidUtility function to add container to be tracked.
ensureSynchronized(containers)BetaPromise<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)BetaPromise<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)BetaPromise<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)BetaPromise<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()BetavoidReset the tracker, closing all containers and stop tracking them.
resumeProcessing(containers)BetaIContainer[]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

ParameterModifiersTypeDescription
syncSummarizerClientsoptionalboolean

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
ParameterConstraintDescription
LoaderTypeIHostLoader

Parameters

ParameterTypeDescription
loaderLoaderTypeloader 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

ParameterTypeDescription
containerIContainercontainer 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

ParameterTypeDescription
containersIContainer[]

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

ParameterTypeDescription
containersIContainer[]

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

ParameterTypeDescription
containersIContainer[]

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

ParameterTypeDescription
containersIContainer[]

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

ParameterTypeDescription
containersIContainer[]

Returns

Return type: IContainer[]