X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=9cd1e2749f322c4dc32c0c840336f63995fc0b11;hb=b9f66dae32dbfe46e83c7a498c133855fc6af2a2;hp=fb947ac43242b38afd0995fbb555fde9af53e1ad;hpb=184d530faf6acf70e116cb4a3fb831938b73e2c0;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index fb947ac4..9cd1e274 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,63 +1,68 @@ -IWorkerChoiceStrategy | poolifier
+IWorkerChoiceStrategy | poolifier - v3.0.0
-
+
  • The search index is not available
  • poolifier - v3.0.0 +
    -

    Interface IWorkerChoiceStrategy

    +

    Interface IWorkerChoiceStrategyInternal

    Worker choice strategy interface.

    -
    +
    +

    Hierarchy

    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:168
  • - +

    Properties

    - -
    choose: (() => number)
    + +
    choose: (() => undefined | number)

    Type declaration

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

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

        +

        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 number

        The worker node key.

        -
    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:197
  • - +
    remove: ((workerNodeKey) => boolean)

    Type declaration

    @@ -74,20 +79,15 @@
  • workerNodeKey: number

    The worker node key.

    -
  • + +

    Returns boolean

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

    -
    -
    - -
    requiredStatistics: RequiredStatistics
    -

    Required tasks usage statistics.

    -
    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:204
  • - +
    reset: (() => boolean)

    Type declaration

    @@ -99,11 +99,12 @@

    Resets strategy internals.

    Returns boolean

    true if the reset is successful, false otherwise.

    -
    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:182
  • - +
    setOptions: ((opts) => void)

    Type declaration

    @@ -120,12 +121,30 @@
  • opts: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

    +
    + +
    strategyPolicy: StrategyPolicy
    +

    Strategy policy.

    +
    +
    +
    + +
    taskStatisticsRequirements: TaskStatisticsRequirements
    +

    Tasks statistics requirements.

    +
    +
    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:176
  • - +
    update: ((workerNodeKey) => boolean)

    Type declaration

    @@ -134,7 +153,8 @@

    Returns boolean

    true if the update is successful, false otherwise.

    -
    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:189
  • +
  • choose
  • +
  • remove
  • +
  • reset
  • +
  • setOptions
  • +
  • strategyPolicy
  • +
  • taskStatisticsRequirements
  • +
  • update
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file