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 serializable data.

  • Response = unknown

    Type of execution response. This can only be serializable data.

Hierarchy

  • WorkerChoiceStrategyContext

Constructors

Properties

workerChoiceStrategies: Map<"ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN", IWorkerChoiceStrategy>
workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "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" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

      The worker choice strategy to set.

    Returns void

Generated using TypeDoc