X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FAbstractPool.html;h=92d46d153c26a6e332bce691985d560adac71ee5;hb=b4c2a50df77a5f3110d228436ce9f3008cbd8297;hp=48d436c8a7e1ce36227e088badf7c1e00fb46e9f;hpb=fb8fbcfd7983c1eadc39411c9b29054e6fa97d5b;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index 48d436c8..92d46d15 100644
--- a/docs/classes/AbstractPool.html
+++ b/docs/classes/AbstractPool.html
@@ -1,4 +1,4 @@
-
AbstractPool | poolifier - v2.6.28
+AbstractPool | poolifier - v2.6.40
@@ -49,7 +49,7 @@
IPool < Worker , Data , Response >
+
Defined in src/pools/abstract-pool.ts:57
@@ -165,22 +176,19 @@
numberOfWorkers : number
-
+
filePath : string
-
+
-
+
Returns AbstractPool < Worker , Data , Response >
+Defined in src/pools/abstract-pool.ts:113
Properties
@@ -190,17 +198,18 @@
Events that can currently be listened to:
'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.
+'busy'
: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing concurrently their tasks quota.
'full'
: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.
-'destroy
': Emitted when the pool is destroyed.
+'destroy'
: Emitted when the pool is destroyed.
'error'
: Emitted when an uncaught error occurs.
'taskError'
: Emitted when an error occurs while executing a task.
+'backPressure'
: Emitted when all worker nodes have back pressure (i.e. their tasks queue is full: queue size >= maximum queue size).
+Defined in src/pools/abstract-pool.ts:66
Protected
Readonly
file Path
file Path : string
@@ -208,7 +217,15 @@
+Defined in src/pools/abstract-pool.ts:115
+
+Protected
Optional
Readonly
max
+max ?: number
+
+
Protected
Readonly
number Of Workers
number Of Workers : number
@@ -216,7 +233,7 @@
+Defined in src/pools/abstract-pool.ts:114
Protected
Readonly
opts
@@ -224,7 +241,7 @@
+Defined in src/pools/abstract-pool.ts:116
Protected
promise Response Map
@@ -237,7 +254,7 @@
+Defined in src/pools/abstract-pool.ts:76
Private
Readonly
start Timestamp
start Timestamp : number
@@ -245,7 +262,15 @@
+Defined in src/pools/abstract-pool.ts:104
+
+Private
started
+started : boolean
+
+
Private
Readonly
starting
starting : boolean
@@ -253,15 +278,7 @@
-
-Private
task Functions
-task Functions : string []
-
-
+Defined in src/pools/abstract-pool.ts:96
Protected
worker Choice Strategy Context
@@ -269,16 +286,16 @@
+Defined in src/pools/abstract-pool.ts:82
-Readonly
worker Nodes
+Readonly
Internal
worker Nodes
+Defined in src/pools/abstract-pool.ts:63
Protected
full
@@ -304,7 +321,7 @@
Returns boolean
+Defined in src/pools/abstract-pool.ts:687
+Defined in src/pools/abstract-pool.ts:348
-Protected
Abstract
max Size
+Protected
max Size
get maxSize( ) : number
@@ -327,9 +344,9 @@
Returns number
+Defined in src/pools/abstract-pool.ts:560
-Protected
Abstract
min Size
+Protected
min Size
get minSize( ) : number
@@ -338,7 +355,7 @@
Returns number
+Defined in src/pools/abstract-pool.ts:553
Private
ready
@@ -349,7 +366,7 @@
Returns boolean
+Defined in src/pools/abstract-pool.ts:505
Protected
Abstract
type
@@ -361,7 +378,7 @@
Returns "fixed" | "dynamic"
+Defined in src/pools/abstract-pool.ts:543
+Defined in src/pools/abstract-pool.ts:522
Protected
Abstract
worker
@@ -384,7 +401,7 @@
Returns "thread" | "cluster"
+Defined in src/pools/abstract-pool.ts:548
Protected
after Task Execution Hook
@@ -423,17 +439,15 @@ Can be overridden.
workerNodeKey : number
-
+
message : MessageValue < Response , unknown >
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:886
Protected
after Worker Node Setup
@@ -448,12 +462,11 @@ Can be overridden.
workerNodeKey : number
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:1160
Protected
before Task Execution Hook
@@ -468,17 +481,15 @@ Can be overridden.
workerNodeKey : number
-
+
task : Task < Data >
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:856
Private
build Tasks Queue Options
@@ -491,15 +502,31 @@ Can be overridden.
-
+
+Private
check And Emit Dynamic Worker Creation Events
+
+check And Emit Dynamic Worker Creation Events ( ) : void
+
+Returns void
+
+Private
check And Emit Task Execution Events
+
+check And Emit Task Execution Events ( ) : void
+
+Returns void
+
+Private
check And Emit Task Queuing Events
-check And Emit Events ( ) : void
+check And Emit Task Queuing Events ( ) : void
Returns void
+Defined in src/pools/abstract-pool.ts:1397
Protected
check Dynamic Pool Size
@@ -514,7 +541,7 @@ Can be overridden.
max : number
Returns void
+Defined in src/pools/abstract-pool.ts:185
Private
check File Path
@@ -527,7 +554,7 @@ Can be overridden.
filePath : string
Returns void
+Defined in src/pools/abstract-pool.ts:154
Private
check Message Worker Id
@@ -541,14 +568,13 @@ Can be overridden.
message : MessageValue < Response , unknown >
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:570
Private
check Number Of Workers
@@ -561,7 +587,7 @@ Can be overridden.
numberOfWorkers : number
Returns void
+Defined in src/pools/abstract-pool.ts:167
Private
check Pool Options
@@ -574,7 +600,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:211
Private
check Valid Tasks Queue Options
@@ -587,7 +613,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:293
Private
check Valid Worker Choice Strategy
@@ -600,7 +626,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:239
Private
check Valid Worker Choice Strategy Options
@@ -613,7 +639,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:249
Private
choose Worker Node
@@ -626,7 +652,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1013
Protected
create And Setup Dynamic Worker Node
@@ -638,7 +664,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1103
Protected
create And Setup Worker Node
@@ -650,7 +676,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1059
Protected
Abstract
create Worker
@@ -662,7 +688,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1052
Private
dequeue Task
@@ -675,7 +701,7 @@ Can be overridden.
workerNodeKey : number
Returns undefined | Task < Data >
+Defined in src/pools/abstract-pool.ts:1493
+Defined in src/pools/abstract-pool.ts:801
Protected
Abstract
destroy Worker Node
@@ -701,37 +727,34 @@ Can be overridden.
workerNodeKey : number
-
+
Returns Promise < void >
+Defined in src/pools/abstract-pool.ts:832
enable Tasks Queue
enable Tasks Queue ( enable , tasksQueueOptions ? ) : void
-
Returns void
+Defined in src/pools/abstract-pool.ts:641
Private
enqueue Task
@@ -746,7 +769,7 @@ Can be overridden.
task : Task < Data >
Returns number
+Defined in src/pools/abstract-pool.ts:1487
execute
@@ -760,24 +783,21 @@ Can be overridden.
Optional
data : Data
-
+Optional
Optional
name : string
-
+Optional
Optional
transferList : TransferListItem []
-
+Optional
Returns Promise < Response > Promise that will be fulfilled when the task is completed.
+Defined in src/pools/abstract-pool.ts:745
Private
execute Task
@@ -791,17 +811,15 @@ Can be overridden.
workerNodeKey : number
-
+
task : Task < Data >
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:1481
Protected
flush Tasks Queue
@@ -814,7 +832,7 @@ Can be overridden.
workerNodeKey : number
Returns void
+Defined in src/pools/abstract-pool.ts:1501
Private
flush Tasks Queues
@@ -822,11 +840,11 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1511
Protected
get Worker Info
-get Worker Info ( workerNodeKey ) : WorkerInfo
+get Worker Info ( workerNodeKey ) : undefined | WorkerInfo
@@ -836,13 +854,12 @@ Can be overridden.
workerNodeKey : number
-
-The worker information.
+
+The worker information.
+Defined in src/pools/abstract-pool.ts:1417
Private
get Worker Node Key By Worker
@@ -856,13 +873,12 @@ Can be overridden.
worker : Worker
-
+
Returns number The worker node key if found in the pool worker nodes, -1
otherwise.
+Defined in src/pools/abstract-pool.ts:589
Private
get Worker Node Key By Worker Id
@@ -876,13 +892,12 @@ Can be overridden.
workerId : number
-
+
Returns number The worker node key if the worker id is found in the pool worker nodes, -1
otherwise.
+Defined in src/pools/abstract-pool.ts:601
Private
handle Task Execution Response
@@ -895,7 +910,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1363
Private
handle Worker Ready Response
@@ -908,7 +923,35 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1349
+
+Private
has Back Pressure
+
+has Back Pressure ( ) : boolean
+
+Returns boolean
+
+has Worker Node Back Pressure
+
Protected
internal Busy
@@ -920,7 +963,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:703
Protected
Abstract
is Main
@@ -931,7 +974,7 @@ Can be overridden.
Returns boolean
+Defined in src/pools/abstract-pool.ts:847
+Defined in src/pools/abstract-pool.ts:724
Private
redistribute Queued Tasks
@@ -957,7 +1000,7 @@ Can be overridden.
workerNodeKey : number
Returns void
+Defined in src/pools/abstract-pool.ts:1200
Protected
Abstract
register Worker Message Listener
@@ -976,13 +1019,11 @@ Can be overridden.
workerNodeKey : number
-
+
listener : ( ( message ) => void )
-
@@ -997,7 +1038,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1147
Private
remove Worker Node
@@ -1011,12 +1052,11 @@ Can be overridden.
worker : Worker
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:1450
Protected
send Kill Message To Worker
@@ -1031,7 +1071,7 @@ Can be overridden.
workerId : number
Returns Promise < void >
+Defined in src/pools/abstract-pool.ts:811
Protected
Abstract
send Startup Message To Worker
@@ -1045,12 +1085,11 @@ Can be overridden.
workerNodeKey : number
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:1180
Private
send Statistics Message To Worker
@@ -1064,12 +1103,11 @@ Can be overridden.
workerNodeKey : number
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:1187
Protected
Abstract
send To Worker
@@ -1083,42 +1121,51 @@ Can be overridden.
workerNodeKey : number
-
+
-
+
Optional
transferList : TransferListItem []
-
+Optional
Returns void
+Defined in src/pools/abstract-pool.ts:1041
set Tasks Queue Options
set Tasks Queue Options ( tasksQueueOptions ) : void
-
Returns void
+Defined in src/pools/abstract-pool.ts:653
+
+Private
set Tasks Queue Size
+
+set Tasks Queue Size ( size ) : void
+
+
+Returns void
set Worker Choice Strategy
@@ -1132,18 +1179,16 @@ Can be overridden.
workerChoiceStrategy : "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"
-
+
-
+Optional
Returns void
+Defined in src/pools/abstract-pool.ts:608
set Worker Choice Strategy Options
@@ -1157,13 +1202,12 @@ Can be overridden.
-
+
Returns void
+Defined in src/pools/abstract-pool.ts:627
Protected
setup Hook
@@ -1175,7 +1219,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:840
Private
shall Create Dynamic Worker
@@ -1187,7 +1231,39 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1030
+
+Private
shall Execute Task
+
+shall Execute Task ( workerNodeKey ) : boolean
+
+
+Returns boolean
+
+Private
shall Update Task Function Worker Usage
+
Private
start Pool
@@ -1195,7 +1271,20 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:335
+
+Private
task Stealing On Empty Queue
+
+task Stealing On Empty Queue ( workerId ) : void
+
+
+Returns void
Private
tasks Queue Size
@@ -1208,7 +1297,20 @@ Can be overridden.
workerNodeKey : number
Returns number
+Defined in src/pools/abstract-pool.ts:1497
+
+Private
tasks Stealing On Back Pressure
+
+tasks Stealing On Back Pressure ( workerId ) : void
+
+
+Returns void
Private
update Elu Worker Usage
@@ -1223,7 +1325,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:973
Private
update Run Time Worker Usage
@@ -1238,7 +1340,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:946
Private
update Task Statistics Worker Usage
@@ -1253,7 +1355,22 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:928
+
+Private
update Task Stolen Statistics Worker Usage
+
+update Task Stolen Statistics Worker Usage ( workerNodeKey , taskName ) : void
+
+
+
Parameters
+
+
+workerNodeKey : number
+
+taskName : string
+Returns void
Private
update Wait Time Worker Usage
@@ -1268,7 +1385,7 @@ Can be overridden.
task : Task < Data >
Returns void
+Defined in src/pools/abstract-pool.ts:960
Protected
worker Listener
@@ -1295,7 +1412,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1329
+Generated using TypeDoc
\ No newline at end of file
Number of workers that this pool should manage.
-