X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FWorkerChoiceStrategyContext.html;h=d477079af0fbbc2e47f74074274a4b18ef88c956;hb=31542ddfe8297d3bd0f9cf97a3de06a03dafc15d;hp=5e519cb2fc7d6e2b3e3eda98ca3aa896f7492172;hpb=23d03397abcbf7274ba08acf89728bcaf32f0f6f;p=poolifier.git diff --git a/docs/classes/WorkerChoiceStrategyContext.html b/docs/classes/WorkerChoiceStrategyContext.html index 5e519cb2..d123e6bf 100644 --- a/docs/classes/WorkerChoiceStrategyContext.html +++ b/docs/classes/WorkerChoiceStrategyContext.html @@ -1,4 +1,4 @@ -WorkerChoiceStrategyContext | poolifier
+WorkerChoiceStrategyContext | poolifier - v2.6.32
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.32
    @@ -17,28 +17,32 @@

    Class WorkerChoiceStrategyContext<Worker, Data, Response>

    The worker choice strategy context.

    -
    -
    +
    +
    +

    Type Parameters

    -
    +

    Response = unknown

    +

    Type of execution response. This can only be structured-cloneable data.

    +
    +

    Hierarchy

    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:27
  • @@ -46,119 +50,179 @@

    Constructors

    -
    - -
      - +
      + +
        +
      • Worker choice strategy context constructor.

        -
        +

        Type Parameters

        -
          +
          • -

            Worker extends IWorker<Worker>

          • +

            Worker extends IWorker

          • -

            Data = unknown

          • +

            Data = unknown

          • -

            Response = unknown

        +

        Response = unknown

      Parameters

      • -
        pool: IPool<Worker, Data, Response>
        +
        pool: IPool<Worker, Data, Response>

        The pool instance.

        -
      • +
      +
    • -
      workerChoiceStrategyType: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" = WorkerChoiceStrategies.ROUND_ROBIN
      +
      workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN" = WorkerChoiceStrategies.ROUND_ROBIN

      The worker choice strategy.

      -
    • + +
    • -
      opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
      +
      opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS

      The worker choice strategy options.

      -
    -

    Returns WorkerChoiceStrategyContext<Worker, Data, Response>

    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:49
  • Properties

    -
    - -
    workerChoiceStrategies: Map<"ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN", IWorkerChoiceStrategy>
    +
    + +
    workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN" = WorkerChoiceStrategies.ROUND_ROBIN

    The worker choice strategy.

    -
    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:51
  • Methods

    -
    - -
    +
    + +
    +
    + +
    -
    - -
    +
    + +
      +
    • -

      Removes a worker node key from the worker choice strategy in the context.

      +

      Removes the worker node key from the worker choice strategy in the context.

      +
      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      +

      Returns boolean

      true if the removal is successful, false otherwise.

      -

      Returns

      true if the removal is successful, false otherwise.

      +
    +
    + +
      + +
    • +

      Sets the worker choice strategies in the context options.

      Parameters

      • -
        workerNodeKey: number
        -

        The key of the worker node.

        -
      -

      Returns boolean

    +

    Returns void

    +
    -
    - -
    +
    + +
      +
    • Sets the worker choice strategy to use in the context.

      @@ -166,17 +230,36 @@

      Parameters

      • -
        workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
        +
        workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

        The worker choice strategy to set.

        -
      -

      Returns void

    +

    Returns void

    +
    +
    + +
    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:159
  • -

    On This Page

    +

    On This Page

    +
  • constructor
  • +
  • choiceRetriesCount
  • +
  • opts
  • +
  • workerChoiceStrategies
  • +
  • workerChoiceStrategy
  • +
  • execute
  • +
  • getStrategyPolicy
  • +
  • getTaskStatisticsRequirements
  • +
  • remove
  • +
  • setOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • update
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • Deque
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • EventLoopUtilizationMeasurementStatistics
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • IWorkerNode
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerInfo
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • KillHandler
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskAsyncFunction
  • +
  • TaskFunction
  • +
  • TaskFunctions
  • +
  • TaskSyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file