X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=dd9ae8d096761f959a17c8ca792f9d9ffec6a92b;hb=410724041bab556be1385c56f9a32e5030f6f2cf;hp=11d7386d79e90033ce8405289f86837bd4c10b7c;hpb=f8350486e75b15ed17249cda3d0a55ee807a6a9f;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index 11d7386d..dd9ae8d0 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,63 +1,68 @@ -IWorkerChoiceStrategy | poolifier
+IWorkerChoiceStrategy | poolifier - v2.7.3
-
+
  • The search index is not available
  • poolifier - v2.7.3 +
    -

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

    On This Page

    +

    On This Page

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