- private getPoolWorkerChoiceStrategy (
- workerChoiceStrategy: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN
- ): IWorkerChoiceStrategy<Worker> {
- if (this.pool.type === PoolType.DYNAMIC) {
- return new DynamicPoolWorkerChoiceStrategy(
- this.pool,
- this.createDynamicallyWorkerCallback,
- workerChoiceStrategy
- )
- }
- return getWorkerChoiceStrategy(this.pool, workerChoiceStrategy)
- }
-
- /**
- * Gets the worker choice strategy used in the context.
- *
- * @returns The worker choice strategy.
- */
- public getWorkerChoiceStrategy (): IWorkerChoiceStrategy<Worker> {
- return this.workerChoiceStrategy
+ public getRequiredStatistics (): RequiredStatistics {
+ return this.workerChoiceStrategy.requiredStatistics