X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.ts;h=a88a8eed1eee1b2f627fcd4b1fe89489e44a8394;hb=bdede008ae867784cd6dfa7468a930d7c026177b;hp=b84a8632ffc35a78a71742aa206274997b45eb6d;hpb=0a01b5c3aa58059e7241d4394cf3953779029507;p=poolifier.git diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index b84a8632..a88a8eed 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -39,7 +39,7 @@ export class WorkerChoiceStrategyContext< } /** - * Get the worker choice strategy instance specific to the pool type. + * Gets the worker choice strategy instance specific to the pool type. * * @param workerChoiceStrategy The worker choice strategy. * @returns The worker choice strategy instance for the pool type. @@ -61,7 +61,16 @@ export class WorkerChoiceStrategyContext< } /** - * Set the worker choice strategy to use in the context. + * Gets the worker choice strategy used in the context. + * + * @returns The worker choice strategy. + */ + public getWorkerChoiceStrategy (): IWorkerChoiceStrategy { + return this.workerChoiceStrategy + } + + /** + * Sets the worker choice strategy to use in the context. * * @param workerChoiceStrategy The worker choice strategy to set. */ @@ -74,7 +83,7 @@ export class WorkerChoiceStrategyContext< } /** - * Choose a worker with the underlying selection strategy. + * Chooses a worker with the underlying selection strategy. * * @returns The chosen one. */