X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FWorkerChoiceStrategyContext.html;h=7c5bb6a7ece1506ef0700a72fb31829effb2f17a;hb=e9fc6983e78e6e1ca6b29c5390ae66320cdf668a;hp=bfa141d3cce163e5c7881e082c88d4ba055f374d;hpb=0d60e26b333c8072404dee45d8602602515b3b22;p=poolifier.git diff --git a/docs/classes/WorkerChoiceStrategyContext.html b/docs/classes/WorkerChoiceStrategyContext.html index bfa141d3..7c5bb6a7 100644 --- a/docs/classes/WorkerChoiceStrategyContext.html +++ b/docs/classes/WorkerChoiceStrategyContext.html @@ -1,9 +1,9 @@ -WorkerChoiceStrategyContext | poolifier - v3.1.8

Class WorkerChoiceStrategyContext<Worker, Data, Response>

The worker choice strategy context.

-

Type Parameters

  • Worker extends IWorker

    Type of worker.

    -
  • Data = unknown

    Type of data sent to the worker. This can only be structured-cloneable data.

    -
  • Response = unknown

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

    -

Constructors

Properties

opts? +WorkerChoiceStrategyContext | poolifier - v3.1.18

Class WorkerChoiceStrategyContext<Worker, Data, Response>

The worker choice strategy context.

+

Type Parameters

  • Worker extends IWorker

    Type of worker.

    +
  • Data = unknown

    Type of data sent to the worker. This can only be structured-cloneable data.

    +
  • Response = unknown

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

    +

Constructors

  • Worker choice strategy context constructor.

    -

    Type Parameters

    • Worker extends IWorker

    • Data = unknown

    • Response = unknown

    Parameters

    • pool: IPool<Worker, Data, Response>

      The pool instance.

      +

Constructors

Properties

opts?: InternalWorkerChoiceStrategyOptions

The worker choice strategy options.

-
workerChoiceStrategies: Map<"ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_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.

-

Methods

  • Executes the worker choice strategy in the context algorithm.

    +
  • Optional opts: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    +

Returns WorkerChoiceStrategyContext<Worker, Data, Response>

Properties

retries: number

The number of worker choice strategy execution retries.

+
workerChoiceStrategies: Map<"ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN", IWorkerChoiceStrategy>

The worker choice strategy instances registered in the context.

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

+

Methods

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

    Parameters

    • 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

  • Updates the worker node key in the worker choice strategy in the context internals.

    +

Returns void

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file