X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FWorkerChoiceStrategyContext.html;h=93f3b9e9efb7597ec8f5a6112d41d15f9d8a7e01;hb=fd04474e1c355504be97747915708645fd338b6c;hp=920f2d1d3482463e14ad6a196c6093f061e4c0dd;hpb=71056a0ac555e096c1428d6341ef45c7980a6332;p=poolifier.git diff --git a/docs/classes/WorkerChoiceStrategyContext.html b/docs/classes/WorkerChoiceStrategyContext.html index 920f2d1d..93f3b9e9 100644 --- a/docs/classes/WorkerChoiceStrategyContext.html +++ b/docs/classes/WorkerChoiceStrategyContext.html @@ -1,4 +1,4 @@ -
Generated using TypeDoc
Type of data sent to the worker. This can only be serializable data.
+Type of data sent to the worker. This can only be structured-cloneable data.
Response = unknown
-Type of execution response. This can only be serializable data.
+Type of execution response. This can only be structured-cloneable data.
@@ -60,7 +60,8 @@
execute
-get Task Statistics
+get Strategy Policy
+get Task Statistics Requirements
remove
set Options
set Worker Choice Strategy
@@ -79,7 +80,7 @@
-
-
+-
-
@@ -93,7 +94,7 @@
-
@@ -105,22 +106,22 @@
Methods
Type Parameters
Worker extends IWorker<Worker>
Worker extends IWorker
Data = unknown
workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_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.
Returns WorkerChoiceStrategyContext<Worker, Data, Response>
Properties
Choice Strategies
-Private
Readonly
worker Choice Strategy
-Private
workerThe worker choice strategy.
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:44
Methods
Throws
https://nodejs.org/api/errors.html#class-error If the worker node key is null or undefined.
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:145
get Task Statistics
+get Strategy Policy
-- get
Task Statistics(): TaskStatistics
+- get
Strategy Policy(): StrategyPolicy
-
-
-
+- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:113
+
+
+- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:185
+- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:198
Gets the worker choice strategy task statistics in the context.
+Gets the strategy policy in the context.
Returns TaskStatistics
The task statistics.
+Returns StrategyPolicy
The strategy policy.
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:104
get Task Statistics Requirements
++- get
Task Statistics Requirements(): TaskStatisticsRequirements
+-
+
+
+
Gets the worker choice strategy task statistics requirements in the context.
+Returns TaskStatisticsRequirements
The task statistics requirements.
+ ++- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:126
remove
@@ -161,14 +174,14 @@-
workerNodeKey: number
-The key of the worker node.
+The worker node key.
Returns boolean
true
if the removal is successful,false
otherwise.-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:163
set Options
@@ -187,7 +200,7 @@
Returns void
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:176
set Worker Choice Strategy
@@ -199,14 +212,14 @@-
-
Parameters
workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_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
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:117
update
@@ -223,7 +236,7 @@
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:131