X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicClusterPool.html;h=5c18bd6aaed3e0fc582130ad5b1de8979dd33d65;hb=dea288f11483ea6c15807b20e4c621483c7fa5af;hp=e4dbfd435746fd91fd3246ad80c00871eef639ad;hpb=8d1797ad15cb2d87ac3c9904ce6df3db45c0c742;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index e4dbfd43..5c18bd6a 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -24,9 +24,9 @@ When the maximum number of workers is reached and workers are busy, an event is
2.0.0
-Constructs a new poolifier dynamic cluster pool.
Readonly
fileReadonly
maxMaximum number of workers that can be created by this pool.
Readonly
numberReadonly
optsProtected
promiseProtected
workerReadonly
workerProtected
fullPrivate
numberPrivate
numberPool maximum size.
+The worker.
The received message.
Protected
afterProtected
beforeProtected
chooseChooses a worker node for the next task.
The default uses a round robin algorithm to distribute the load.
- -[worker node key, worker node].
Protected
createCreates a new worker and sets it up completely in the pool worker nodes.
- -New, completely set up worker.
New, completely set up worker.
+Inherited from FixedClusterPool.createAndSetupWorker
Protected
createInherited from FixedClusterPool.createWorker
Inherited from FixedClusterPool.destroy
Protected
destroyInherited from FixedClusterPool.destroyWorker
Inherited from FixedClusterPool.enableTasksQueue
Executes the function specified in the worker constructor with the task data input parameter.
- -Promise that will be fulfilled when the task is completed.
Optional
data: DataThe task input data for the specified worker function. This can only be serializable data.
+Optional
name: stringThe name of the worker function to execute. If not specified, the default worker function will be executed.
Promise that will be fulfilled when the task is completed.
+Inherited from FixedClusterPool.execute
Finds a free worker node key based on the number of tasks the worker has applied.
-If a worker is found with 0
running tasks, it is detected as free and its worker node key is returned.
If no free worker is found, -1
is returned.
A worker node key if there is one, -1
otherwise.
Inherited from FixedClusterPool.findFreeWorkerNodeKey
-Protected
internalInherited from FixedClusterPool.internalBusy
Protected
isInherited from FixedClusterPool.isMain
Protected
registerRegisters a listener callback on the given worker.
Inherited from FixedClusterPool.registerWorkerMessageListener
Protected
sendThe worker which should receive the message.
The message.
Inherited from FixedClusterPool.sendToWorker
Inherited from FixedClusterPool.setTasksQueueOptions
Inherited from FixedClusterPool.setWorkerChoiceStrategy
Inherited from FixedClusterPool.setWorkerChoiceStrategyOptions
Protected
setupInherited from FixedClusterPool.setupHook
Protected
workerThis function is the listener registered for each worker message.
- -The listener function to execute when a message is received from a worker.
The listener function to execute when a message is received from a worker.
+This function is the listener registered for each worker message.
- -The listener function to execute when a message is received from a worker.
The listener function to execute when a message is received from a worker.
+Inherited from FixedClusterPool.workerListener
Type of data sent to the worker. This can only be serializable data.
@@ -42,7 +42,7 @@ When the maximum number of workers is reached and workers are busy, an event is@@ -69,6 +69,7 @@ When the maximum number of workers is reached and workers are busy, an event is full number Of Queued Tasks
number Of Running Tasks
+size
type