X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FWorkerChoiceStrategiesContext.html;h=ab6325cc99bf94804f040e2e8f4799ff943ee6b4;hb=a19a4833d91947f660eace57d2d5782f909912c1;hp=c79747ac6a1902d180b86bf2483a434a101a6395;hpb=f30cddb8f07ac919d75140469faab6e0883709da;p=poolifier.git diff --git a/docs/classes/WorkerChoiceStrategiesContext.html b/docs/classes/WorkerChoiceStrategiesContext.html index c79747ac..ab6325cc 100644 --- a/docs/classes/WorkerChoiceStrategiesContext.html +++ b/docs/classes/WorkerChoiceStrategiesContext.html @@ -1,8 +1,8 @@ -
The worker choice strategies context.
+- Preparing search index...
- The search index is not available
poolifier - v4.0.7Class WorkerChoiceStrategiesContext<Worker, Data, Response>
The worker choice strategies context.
Type Parameters
Type of worker.
Type of data sent to the worker. This can only be structured-cloneable data.
Type of execution response. This can only be structured-cloneable data.
-Index
Constructors
Index
Constructors
Properties
Optional
opts: WorkerChoiceStrategyOptionsThe worker choice strategy options.
Returns WorkerChoiceStrategiesContext<Worker, Data, Response>
Default Value
-Properties
Private
defaultThe default worker choice strategy in the context.
-Private
Readonly
poolThe pool instance.
-Private
Readonly
retriesThe maximum number of worker choice strategies execution retries.
-retries Count
The number of worker choice strategies execution retries.
-Private
Readonly
workerThe worker choice strategies registered in the context.
-Private
workerThe active worker choice strategies in the context policy.
-Private
workerThe active worker choice strategies in the context task statistics requirements.
-Methods
Private
addAdds a worker choice strategy to the context.
+Properties
Private
defaultThe default worker choice strategy in the context.
+Private
Readonly
poolThe pool instance.
+Private
Readonly
retriesThe maximum number of worker choice strategies execution retries.
+retries Count
The number of worker choice strategies execution retries.
+Private
Readonly
workerThe worker choice strategies registered in the context.
+Private
workerThe active worker choice strategies in the context policy.
+Private
workerThe active worker choice strategies in the context task statistics requirements.
+Methods
Private
addAdds a worker choice strategy to the context.
Parameters
The worker choice strategy to add.
Optional
opts: WorkerChoiceStrategyOptionsThe worker choice strategy options.
Returns Map<"ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN", IWorkerChoiceStrategy>
The worker choice strategies.
-execute
Executes the given worker choice strategy in the context algorithm.
+execute
Executes the given worker choice strategy in the context algorithm.
Parameters
The worker choice strategy algorithm to execute.
Returns number
The key of the worker node.
Default Value
Throws
https://nodejs.org/api/errors.html#class-error If after computed retries the worker node key is null or undefined.
-Private
executeExecutes the given worker choice strategy.
+Private
executeExecutes the given worker choice strategy.
Parameters
The worker choice strategy.
Returns number
The key of the worker node.
Throws
https://nodejs.org/api/errors.html#class-error If after computed retries the worker node key is null or undefined.
-get Policy
Gets the active worker choice strategies in the context policy.
+get Policy
Gets the active worker choice strategies in the context policy.
Returns StrategyPolicy
The strategies policy.
-get Task Statistics Requirements
Gets the active worker choice strategies in the context task statistics requirements.
+get Task Statistics Requirements
Gets the active worker choice strategies in the context task statistics requirements.
Returns TaskStatisticsRequirements
The strategies task statistics requirements.
-remove
Removes the worker node key from the active worker choice strategies in the context.
+remove
Removes the worker node key from the active worker choice strategies in the context.
Parameters
The worker node key.
Returns boolean
-true
if the removal is successful,false
otherwise.Private
removeRemoves a worker choice strategy from the context.
+Private
removeRemoves a worker choice strategy from the context.
Parameters
The worker choice strategy to remove.
Returns boolean
-true
if the worker choice strategy is removed,false
otherwise.set Default Worker Choice Strategy
Sets the default worker choice strategy to use in the context.
+set Default Worker Choice Strategy
Sets the default worker choice strategy to use in the context.
Parameters
The default worker choice strategy to set.
Optional
opts: WorkerChoiceStrategyOptionsThe worker choice strategy options.
-Returns void
set Options
Sets the active worker choice strategies in the context options.
+Returns void
set Options
Sets the active worker choice strategies in the context options.
Parameters
The worker choice strategy options.
-Returns void
sync Worker Choice Strategies
Synchronizes the active worker choice strategies in the context with the given worker choice strategies.
+Returns void
sync Worker Choice Strategies
Synchronizes the active worker choice strategies in the context with the given worker choice strategies.
Parameters
The worker choice strategies to synchronize.
Optional
opts: WorkerChoiceStrategyOptionsThe worker choice strategy options.
-Returns void
update
Updates the worker node key in the active worker choice strategies in the context internals.
+Returns void
update
Updates the worker node key in the active worker choice strategies in the context internals.
Parameters
Returns boolean
-true
if the update is successful,false
otherwise.Settings
Member Visibility
Theme
On This Page
Settings
Member Visibility
Theme
On This Page