X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=dc01966b074f391fe997566247ad762590766f5a;hb=c94b034ca040cb4a968d1cca995d89efd51d6402;hp=f53f31a5863ba6debf831d74773494dced1cb820;hpb=b8450a656d007edd200fdf785563d3a268bc09c6;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index f53f31a5..dc01966b 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,28 +1,25 @@ -IWorkerChoiceStrategy | poolifier - v3.1.9

Interface IWorkerChoiceStrategyInternal

Worker choice strategy interface.

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

Properties

choose: (() => undefined | number)

Type declaration

hasPoolWorkerNodesReady: (() => boolean)

Type declaration

    • (): boolean
    • Whether the pool has worker nodes ready or not.

      -

      Returns boolean

      Whether the pool has worker nodes ready or not.

      -
remove: ((workerNodeKey) => boolean)

Type declaration

    • (workerNodeKey): boolean
    • Removes the worker node key from strategy internals.

      -

      Parameters

      • workerNodeKey: number

        The worker node key.

        -

      Returns boolean

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

      -
reset: (() => boolean)

Type declaration

    • (): boolean
    • Resets strategy internals.

      -

      Returns boolean

      true if the reset is successful, false otherwise.

      -
setOptions: ((opts) => void)

Type declaration

    • (opts): void
    • Sets the worker choice strategy options.

      -

      Parameters

      Returns void

strategyPolicy: StrategyPolicy

Strategy policy.

-
taskStatisticsRequirements: TaskStatisticsRequirements

Tasks statistics requirements.

-
update: ((workerNodeKey) => boolean)

Type declaration

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.

+

Type declaration

    • (): boolean
    • Returns boolean

Returns

true if the reset is successful, false otherwise.

+
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. This is called after a task has been executed on a worker node.

-

Parameters

  • workerNodeKey: number

Returns boolean

true if the update is successful, false otherwise.

-

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Returns

true if the update is successful, false otherwise.

+

Generated using TypeDoc

\ No newline at end of file