X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FDynamicClusterPool.html;h=4c52051dbdaeb51f9b1d96183e4b4ca914536052;hb=3abeb14de6a5845deeb027ccc69c3feeec8f4a3a;hp=c9f0a4bff1ff80ecc36319c17c5daba786280972;hpb=004a8816ae9b52388de246a9c7a5184a73915ad6;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index c9f0a4bf..4c52051d 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -1,4 +1,4 @@ -
The received message.
Protected
afterFunction that can be hooked up when a worker has been newly created and moved to the pool worker nodes.
-Can be used to update the maxListeners
or binding the main-worker
<->worker
connection if not bind by default.
Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes. +Can be overridden.
Protected
beforeHook executed before the worker task execution. Can be overridden.
@@ -381,26 +393,30 @@ Can be overridden.The worker node key.
The task to execute.
+Protected
chooseProtected
createChooses a worker node for the next task.
-The default worker choice strategy uses a round robin algorithm to distribute the load.
+Creates a new dynamic worker and sets it up completely in the pool worker nodes.
The worker node key
+New, completely set up dynamic worker.
+Protected
createProtected
createReturns a newly created worker.
+Creates a new worker.
Newly created worker.
+ +Shutdowns every current worker in this pool.
+Terminates every current worker in this pool.
Protected
destroyShutdowns the given worker.
+Terminates the given worker.
Optional
data: DataThe task input data for the specified worker function. This can only be serializable data.
+The task input data for the specified worker function. This can only be structured-cloneable data.
Protected
internalProtected
isInherited from FixedClusterPool.isMain
Protected
registerRegisters a listener callback on the given worker.
-The worker which should register a listener.
-The message listener callback.
-Inherited from FixedClusterPool.registerWorkerMessageListener
-Protected
sendThe message.
Inherited from FixedClusterPool.sendToWorker
Inherited from FixedClusterPool.setTasksQueueOptions
The worker choice strategy.
Inherited from FixedClusterPool.setWorkerChoiceStrategy
Inherited from FixedClusterPool.setWorkerChoiceStrategyOptions
Protected
setupSetup hook to execute code before worker node are created in the abstract constructor. -Can be overridden
+Setup hook to execute code before worker nodes are created in the abstract constructor. +Can be overridden.
Inherited from FixedClusterPool.setupHook
Protected
workerThe listener function to execute when a message is received from a worker.
Inherited from FixedClusterPool.workerListener
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.
@@ -74,6 +74,7 @@ When the maximum number of workers is reached and workers are busy, an event is max Size
min Size
type
+utilization
worker
Properties
Protected
Readonly
fileProtected
Readonly
maxProtected
Readonly
numberProtected
Readonly
optsProtected
promiseProtected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
-Default to a round robin algorithm.
Readonly
workerAccessors
Protected
full@@ -255,7 +254,7 @@ When the maximum number of workers is reached and workers are busy, an event is
info
@@ -267,7 +266,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
max@@ -279,7 +278,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
min@@ -291,7 +290,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
type@@ -304,7 +303,20 @@ When the maximum number of workers is reached and workers are busy, an event is
+Private
utilization+- get utilization(): number
+-
+
+
Gets the approximate pool utilization.
+Returns number
The pool utilization.
+ +Protected
worker@@ -316,7 +328,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Methods