X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractPool.html;h=d7c1a3d61996c22fecaacad3ea76b8e772c1402f;hb=36df5bd40369d98d6ccb60400e66dce1aa980d54;hp=7806afafcb178b8bbc6d42415b006abc25d90b0a;hpb=aba8d9bd41f1bd46f3cc3863c0c2e74bdfacb7b6;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index 7806afaf..d7c1a3d6 100644
--- a/docs/classes/AbstractPool.html
+++ b/docs/classes/AbstractPool.html
@@ -1,4 +1,4 @@
-
AbstractPool | poolifier
+AbstractPool | poolifier - v2.6.15
@@ -29,12 +29,12 @@
Data = unknown
-
Methods
-afterTaskExecutionHook
+
addWorkerNode
+
afterTaskExecutionHook
afterWorkerSetup
beforeTaskExecutionHook
buildTasksQueueOptions
checkAndEmitEvents
+
checkDynamicPoolSize
checkFilePath
+
checkMessageWorkerId
checkNumberOfWorkers
checkPoolOptions
checkValidTasksQueueOptions
@@ -105,19 +112,21 @@
executeTask
flushTasksQueue
flushTasksQueues
-
getTaskStatistics
+
getWorkerById
+
getWorkerInfo
getWorkerNodeKey
-
getWorkerUsage
+
handleTaskExecutionResponse
+
handleWorkerReadyResponse
internalBusy
isMain
-
pushWorkerNode
-
registerWorkerMessageListener
+
redistributeQueuedTasks
+
registerWorkerMessageListener
removeWorkerNode
sendToWorker
+
sendWorkerStartupMessage
setTasksQueueOptions
setWorkerChoiceStrategy
setWorkerChoiceStrategyOptions
-
setWorkerNodeTasksUsage
setWorkerStatistics
setupHook
shallCreateDynamicWorker
@@ -141,7 +150,7 @@
Type Parameters
-
-
Worker extends IWorker<Worker>
+Worker extends IWorker
-
Data = unknown
-
@@ -167,7 +176,7 @@
Returns AbstractPool<Worker, Data, Response>
+
Defined in src/pools/abstract-pool.ts:103
Protected
Readonly
numberOfWorkers
numberOfWorkers: number
@@ -201,7 +211,7 @@
+
Defined in src/pools/abstract-pool.ts:104
Protected
Readonly
opts
@@ -209,7 +219,7 @@
+Defined in src/pools/abstract-pool.ts:106
Protected
promiseResponseMap
@@ -222,7 +232,23 @@
+
Defined in src/pools/abstract-pool.ts:73
+
+Private
Readonly
startTimestamp
+startTimestamp: number
+
+
+
+Private
Readonly
starting
+starting: boolean
+
+
Protected
workerChoiceStrategyContext
@@ -230,16 +256,16 @@
+Defined in src/pools/abstract-pool.ts:81
+Defined in src/pools/abstract-pool.ts:60
Protected
full
@@ -265,7 +291,7 @@
Returns boolean
+Defined in src/pools/abstract-pool.ts:586
+Defined in src/pools/abstract-pool.ts:289
Protected
Abstract
maxSize
@@ -288,7 +314,7 @@
Returns number
+Defined in src/pools/abstract-pool.ts:478
Protected
Abstract
minSize
@@ -299,7 +325,15 @@
Returns number
+Defined in src/pools/abstract-pool.ts:473
+
+Private
ready
+
+- get ready(): boolean
+-
+
Returns boolean
Protected
Abstract
type
@@ -311,7 +345,19 @@
Returns "fixed" | "dynamic"
+Defined in src/pools/abstract-pool.ts:463
+
+Private
utilization
+
+- get utilization(): number
+-
+
+
Returns number
The pool utilization.
+
+
Protected
Abstract
worker
@@ -322,9 +368,29 @@
Returns "cluster" | "thread"
+Defined in src/pools/abstract-pool.ts:468
Methods
+
+Private
addWorkerNode
+
+- addWorkerNode(worker): number
+-
+
+
+
Returns number
The worker nodes length.
+
+
Protected
afterTaskExecutionHook
@@ -342,21 +408,21 @@ Can be overridden.
-
-
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
Returns void
+Defined in src/pools/abstract-pool.ts:712
-Protected
Abstract
afterWorkerSetup
+Protected
afterWorkerSetup
- afterWorkerSetup(worker): void
-
-
Returns void
+Defined in src/pools/abstract-pool.ts:150
+
+Private
checkMessageWorkerId
+
+- checkMessageWorkerId(message): void
+-
+
+
+
Returns void
+
Private
checkNumberOfWorkers
@@ -441,7 +543,7 @@ Can be overridden.
numberOfWorkers: number
Returns void
+Defined in src/pools/abstract-pool.ts:163
Private
checkPoolOptions
@@ -454,7 +556,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:199
Private
checkValidTasksQueueOptions
@@ -467,7 +569,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:264
Private
checkValidWorkerChoiceStrategy
@@ -480,7 +582,7 @@ Can be overridden.
workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"
Returns void
+Defined in src/pools/abstract-pool.ts:226
Private
checkValidWorkerChoiceStrategyOptions
@@ -493,7 +595,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:236
Private
chooseWorkerNode
@@ -506,7 +608,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:889
Protected
createAndSetupDynamicWorker
@@ -518,7 +620,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:972
Protected
createAndSetupWorker
@@ -530,7 +632,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:933
Protected
Abstract
createWorker
@@ -542,7 +644,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:926
Private
dequeueTask
@@ -555,19 +657,19 @@ Can be overridden.
workerNodeKey: number
Returns undefined | Task<Data>
+Defined in src/pools/abstract-pool.ts:1181
destroy
- destroy(): Promise<void>
-
-
Returns number
+Defined in src/pools/abstract-pool.ts:1177
execute
@@ -639,7 +741,7 @@ Can be overridden.
-
Optional
data: Data
-
+Returns void
+
+Defined in src/pools/abstract-pool.ts:1172
Private
flushTasksQueue
@@ -680,7 +788,7 @@ Can be overridden.
workerNodeKey: number
Returns void
+Defined in src/pools/abstract-pool.ts:1189
Private
flushTasksQueues
@@ -688,20 +796,46 @@ Can be overridden.
-
Returns void
-
+
+Private
getWorkerById
-- getTaskStatistics(worker): TaskStatistics
+- getWorkerById(workerId): undefined | Worker
-
+
-
+Returns undefined | Worker
The worker if found in the pool worker nodes, undefined
otherwise.
+
+
+
+Private
getWorkerInfo
+
+- getWorkerInfo(workerNodeKey): WorkerInfo
+-
+
+
+
Parameters
+
+-
+
workerNodeKey: number
+
+
+
+
+Defined in src/pools/abstract-pool.ts:1134
Private
getWorkerNodeKey
@@ -717,24 +851,37 @@ Can be overridden.
-Returns number
The worker node key if the worker is found in the pool worker nodes, -1
otherwise.
+Returns number
The worker node key if found in the pool worker nodes, -1
otherwise.
-
+
+Private
handleTaskExecutionResponse
-- getWorkerUsage(worker): WorkerUsage
+- handleTaskExecutionResponse(message): void
-
-
+Returns void
+
+Private
handleWorkerReadyResponse
+
+- handleWorkerReadyResponse(message): void
+-
+
+
Returns void
+Defined in src/pools/abstract-pool.ts:1084
Protected
internalBusy
@@ -746,7 +893,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:602
Protected
Abstract
isMain
@@ -757,30 +904,23 @@ Can be overridden.
Returns boolean
-
+
+Private
redistributeQueuedTasks
-- pushWorkerNode(worker): number
+- redistributeQueuedTasks(workerNodeKey): void
-
-
-
Returns number
The worker nodes length.
-
-
+Returns void
-
-Protected
Abstract
registerWorkerMessageListener
-
+
+Private
registerWorkerMessageListener
+
- registerWorkerMessageListener<Message>(worker, listener): void
-
+
message: MessageValue<Message, unknown>
Returns void
Returns void
+Defined in src/pools/abstract-pool.ts:1007
Private
removeWorkerNode
@@ -836,7 +976,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1158
Protected
Abstract
sendToWorker
@@ -853,14 +993,27 @@ Can be overridden.
-
-
message: MessageValue<Data, unknown, Worker | MessagePort>
+
Returns void
+Defined in src/pools/abstract-pool.ts:916
+
+Private
sendWorkerStartupMessage
+
+- sendWorkerStartupMessage(worker): void
+-
+
+
Returns void
+Defined in src/pools/abstract-pool.ts:563
+Defined in src/pools/abstract-pool.ts:521
setWorkerChoiceStrategyOptions
-
-Private
setWorkerNodeTasksUsage
-
-- setWorkerNodeTasksUsage(workerNode, workerUsage): void
--
-
-
-
Parameters
-
--
-
workerNode: WorkerNode<Worker, Data>
-
-
--
-
-
-
-Returns void
-
+Defined in src/pools/abstract-pool.ts:540
Private
setWorkerStatistics
@@ -962,19 +1091,19 @@ Can be overridden.
worker: Worker
Returns void
+Defined in src/pools/abstract-pool.ts:1205
Protected
setupHook
- setupHook(): void
-
-
Returns number
+Defined in src/pools/abstract-pool.ts:1185
Private
updateEluWorkerUsage
@@ -1011,10 +1140,10 @@ Can be overridden
-
-
-
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
Returns void
+Defined in src/pools/abstract-pool.ts:818
Private
updateRunTimeWorkerUsage
@@ -1026,10 +1155,10 @@ Can be overridden
-
-
-
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
Returns void
+Defined in src/pools/abstract-pool.ts:742
Private
updateTaskStatisticsWorkerUsage
@@ -1041,10 +1170,10 @@ Can be overridden
-
-
-
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
Returns void
+Defined in src/pools/abstract-pool.ts:729
Private
updateWaitTimeWorkerUsage
@@ -1059,7 +1188,7 @@ Can be overridden
task: Task<Data>
Returns void
+Defined in src/pools/abstract-pool.ts:780
Protected
workerListener
@@ -1080,13 +1209,13 @@ Can be overridden
Parameters
-
-
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
Returns void
The listener function to execute when a message is received from a worker.
+Defined in src/pools/abstract-pool.ts:1071
+WorkerTypes
+availableParallelism
\ No newline at end of file
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