X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorkerChoiceStrategy.html;h=a764fb77ba404398bea642edf38c44288742e475;hb=2a6631992868d900762f62e4c228dce4e4ee549a;hp=06f9773281c431202933ff754a88f739eb625ef7;hpb=67a6f2fa4500ca41675aaec32730093d312a351d;p=poolifier.git diff --git a/docs/interfaces/IWorkerChoiceStrategy.html b/docs/interfaces/IWorkerChoiceStrategy.html index 06f97732..a764fb77 100644 --- a/docs/interfaces/IWorkerChoiceStrategy.html +++ b/docs/interfaces/IWorkerChoiceStrategy.html @@ -1,4 +1,4 @@ -IWorkerChoiceStrategy | poolifier
+IWorkerChoiceStrategy | poolifier

Worker choice strategy interface.

-
+
+

Hierarchy

  • IWorkerChoiceStrategy
+
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:158
  • @@ -31,82 +32,84 @@

    Properties

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

    Type declaration

    • -
        +
        • (): number
        • Chooses a worker node in the pool and returns its key.

          -

          Returns number

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

    Type declaration

    • -
        -
      • (workerNodeKey: number): boolean
      • +
          +
        • (workerNodeKey): boolean
        • -

          Removes a worker node key from strategy internals.

          +

          Removes the worker node key from strategy internals.

          Parameters

          • -
            workerNodeKey: number
            +
            workerNodeKey: number

            The worker node key.

            -
          -

          Returns boolean

    -
    - -
    requiredStatistics: RequiredStatistics
    -

    Required tasks usage statistics.

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

    Type declaration

    • -
        +
        • (): boolean
        • -

          Resets strategy internals (counters, statistics, etc.).

          +

          Resets strategy internals.

          -

          Returns boolean

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

    Type declaration

    -

    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.

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

    On This Page

    +

    On This Page

    +
  • choose
  • +
  • remove
  • +
  • reset
  • +
  • setOptions
  • +
  • strategyPolicy
  • +
  • taskStatisticsRequirements
  • +
  • update
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • Queue
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • EventLoopUtilizationMeasurementStatistics
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerInfo
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file