X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FAbstractPool.html;h=47a0a827782a198519d53d82dfc98c9862be0784;hb=ef9f489c870680b9a754ab8e5b142b3f042a9ebb;hp=bf67558965e87ec5bc4d2f7b7682f78b2cde7b5f;hpb=8d20e449d72975f6add9177d1097d5a204d14f71;p=poolifier.git diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html index bf675589..47a0a827 100644 --- a/docs/classes/AbstractPool.html +++ b/docs/classes/AbstractPool.html @@ -1,4 +1,4 @@ -
Emitter on which events can be listened to.
Events that can currently be listened to:
'full'
: Emitted when the pool is dynamic and full.'busy'
: Emitted when the pool is busy.'full'
: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.'ready'
: Emitted when the number of workers created in the pool has reached the minimum size expected and are ready.'busy'
: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing at least one task.'error'
: Emitted when an uncaught error occurs.'taskError'
: Emitted when an error occurs while executing a task.Protected
Readonly
fileProtected
Readonly
numberProtected
Readonly
optsProtected
promisePrivate
Readonly
startThe start timestamp of the pool.
+Protected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
-Default to a round robin algorithm.
Readonly
workerPool worker nodes.
Protected
fullProtected
Abstract
maxProtected
Abstract
minPrivate
readyPrivate
startingProtected
Abstract
typePrivate
utilizationGets the approximate pool utilization.
+The pool utilization.
+ +Protected
Abstract
workerThe received message.
Protected
Abstract
afterProtected
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.
@@ -380,11 +430,16 @@ Can be overridden.The worker node key.
The task to execute.
+Private
buildPrivate
checkProtected
checkPrivate
checkPrivate
checkPrivate
checkPrivate
checkPrivate
checkPrivate
checkPrivate
checkProtected
choosePrivate
chooseProtected
createProtected
createProtected
Abstract
createReturns a newly created worker.
+Creates a new worker.
Newly created worker.
+ +Private
dequeueShutdowns every current worker in this pool.
+Terminates every current worker in this pool.
Protected
Abstract
destroyShutdowns the given worker.
+Terminates the given worker.
Private
enqueueOptional
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.
Private
executePrivate
flushPrivate
flushPrivate
getPrivate
getGets the worker information.
+The worker node key.
+Private
getThe worker.
The worker node key if the worker is found in the pool worker nodes, -1
otherwise.
The worker node key if found in the pool worker nodes, -1
otherwise.
Private
handlePrivate
handleProtected
internalProtected
Abstract
isPrivate
pushProtected
Abstract
registerPrivate
redistributePrivate
registerRegisters a listener callback on the given worker.
@@ -759,12 +937,12 @@ Can be overridden.Private
removeProtected
Abstract
sendThe message.
Implementation of IPool.setTasksQueueOptions
The worker choice strategy.
Implementation of IPool.setWorkerChoiceStrategy
Implementation of IPool.setWorkerChoiceStrategyOptions
Private
setPrivate
setSets the given worker in the pool worker nodes.
-The worker node key.
-The worker.
-The worker tasks usage.
-The worker task queue.
-Private
setSets the given worker node its tasks usage in the pool.
-The worker node.
-The worker node tasks usage.
-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.
Private
shallConditions for dynamic worker creation.
+Whether to create a dynamic worker or not.
+ +Private
tasksPrivate
updatePrivate
updatePrivate
updatePrivate
updatePrivate
updatePrivate
updateProtected
workerThe listener function to execute when a message is received from a worker.
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.
@@ -66,6 +66,7 @@ number Of Workers
opts
promise Response Map
+start Timestamp
worker Choice Strategy Context
worker Nodes