X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=78d4e58e4a1b8aa2ae1015c521f981d871af2989;hb=224d008191f52fa20b93e1ba67919569f8d6e315;hp=dea03eb8a374d549a54e9c81ee3716385c565bd8;hpb=dea42379cfdbcf1c1c9800df7c097eab484ebc07;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index dea03eb8..78d4e58e 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,25 +1,25 @@ -IWorkerChoiceStrategy | poolifier - v4.0.15

Interface IWorkerChoiceStrategyInternal

Worker choice strategy interface.

-
interface IWorkerChoiceStrategy {
    choose: (() => undefined | number);
    remove: ((workerNodeKey) => boolean);
    reset: (() => boolean);
    setOptions: ((opts) => void);
    strategyPolicy: StrategyPolicy;
    taskStatisticsRequirements: TaskStatisticsRequirements;
    update: ((workerNodeKey) => boolean);
}

Properties

choose +IWorkerChoiceStrategy | poolifier - v4.0.15

Interface IWorkerChoiceStrategyInternal

Worker choice strategy interface.

+
interface IWorkerChoiceStrategy {
    choose: (() => undefined | number);
    remove: ((workerNodeKey: number) => boolean);
    reset: (() => boolean);
    setOptions: ((opts: undefined | WorkerChoiceStrategyOptions) => void);
    strategyPolicy: StrategyPolicy;
    taskStatisticsRequirements: TaskStatisticsRequirements;
    update: ((workerNodeKey: number) => boolean);
}

Properties

choose: (() => undefined | number)

Chooses a worker node in the pool and returns its key. +

Properties

choose: (() => undefined | number)

Chooses a worker node in the pool and returns its key. If no worker nodes are not eligible, undefined is returned. If undefined is returned, the caller retry.

-

Type declaration

    • (): undefined | number
    • Returns undefined | number

Returns

The worker node key or undefined.

-
remove: ((workerNodeKey) => boolean)

Removes the worker node key from strategy internals.

+

Type declaration

    • (): undefined | number
    • Returns undefined | number

      The worker node key or undefined.

      +
remove: ((workerNodeKey: number) => boolean)

Removes the worker node key from strategy internals.

Type declaration

    • (workerNodeKey): boolean
    • Parameters

      • workerNodeKey: number

        The worker node key.

        -

      Returns boolean

Returns

true if the worker node key is removed, false otherwise.

-
reset: (() => boolean)

Resets strategy internals.

-

Type declaration

    • (): boolean
    • Returns boolean

Returns

true if the reset is successful, false otherwise.

-
setOptions: ((opts) => void)

Sets the worker choice strategy options.

+

Returns boolean

true if the worker node key is removed, false otherwise.

+
reset: (() => boolean)

Resets strategy internals.

+

Type declaration

setOptions: ((opts: undefined | WorkerChoiceStrategyOptions) => void)

Sets the worker choice strategy options.

Type declaration

strategyPolicy: StrategyPolicy

Strategy policy.

-
taskStatisticsRequirements: TaskStatisticsRequirements

Tasks statistics requirements.

-
update: ((workerNodeKey) => boolean)

Updates the worker node key strategy internals. +

Returns void

strategyPolicy: StrategyPolicy

Strategy policy.

+
taskStatisticsRequirements: TaskStatisticsRequirements

Tasks statistics requirements.

+
update: ((workerNodeKey: number) => boolean)

Updates the worker node key strategy internals. This is called after a task has been executed on a worker node.

-

Type declaration

Returns

true if the update is successful, false otherwise.

-
\ No newline at end of file +

Type declaration

\ No newline at end of file