X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractPool.html;h=2377e5ef16fdc1a416ee8a3b6d1c857875680190;hb=396360a789e4806699533ddf899c79dc2b7ae868;hp=f55e9f11fbdea7a5355738a7bb7737372fe40f4e;hpb=15e4d8f3cafe9f7412913b0e440921e813bdf3cd;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index f55e9f11..2377e5ef 100644
--- a/docs/classes/AbstractPool.html
+++ b/docs/classes/AbstractPool.html
@@ -18,9 +18,9 @@
Type of worker which manages this pool. Constructs a new poolifier pool.Type Parameters
-
+
Worker extends IWorker
+
@@ -124,9 +124,9 @@
Type Parameters
-
+
Worker extends IWorker<Worker>
Returns AbstractPool<Worker, Data, Response>
Readonly
filePath to the worker file.
Readonly
numberNumber of workers that this pool should manage.
Readonly
optsOptions for the pool.
Protected
promiseWhen we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id.
Protected
workerDefault to a round robin algorithm.
Readonly
workerProtected
Abstract
fullPrivate
numberPrivate
numberAbstract
typeProtected
Abstract
afterProtected
beforePrivate
buildPrivate
checkPrivate
checkPrivate
checkPrivate
checkPrivate
checkPrivate
checkProtected
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.
+Protected
Abstract
createPrivate
dequeueImplementation of IPool.destroy
Protected
Abstract
destroyImplementation of IPool.enableTasksQueue
Private
enqueueExecutes 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.
Promise that will be fulfilled when the task is completed.
+Implementation of IPool.execute
Private
executePrivate
flushPrivate
flushPrivate
flushPrivate
getGets the given worker its worker node key.
- -The worker node key if the worker is found in the pool worker nodes, -1
otherwise.
The worker.
The worker node key if the worker is found in the pool worker nodes, -1
otherwise.
Private
getGets the given worker its tasks usage in the pool.
Error if the worker is not found in the pool worker nodes.
- -The worker tasks usage.
The worker.
The worker tasks usage.
+Protected
internalProtected
Abstract
isPrivate
pushPushes the given worker in the pool worker nodes.
- -The worker nodes length.
The worker.
The worker nodes length.
+Protected
Abstract
registerRegisters a listener callback on the given worker.
Private
removeProtected
Abstract
sendImplementation of IPool.setTasksQueueOptions
Implementation of IPool.setWorkerChoiceStrategy
Implementation of IPool.setWorkerChoiceStrategyOptions
Private
setPrivate
setProtected
setupPrivate
tasksProtected
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.
+
Base class that implements some shared logic for all poolifier pools.