X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FWorkerChoiceStrategyContext.html;h=fdd70a7ef1b8009acde185730d09aebacbff29f0;hb=c07a5f0885feb4abeb50f7b7708048c494c1fc2a;hp=52408c818b6e53fd1dcc33d78f319df7e48796c5;hpb=efa4dae64207a27154132ed0de1fe9259e7c7a03;p=poolifier.git diff --git a/docs/classes/WorkerChoiceStrategyContext.html b/docs/classes/WorkerChoiceStrategyContext.html index 52408c81..fdd70a7e 100644 --- a/docs/classes/WorkerChoiceStrategyContext.html +++ b/docs/classes/WorkerChoiceStrategyContext.html @@ -1,40 +1,46 @@ -WorkerChoiceStrategyContext | poolifier - v3.0.10

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 -retriesCount +WorkerChoiceStrategyContext | poolifier - v3.1.21

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: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS

The worker choice strategy options.

-
retriesCount: number = 0

The number of times the worker choice strategy in the context has been retried.

-
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 maximum number of worker choice strategy execution retries.

+
retriesCount: 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