X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FDynamicClusterPool.html;h=b0b2c4d3b0c264a46dec6d1ba286442a285c58e2;hb=a97f9c80aa49c6152547fb6fa8de4b0f089c2353;hp=c5d7bc80ca36a5d48a0ba4e739791d0ef671c34a;hpb=4f487526a63c873d168386250b40ad8103c5a4d8;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index c5d7bc80..b0b2c4d3 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -30,12 +30,12 @@ When the maximum number of workers is reached and workers are busy, an event is
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 +379,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.
+Terminate 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.
@@ -81,7 +81,7 @@ When the maximum number of workers is reached and workers are busy, an event isafter Task Execution Hook
after Worker Setup
before Task Execution Hook
-choose Worker Node
+create And Setup Dynamic Worker
create And Setup Worker
create Worker
destroy
@@ -90,7 +90,6 @@ When the maximum number of workers is reached and workers are busy, an event is
execute
internal Busy
is Main
-register Worker Message Listener
send To Worker
set Tasks Queue Options
set Worker Choice Strategy
@@ -141,7 +140,7 @@ When the maximum number of workers is reached and workers are busy, an event is
+- Defined in src/pools/cluster/dynamic.ts:27
@@ -159,7 +158,7 @@ When the maximum number of workers is reached and workers are busy, an event is
+- Defined in src/pools/abstract-pool.ts:55
Path
file Path: string
@@ -168,7 +167,7 @@ When the maximum number of workers is reached and workers are busy, an event is
+- Defined in src/pools/abstract-pool.ts:88
max: number
@@ -176,7 +175,7 @@ When the maximum number of workers is reached and workers are busy, an event is
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 +253,7 @@ When the maximum number of workers is reached and workers are busy, an event is
info
@@ -267,7 +265,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
max@@ -279,7 +277,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
min@@ -291,7 +289,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
type@@ -304,7 +302,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
worker@@ -316,7 +314,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Methods
message: MessageValue<Response, Worker | MessagePort>
+message: MessageValue<Response, unknown>
The received message.