X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=b72eb92e730b6fec1ee83e6b6c6bbf5be4f43cac;hb=f8b3d84c1c95773a1e18d2c025d89d73c4f2ab15;hp=f8650283a988dbd73ebe4125476d21f3e3ce7808;hpb=2771e5dcac6411a9731c66730072fcc578ff701c;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index f8650283..b72eb92e 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,221 +1,28 @@ -IWorkerChoiceStrategy | poolifier - v2.7.2
-
- -
-
-
-
- -

Interface IWorkerChoiceStrategyInternal

-
-

Worker choice strategy interface.

-
-
-
-

Hierarchy

-
    -
  • IWorkerChoiceStrategy
-
-
-
- -
-
-

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

Type declaration

-
    -
  • -
      -
    • (): undefined | number
    • -
    • -

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

Properties

choose: (() => undefined | number)

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.

      -
      -
      -

      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

-
    -
  • -
      -
    • (workerNodeKey): boolean
    • -
    • -

      Updates the worker node key strategy internals.

      -
      -
      -

      Parameters

      -
        -
      • -
        workerNodeKey: number
      -

      Returns boolean

      true if the update is successful, false otherwise.

      - -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Returns undefined | number

The worker node key or undefined.

+
hasPoolWorkerNodesReady: (() => boolean)

Type declaration

remove: ((workerNodeKey) => boolean)

Type declaration

reset: (() => boolean)

Type declaration

setOptions: ((opts) => void)

Type declaration

strategyPolicy: StrategyPolicy

Strategy policy.

+
taskStatisticsRequirements: TaskStatisticsRequirements

Tasks statistics requirements.

+
update: ((workerNodeKey) => boolean)

Type declaration

Generated using TypeDoc

\ No newline at end of file