X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FAbstractPool.html;h=072c9da05dae4cb0411cc9c601675033feef32ac;hb=b2862722f44d3facf07a2e632d25d261f3dabbce;hp=2fe2f7cd195f2bbd6499945eb63d4dad225ffc0c;hpb=bde3557b4daaacaea222926c3ac6934dcb90fdaa;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index 2fe2f7cd..072c9da0 100644
--- a/docs/classes/AbstractPool.html
+++ b/docs/classes/AbstractPool.html
@@ -1,13 +1,13 @@
-
AbstractPool | poolifier - v2.6.30
@@ -49,32 +49,34 @@
IPool < Worker , Data , Response >
+
Defined in src/pools/abstract-pool.ts:65
- Index
+ Index
Constructors
-constructor
+
Properties
-emitter?
+
Accessors
-busy
+
Constructors
-constructor
+constructor
new Abstract Pool < Worker , Data , Response > ( numberOfWorkers , filePath , opts ) : AbstractPool < Worker , Data , Response >
@@ -185,28 +202,29 @@
Returns AbstractPool < Worker , Data , Response >
+
Defined in src/pools/abstract-pool.ts:127
Protected
Optional
Readonly
max
max ?: number
@@ -222,7 +240,7 @@
+
Defined in src/pools/abstract-pool.ts:79
Protected
Readonly
number Of Workers
number Of Workers : number
@@ -230,7 +248,7 @@
+
Defined in src/pools/abstract-pool.ts:128
Protected
Readonly
opts
@@ -238,11 +256,11 @@
+
Defined in src/pools/abstract-pool.ts:130
Protected
promise Response Map
-
+
Defined in src/pools/abstract-pool.ts:118
+
+Private
started
+started : boolean
+
+
-Private
Readonly
starting
+Private
starting
starting : boolean
+
Defined in src/pools/abstract-pool.ts:114
+
+Private
Readonly
task Functions
+
+
+
Protected
worker Choice Strategy Context
@@ -275,7 +313,7 @@
+Defined in src/pools/abstract-pool.ts:94
Readonly
Internal
worker Nodes
@@ -284,7 +322,7 @@
+
Defined in src/pools/abstract-pool.ts:71
Protected
full
@@ -310,7 +348,7 @@
Returns boolean
+
Defined in src/pools/abstract-pool.ts:662
+
Defined in src/pools/abstract-pool.ts:272
Protected
max Size
@@ -333,7 +371,7 @@
Returns number
+
Defined in src/pools/abstract-pool.ts:485
Protected
min Size
@@ -344,7 +382,7 @@
Returns number
+
Defined in src/pools/abstract-pool.ts:478
Private
ready
@@ -355,7 +393,7 @@
Returns boolean
+
Defined in src/pools/abstract-pool.ts:430
Protected
Abstract
type
@@ -367,7 +405,7 @@
Returns "fixed" | "dynamic"
+
Defined in src/pools/abstract-pool.ts:468
+
Defined in src/pools/abstract-pool.ts:447
Protected
Abstract
worker
@@ -390,9 +428,40 @@
Returns "thread" | "cluster"
+
Defined in src/pools/abstract-pool.ts:473
+
Defined in src/pools/abstract-pool.ts:1614
Protected
after Task Execution Hook
@@ -439,7 +508,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1044
Protected
after Worker Node Setup
@@ -459,7 +528,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1355
Protected
before Task Execution Hook
@@ -484,7 +553,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1014
Private
build Tasks Queue Options
@@ -497,7 +566,7 @@ Can be overridden.
+
Defined in src/pools/abstract-pool.ts:601
Private
check And Emit Dynamic Worker Creation Events
@@ -505,7 +574,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1589
Private
check And Emit Task Execution Events
@@ -513,7 +582,7 @@ Can be overridden.
Returns void
+
Defined in src/pools/abstract-pool.ts:1577
Private
check And Emit Task Queuing Events
@@ -521,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:1583
Private
check Message Worker Id
@@ -561,7 +602,7 @@ Can be overridden.
Parameters
@@ -570,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:495
Private
check Number Of Workers
@@ -583,7 +624,7 @@ Can be overridden.
numberOfWorkers : number
Returns void
+Defined in src/pools/abstract-pool.ts:171
Private
check Pool Options
@@ -596,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:189
Private
check Valid Worker Choice Strategy Options
@@ -635,7 +650,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:218
Private
choose Worker Node
@@ -648,7 +663,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1171
Protected
create And Setup Dynamic Worker Node
@@ -660,7 +675,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1261
Protected
create And Setup Worker Node
@@ -672,7 +687,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1217
Protected
Abstract
create Worker
@@ -684,7 +699,20 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:1210
+
+Private
delete Task Function Worker Usages
+
+delete Task Function Worker Usages ( name ) : void
+
+
+Returns void
Private
dequeue Task
@@ -697,7 +725,47 @@ Can be overridden.
workerNodeKey : number
Returns undefined | Task < Data >
+Defined in src/pools/abstract-pool.ts:1679
+
+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:951
Protected
Abstract
destroy Worker Node
@@ -728,32 +796,32 @@ Can be overridden.
Returns Promise < void >
+Defined in src/pools/abstract-pool.ts:990
enable Tasks Queue
enable Tasks Queue ( enable , tasksQueueOptions ? ) : void
-
@@ -904,7 +972,33 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:526
+
+Private
Readonly
handle Back Pressure Event
+
+handle Back Pressure Event ( event ) : void
+
+
+
Parameters
+
+
+event : CustomEvent < WorkerNodeEventDetail >
+Returns void
+
+Private
Readonly
handle Empty Queue Event
+
+handle Empty Queue Event ( event ) : void
+
+
+
Parameters
+
+
+event : CustomEvent < WorkerNodeEventDetail >
+Returns void
Private
handle Task Execution Response
@@ -917,7 +1011,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1549
Private
handle Worker Ready Response
@@ -930,7 +1024,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1533
Private
has Back Pressure
@@ -938,7 +1032,28 @@ Can be overridden.
Returns boolean
+Defined in src/pools/abstract-pool.ts:1652
+
has Worker Node Back Pressure
+Defined in src/pools/abstract-pool.ts:1645
+
+Private
initialize Event Emitter
+
+initialize Event Emitter ( ) : void
+
+Returns void
Protected
internal Busy
@@ -971,7 +1094,7 @@ Can be overridden.
+Defined in src/pools/abstract-pool.ts:678
Protected
Abstract
is Main
@@ -982,20 +1105,20 @@ Can be overridden.
Returns boolean
-
+
+Defined in src/pools/abstract-pool.ts:846
Private
redistribute Queued Tasks
@@ -1008,7 +1131,47 @@ Can be overridden.
workerNodeKey : number
Returns void
+Defined in src/pools/abstract-pool.ts:1405
+
+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
@@ -1048,7 +1211,28 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1316
+
Private
remove Worker Node
@@ -1067,22 +1251,20 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1636
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:962
Protected
Abstract
send Startup Message To Worker
@@ -1101,7 +1283,7 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1386
Private
send Statistics Message To Worker
@@ -1120,7 +1302,35 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1393
+
+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
@@ -1149,27 +1359,77 @@ Can be overridden.
Returns void
+Defined in src/pools/abstract-pool.ts:1199
+
+set Default Task Function
+
+
+Private
set Task Stealing
+
+set Task Stealing ( ) : void
+
+Returns void
set Tasks Queue Options
set Tasks Queue Options ( tasksQueueOptions ) : void
-
Returns void
+Defined in src/pools/abstract-pool.ts:1131
Private
update Run Time Worker Usage
@@ -1309,7 +1602,7 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1104
Private
update Task Statistics Worker Usage
@@ -1324,7 +1617,22 @@ Can be overridden.
message : MessageValue < Response , unknown >
Returns void
+Defined in src/pools/abstract-pool.ts:1086
+
+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
@@ -1339,39 +1647,28 @@ Can be overridden.
task : Task < Data >
Returns void
-
+
+Protected
worker Message Listener
+poolifier - v3.0.1
+
-
\ 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 >= pool maximum size^2).'backPressure'
: Emitted when all worker nodes have back pressure (i.e. their tasks queue is full: queue size >= maximum queue size).Protected
Readonly
file