X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FAbstractPool.html;h=57b75a1a6da1adfb6f25fa46a5518a8e1ce7ed62;hb=4ee786575c19cfc95faa0dfc2671b3ab8f680402;hp=22404f94128b9da75cebadc0a110390c1c442f0e;hpb=069e56f4a71b48e89eeb1b4b2ccf693b75116f07;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index 22404f94..57b75a1a 100644
--- a/docs/classes/AbstractPool.html
+++ b/docs/classes/AbstractPool.html
@@ -1,13 +1,13 @@
-
AbstractPool | poolifier - v2.6.34
@@ -49,19 +49,19 @@
IPool < Worker , Data , Response >
+
Defined in src/pools/abstract-pool.ts:64
- Index
+ Index
Constructors
-constructor
+
Properties
-emitter?
+
Accessors
-busy
+
Constructors
-constructor
+constructor
new Abstract Pool < Worker , Data , Response > ( numberOfWorkers , filePath , opts ) : AbstractPool < Worker , Data , Response >
@@ -189,19 +202,20 @@
Returns AbstractPool < Worker , Data , Response >
+
Defined in src/pools/abstract-pool.ts:126
Protected
Readonly
number Of Workers
number Of Workers : number
@@ -234,7 +248,7 @@
+
Defined in src/pools/abstract-pool.ts:127
Protected
Readonly
opts
@@ -242,11 +256,11 @@
+
Defined in src/pools/abstract-pool.ts:129
Protected
promise Response Map
-
+
Defined in src/pools/abstract-pool.ts:117
Private
started
started : boolean
@@ -271,15 +285,27 @@
+
Defined in src/pools/abstract-pool.ts:109
-Private
Readonly
starting
+Private
starting
starting : boolean
+
Defined in src/pools/abstract-pool.ts:113
+
+Private
Readonly
task Functions
+
+
+
Protected
worker Choice Strategy Context
@@ -287,7 +313,7 @@
+Defined in src/pools/abstract-pool.ts:93
Readonly
Internal
worker Nodes
@@ -296,7 +322,7 @@
+
Defined in src/pools/abstract-pool.ts:70
Protected
full
@@ -322,7 +348,7 @@
Returns boolean
+
Defined in src/pools/abstract-pool.ts:651
+
Defined in src/pools/abstract-pool.ts:271
Protected
max Size
@@ -345,7 +371,7 @@
Returns number
+
Defined in src/pools/abstract-pool.ts:484
Protected
min Size
@@ -356,7 +382,7 @@
Returns number
+
Defined in src/pools/abstract-pool.ts:477
Private
ready
@@ -367,7 +393,7 @@
Returns boolean
+
Defined in src/pools/abstract-pool.ts:429
Protected
Abstract
type
@@ -379,7 +405,7 @@
Returns "fixed" | "dynamic"
+
Defined in src/pools/abstract-pool.ts:467
+
Defined in src/pools/abstract-pool.ts:446
Protected
Abstract
worker
@@ -402,9 +428,40 @@
Returns "thread" | "cluster"
+
Defined in src/pools/abstract-pool.ts:472
+
Defined in src/pools/abstract-pool.ts:1593
Protected
after Task Execution Hook
@@ -451,7 +508,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1033
Protected
after Worker Node Setup
@@ -471,7 +528,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1344
Protected
before Task Execution Hook
@@ -496,7 +553,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1003
Private
build Tasks Queue Options
@@ -509,7 +566,7 @@ Can be overridden.
+
Defined in src/pools/abstract-pool.ts:600
Private
check And Emit Dynamic Worker Creation Events
@@ -517,7 +574,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1568
Private
check And Emit Task Execution Events
@@ -525,7 +582,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1556
Private
check And Emit Task Queuing Events
@@ -533,35 +590,7 @@ Can be overridden.
Returns void
-
-Protected
check Dynamic Pool Size
-
-check Dynamic Pool Size ( min , max ) : void
-
-
-
Parameters
-
-
-min : number
-
-max : number
-Returns void
-
-Private
check File Path
-
-check File Path ( filePath ) : void
-
-
-Returns void
+
Defined in src/pools/abstract-pool.ts:1562
Private
check Message Worker Id
@@ -573,7 +602,7 @@ Can be overridden.
Parameters
@@ -582,7 +611,7 @@ Can be overridden.
Throws https://nodejs.org/api/errors.html#class-error If the worker id is invalid.
+Defined in src/pools/abstract-pool.ts:494
Private
check Number Of Workers
@@ -595,7 +624,7 @@ Can be overridden.
numberOfWorkers : number
Returns void
+Defined in src/pools/abstract-pool.ts:170
Private
check Pool Options
@@ -608,33 +637,7 @@ Can be overridden.
Returns void
-
-Private
check Valid Tasks Queue Options
-
-check Valid Tasks Queue Options ( tasksQueueOptions ) : void
-
-
-Returns void
-
-Private
check Valid Worker Choice Strategy
-
-check Valid Worker Choice Strategy ( workerChoiceStrategy ) : void
-
-
-
Parameters
-
-
-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:188
Private
check Valid Worker Choice Strategy Options
@@ -647,7 +650,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:217
Private
choose Worker Node
@@ -660,7 +663,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1160
Protected
create And Setup Dynamic Worker Node
@@ -672,7 +675,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1250
Protected
create And Setup Worker Node
@@ -684,7 +687,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1206
Protected
Abstract
create Worker
@@ -696,7 +699,20 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1199
+
+Private
delete Task Function Worker Usages
+
+delete Task Function Worker Usages ( name ) : void
+
+
+Returns void
Private
dequeue Task
@@ -709,7 +725,47 @@ Can be overridden.
workerNodeKey : number
Returns undefined | Task < Data >
+Defined in src/pools/abstract-pool.ts:1658
+
+Protected
Abstract
deregister Worker Message Listener
+
+deregister Worker Message Listener < Message > ( workerNodeKey , listener ) : void
+
+
+
+
+
Parameters
+
+
+workerNodeKey : number
+
+
+
+listener : ( ( message ) => void )
+
+
+
+
+
+( message ) : void
+
+
+Returns void
+Returns void
+
+Defined in src/pools/abstract-pool.ts:940
Protected
Abstract
destroy Worker Node
@@ -740,7 +796,7 @@ Can be overridden.
Returns Promise < void >
+Defined in src/pools/abstract-pool.ts:979
+Defined in src/pools/abstract-pool.ts:565
Private
enqueue Task
@@ -780,7 +836,7 @@ Can be overridden.
task : Task < Data >
Returns number
+Defined in src/pools/abstract-pool.ts:1652
+Defined in src/pools/abstract-pool.ts:870
Private
execute Task
@@ -835,7 +891,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1646
Protected
flush Tasks Queue
@@ -848,7 +904,7 @@ Can be overridden.
workerNodeKey : number
Returns void
+Defined in src/pools/abstract-pool.ts:1666
Private
flush Tasks Queues
@@ -856,11 +912,11 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1676
Protected
get Worker Info
-get Worker Info ( workerNodeKey ) : undefined | WorkerInfo
+get Worker Info ( workerNodeKey ) : WorkerInfo
@@ -872,11 +928,11 @@ Can be overridden.
-The worker information.
+The worker information.
+Defined in src/pools/abstract-pool.ts:1582
Private
get Worker Node Key By Worker
@@ -896,7 +952,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:513
Private
get Worker Node Key By Worker Id
@@ -908,7 +964,7 @@ Can be overridden.
Parameters
-workerId : number
+workerId : undefined | number
@@ -916,7 +972,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:525
Private
handle Task Execution Response
@@ -929,7 +985,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1528
Private
handle Worker Ready Response
@@ -942,7 +998,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1512
Private
has Back Pressure
@@ -950,7 +1006,28 @@ Can be overridden.
Returns boolean
+Defined in src/pools/abstract-pool.ts:1631
+
has Worker Node Back Pressure
+Defined in src/pools/abstract-pool.ts:1624
+
+Private
initialize Event Emitter
+
+initialize Event Emitter ( ) : void
+
+Returns void
Protected
internal Busy
@@ -983,7 +1068,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:667
Protected
Abstract
is Main
@@ -994,20 +1079,20 @@ Can be overridden.
Returns boolean
-
+
+Defined in src/pools/abstract-pool.ts:835
Private
redistribute Queued Tasks
@@ -1020,7 +1105,47 @@ Can be overridden.
workerNodeKey : number
Returns void
+Defined in src/pools/abstract-pool.ts:1390
+
+Protected
Abstract
register Once Worker Message Listener
+
+register Once Worker Message Listener < Message > ( workerNodeKey , listener ) : void
+
+
+
+
+
Parameters
+
+
+workerNodeKey : number
+
+
+
+listener : ( ( message ) => void )
+
+
+
+
+
+( message ) : void
+
+
+Returns void
+Returns void
+
Protected
Abstract
register Worker Message Listener
@@ -1060,7 +1185,28 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1305
+
Private
remove Worker Node
@@ -1079,22 +1225,20 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1615
Protected
send Kill Message To Worker
-send Kill Message To Worker ( workerNodeKey , workerId ) : Promise < void >
+send Kill Message To Worker ( workerNodeKey ) : Promise < void >
Parameters
-workerNodeKey : number
-
-workerId : number
+workerNodeKey : number
Returns Promise < void >
+Defined in src/pools/abstract-pool.ts:951
Protected
Abstract
send Startup Message To Worker
@@ -1113,7 +1257,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1371
Private
send Statistics Message To Worker
@@ -1132,7 +1276,35 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1378
+
+Private
send Task Function Operation To Worker
+
+send Task Function Operation To Worker ( workerNodeKey , message ) : Promise < boolean >
+
+
+
Parameters
+
+
+workerNodeKey : number
+
+
+Returns Promise < boolean >
+
+Private
send Task Function Operation To Workers
+
+send Task Function Operation To Workers ( message ) : Promise < boolean >
+
+
+Returns Promise < boolean >
Protected
Abstract
send To Worker
@@ -1161,20 +1333,36 @@ Can be overridden.
Returns void
-
-Private
set Tasks Queue Max Size
-
+
+set Default Task Function
+
+set Default Task Function ( name ) : Promise < boolean >
+
+name : string
+
+
+Returns Promise < boolean > true
if the default task function was set, false
otherwise.
+
+
+
+Private
set Task Stealing
+
+set Task Stealing ( ) : void
+
Returns void
+Defined in src/pools/abstract-pool.ts:620
+Defined in src/pools/abstract-pool.ts:579
+
+Private
set Tasks Queue Size
+
+set Tasks Queue Size ( size ) : void
+
+
+Returns void
+
+Private
set Tasks Stealing On Back Pressure
+
+set Tasks Stealing On Back Pressure ( ) : void
+
+Returns void
+Defined in src/pools/abstract-pool.ts:532
set Worker Choice Strategy Options
+Defined in src/pools/abstract-pool.ts:551
Protected
setup Hook
@@ -1251,7 +1460,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:987
Private
shall Create Dynamic Worker
@@ -1263,7 +1472,20 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1177
+
+Private
shall Execute Task
+
+shall Execute Task ( workerNodeKey ) : boolean
+
+
+Returns boolean
Private
shall Update Task Function Worker Usage
@@ -1283,15 +1505,19 @@ Can be overridden.
-
+
+start
+
+start ( ) : void
-Returns void
+Defined in src/pools/abstract-pool.ts:924
Private
task Stealing On Empty Queue
@@ -1304,7 +1530,7 @@ Can be overridden.
workerId : number
Returns void
+Defined in src/pools/abstract-pool.ts:1430
Private
tasks Queue Size
@@ -1317,7 +1543,7 @@ Can be overridden.
workerNodeKey : number
Returns number
+Defined in src/pools/abstract-pool.ts:1662
Private
tasks Stealing On Back Pressure
@@ -1330,7 +1556,23 @@ Can be overridden.
workerId : number
Returns void
+Defined in src/pools/abstract-pool.ts:1458
+
+Private
unset Task Stealing
+
+unset Task Stealing ( ) : void
+
+Returns void
+
+Private
unset Tasks Stealing On Back Pressure
+
+unset Tasks Stealing On Back Pressure ( ) : void
+
+Returns void
Private
update Elu Worker Usage
@@ -1345,7 +1587,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1120
Private
update Run Time Worker Usage
@@ -1360,7 +1602,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1093
Private
update Task Statistics Worker Usage
@@ -1375,7 +1617,22 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1075
+
+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
@@ -1390,39 +1647,28 @@ Can be overridden.
task : Task < Data >
Returns void
-
+
+Protected
worker Message Listener
+poolifier - v3.0.0
+
-
\ No newline at end of file
+Generated using TypeDoc
+
\ No newline at end of file
Emitter on which events can be listened to.
+
+Optional
emitterEvent emitter integrated with async resource on which events can be listened to. +The async tracking tooling identifier is
poolifier:<PoolType>-<WorkerType>-pool
.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).Protected
Readonly
fileProtected
Optional
Readonly
max