X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FWorkerChoiceStrategyContext.html;h=a110781d33232d37523deb6f7ca6e384f5410956;hb=54381832fc5daf816116d769abbd595d2b71baa9;hp=4722f9aedd93bfe7aa4a9dba3a9a952db4d553e3;hpb=004a8816ae9b52388de246a9c7a5184a73915ad6;p=poolifier.git diff --git a/docs/classes/WorkerChoiceStrategyContext.html b/docs/classes/WorkerChoiceStrategyContext.html index 4722f9ae..a110781d 100644 --- a/docs/classes/WorkerChoiceStrategyContext.html +++ b/docs/classes/WorkerChoiceStrategyContext.html @@ -1,13 +1,13 @@ -
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.
-
+Index
Index
Constructors
-Properties
-Methods
-Constructors
constructor
+constructor
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
+
+Private
optsThe worker choice strategy options.
+ Count
+Private
retriesThe number of times the worker choice strategy in the context has been retried.
+ 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
Executes the worker choice strategy algorithm in the context.
+Executes the worker choice strategy in the context algorithm.
Returns number
The key of the worker node.
Throws
https://nodejs.org/api/errors.html#class-error If the worker node key is null or undefined.
+Throws
https://nodejs.org/api/errors.html#class-error If after configured retries 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
Strategy Policy(): StrategyPolicy
+-
+
+
+
Gets the strategy policy in the context.
+Returns StrategyPolicy
The strategy policy.
+ ++- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:119
get Task Statistics Requirements
-- get
Task Statistics(): TaskStatistics
+- get
Task Statistics Requirements(): TaskStatisticsRequirements
-
-
-
+- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:132
+- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:200
+- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:213
Gets the worker choice strategy task statistics in the context.
+Gets the worker choice strategy in the context task statistics requirements.
Returns TaskStatistics
The task statistics.
+Returns TaskStatisticsRequirements
The task statistics requirements.
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:104
remove
@@ -161,14 +192,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 +218,7 @@
Returns void
-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:176
set Worker Choice Strategy
@@ -199,20 +230,20 @@-
-
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
Updates the worker node key in the worker choice strategy internals in the context.
+Updates the worker node key in the worker choice strategy in the context internals.
Parameters
@@ -223,20 +254,20 @@-- Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:131
-
+Settings
Settings
Member Visibility
Theme
@@ -244,65 +275,42 @@
- constructor
+- opts
+- retries
Count
- worker
Choice Strategies
- worker
Choice Strategy
- execute
-- get
Task Statistics
+- get
Strategy Policy
+- get
Task Statistics Requirements
- remove
- set
Options
- set
Worker Choice Strategy
- update
Generated using TypeDoc
Generated using TypeDoc