X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=b72eb92e730b6fec1ee83e6b6c6bbf5be4f43cac;hb=90e3ad3a6abc5f39b81fb32e32d1d787bf85cf5d;hp=14d9661d7686932d4f0e0ef3dc60db1a249926a5;hpb=1f9e78bf296d318acc29016077d9aa29f305a04f;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index 14d9661d..b72eb92e 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,5 +1,5 @@ -IWorkerChoiceStrategy | poolifier - v3.1.5

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 +IWorkerChoiceStrategy | poolifier - v3.1.11

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 hasPoolWorkerNodesReady remove reset @@ -11,18 +11,18 @@ If no worker nodes are not eligible, undefined is returned. If undefined is returned, the caller retry.

Returns undefined | number

The worker node key or undefined.

-
hasPoolWorkerNodesReady: (() => boolean)

Type declaration

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

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

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

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

      +
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

    • (workerNodeKey): boolean
    • Updates the worker node key strategy internals. +

Returns void

strategyPolicy: StrategyPolicy

Strategy policy.

+
taskStatisticsRequirements: TaskStatisticsRequirements

Tasks statistics requirements.

+
update: ((workerNodeKey) => boolean)

Type declaration

    • (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 +

Generated using TypeDoc

\ No newline at end of file