X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=6bc84d0eaec9a28e5a42e5fa60836bef197a0fb8;hb=c4a517416ff2c029d91a4ed006b94b23efb7d7a3;hp=4a0588fc2e62f7aa711b3f8f2a9b1dacf25d834c;hpb=c6ec7ba0bd7e4b55a552e3fd829617fba567ca93;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index 4a0588fc..6bc84d0e 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,25 +1,39 @@ -IWorkerChoiceStrategy | poolifier - v3.0.7

Interface IWorkerChoiceStrategyInternal

Worker choice strategy interface.

-

Hierarchy

  • IWorkerChoiceStrategy

Properties

choose +IWorkerChoiceStrategy | poolifier - v3.1.21

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: (() => undefined | number)

Type declaration

    • (): 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
    • 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.

      Returns undefined | number

      The worker node key or undefined.

      -
remove: ((workerNodeKey) => boolean)

Type declaration

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

      +

Returns

The worker node key or undefined.

+
remove: ((workerNodeKey) => boolean)

Removes the worker node key from strategy internals.

+

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.

      +

Param: workerNodeKey

The worker node key.

+

Returns

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

+
reset: (() => boolean)

Resets strategy internals.

+

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

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

Returns

true if the reset is successful, false otherwise.

+
setOptions: ((opts) => void)

Sets the worker choice strategy options.

+

Type declaration

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

      +

      Parameters

      Returns void

Param: opts

The worker choice strategy options.

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

Returns

true if the update is successful, false otherwise.

+

Generated using TypeDoc

\ No newline at end of file