X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=e03b66ef6343e0efff719e87ef964efa29a0be24;hb=e159532bc99166fb928b43493814cb80c0c47d54;hp=80a03061747300888579beed2ea2c3acd4afe5fc;hpb=d1fc382e433aace0766dbbbfd000848bf1cd119b;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index 80a03061..e03b66ef 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,5 +1,5 @@ -IWorkerChoiceStrategy | poolifier - v3.1.27

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 - v3.1.28

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 remove reset setOptions @@ -10,16 +10,16 @@ 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.

+
remove: ((workerNodeKey) => 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.

+
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.

+
setOptions: ((opts) => 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) => boolean)

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

Type declaration

    • (workerNodeKey): boolean
    • Parameters

      • workerNodeKey: number

      Returns boolean

Returns

true if the update is successful, false otherwise.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file