X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=563b04b00086a7a31a68f7cb25ca4bde6b513c92;hb=43b84974f72aecd75b4b592e0009359bd5baf228;hp=9f68c22f892c50a3e424b59a3cb0cffe9f61557f;hpb=6d1d4d956de1d48e51517014bc0b4c276bbf876a;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 9f68c22f..563b04b0 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -147,13 +147,15 @@ export interface TaskStatisticsRequirements { */ export interface StrategyPolicy { /** - * Expects direct usage of dynamic worker. + * Expects direct usage of the newly created dynamic worker. */ readonly useDynamicWorker: boolean } /** * Worker choice strategy interface. + * + * @internal */ export interface IWorkerChoiceStrategy { /** @@ -169,30 +171,30 @@ export interface IWorkerChoiceStrategy { * * @returns `true` if the reset is successful, `false` otherwise. */ - reset: () => boolean + readonly reset: () => boolean /** * Updates the worker node key strategy internals. * * @returns `true` if the update is successful, `false` otherwise. */ - update: (workerNodeKey: number) => boolean + readonly update: (workerNodeKey: number) => boolean /** * Chooses a worker node in the pool and returns its key. * * @returns The worker node key. */ - choose: () => number + readonly choose: () => number /** * Removes the worker node key from strategy internals. * * @param workerNodeKey - The worker node key. * @returns `true` if the worker node key is removed, `false` otherwise. */ - remove: (workerNodeKey: number) => boolean + readonly remove: (workerNodeKey: number) => boolean /** * Sets the worker choice strategy options. * * @param opts - The worker choice strategy options. */ - setOptions: (opts: WorkerChoiceStrategyOptions) => void + readonly setOptions: (opts: WorkerChoiceStrategyOptions) => void }