X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractPool.html;h=984c1c21c2da8ba185da4297fe494a7610100b85;hb=5c30b9d94384214b24f11ea7e68a54efaa6795b7;hp=002878a83babb7fe690b1034bb0dd8659ca07c1a;hpb=5e5a659e2b415c7d533dad095eda082989983f8e;p=poolifier.git diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html index 002878a8..984c1c21 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.
+Private
Readonly
startingWhether the pool is starting or not.
+Protected
workerReadonly
workerPool worker nodes.
Protected
fullProtected
Abstract
maxProtected
Abstract
minPrivate
readyProtected
Abstract
typePrivate
utilizationGets the approximate pool utilization.
+The pool utilization.
+ +Protected
Abstract
workerPrivate
addProtected
afterThe 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
beforePrivate
buildPrivate
checkProtected
checkPrivate
checkPrivate
checkChecks if the worker id sent in the received message from a worker is valid.
+The received message.
+https://nodejs.org/api/errors.html#class-error If the worker id is invalid.
+Private
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
executeExecutes the given task on the given worker.
+Private
flushPrivate
flushPrivate
getPrivate
getGet the worker given its id.
+The worker if found in the pool worker nodes, undefined
otherwise.
Private
getPrivate
getGets the worker information from the given worker node key.
+The worker node key.
+The worker information.
+ +Protected
getGets the worker information from the given worker.
+The worker.
+The worker information.
+ +https://nodejs.org/api/errors.html#class-error If the worker is not found.
+Protected
getGets the given worker its worker node key.
@@ -701,32 +876,49 @@ Can be overridden.The 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
getPrivate
handlePrivate
handleProtected
internalProtected
Abstract
isPrivate
pushPrivate
redistributePushes the given worker in the pool worker nodes.
-The worker.
-The worker nodes length.
- -Protected
Abstract
registerPrivate
removeProtected
Abstract
sendSends the startup message to the given worker.
+The worker which should receive the startup message.
+Protected
Abstract
sendThe message.
Implementation of IPool.setTasksQueueOptions
Implementation of IPool.setWorkerChoiceStrategy
Implementation of IPool.setWorkerChoiceStrategyOptions
Private
setSets the given worker node its tasks usage in the pool.
-The worker node.
-The worker usage.
-Private
setProtected
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
startPrivate
tasksPrivate
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,8 @@ number Of Workers
opts
promise Response Map
+start Timestamp
+starting
worker Choice Strategy Context
worker Nodes