Skip to main content
Version: v1

LoaderContainerTracker Class

Signature

export declare class LoaderContainerTracker implements IOpProcessingController

Implements: IOpProcessingController

Constructors

ConstructorDescription
(constructor)(syncSummarizerClients)Constructs a new instance of the LoaderContainerTracker class

Methods

MethodReturn TypeDescription
add(loader)voidAdd a loader to start to track any container created from them
ensureSynchronized(containers)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.
pauseProcessing(containers)Promise<void>Pause all queue activities on the containers given, or all tracked containers Any containers given that is not tracked will be ignored.
processIncoming(containers)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
processOutgoing(containers)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
reset()voidReset the tracker, closing all containers and stop tracking them.
resumeProcessing(containers)IContainer[]Resume all queue activities on all paused tracked containers and return them

Constructor Details

(constructor)

Constructs a new instance of the LoaderContainerTracker class

Signature

constructor(syncSummarizerClients?: boolean);

Parameters

ParameterModifiersTypeDescription
syncSummarizerClientsoptionalboolean

Method Details

add

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

Signature

add<LoaderType extends IHostLoader>(loader: LoaderType): void;
Type Parameters
ParameterConstraintDescription
LoaderTypeIHostLoader

Parameters

ParameterTypeDescription
loaderLoaderTypeloader to start tracking any container created.

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.

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.

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

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

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.

Signature

reset(): void;

resumeProcessing

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

Signature

resumeProcessing(...containers: IContainer[]): IContainer[];

Parameters

ParameterTypeDescription
containersIContainer[]

Returns

Return type: IContainer[]