X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FFixedClusterPool.html;h=ac3098f23a5430a4b8e61baeefa9ba4f5d92bafe;hb=ac2cb9e206b5e67cc52124eb334507f5dce230d5;hp=3f1be4eb31f209e8ecb7808737304bd17fbfe76f;hpb=6d59ea2c71b8a88d41498c6fb54dfad95fd3a3ac;p=poolifier.git diff --git a/docs/classes/FixedClusterPool.html b/docs/classes/FixedClusterPool.html index 3f1be4eb..ac3098f2 100644 --- a/docs/classes/FixedClusterPool.html +++ b/docs/classes/FixedClusterPool.html @@ -17,7 +17,6 @@
Generated using TypeDoc
A cluster pool with a fixed number of workers.
-It is possible to perform tasks in sync or asynchronous mode as you prefer.
Author
Christopher Quadflieg
@@ -29,12 +28,12 @@Data = unknown
-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.
@@ -73,13 +72,15 @@ info max Size
min Size
+run Time
type
+utilization
worker
Methods
Properties
Protected
Readonly
fileProtected
Readonly
numberProtected
Readonly
optsProtected
promiseProtected
workerReadonly
workerAccessors
Protected
full@@ -241,7 +241,7 @@
info
@@ -253,7 +253,7 @@
Protected
max@@ -265,7 +265,7 @@
Protected
min@@ -277,7 +277,20 @@
Time
+Private
run+- get runTime(): number
+-
+
+
Gets the pool run time.
+Returns number
The pool run time in milliseconds.
+ +Protected
type@@ -290,7 +303,20 @@
+Private
utilization+- get utilization(): number
+-
+
+
Gets the approximate pool utilization.
+Returns number
The pool utilization.
+ +Protected
worker@@ -302,7 +328,7 @@
Methods
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
The received message.
Worker Setup
-Protected
after+- after
Worker Setup(worker): void
-
-
- Defined in src/pools/abstract-pool.ts:747
Task Execution Hook
+- Defined in src/pools/abstract-pool.ts:539
And Setup Dynamic Worker
+- Defined in src/pools/abstract-pool.ts:790
And Setup Worker
+- Defined in src/pools/abstract-pool.ts:757
Worker
+- Defined in src/pools/cluster/fixed.ts:82
- destroy(): Promise<void>
-
-
- Defined in src/pools/abstract-pool.ts:500
Worker
+- Defined in src/pools/cluster/fixed.ts:68
+- Defined in src/pools/abstract-pool.ts:406
@@ -590,7 +575,7 @@ Can be overridden.
+- Defined in src/pools/cluster/fixed.ts:77
+- Defined in src/pools/abstract-pool.ts:418
+- Defined in src/pools/abstract-pool.ts:373
+- Defined in src/pools/abstract-pool.ts:395
Hook
- setup
Hook(): void
-
-
- Defined in src/pools/cluster/fixed.ts:58
Listener
+
Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes.
-Can be used to update the
+maxListeners
or binding themain-worker
<->worker
connection if not bind by default.Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes. +Can be overridden.
Parameters
@@ -349,9 +375,9 @@ Can be overridden.Returns void
+Protected
before@@ -377,7 +403,7 @@ Can be overridden.
Protected
create@@ -390,7 +416,7 @@ Can be overridden.
Protected
create@@ -403,7 +429,7 @@ Can be overridden.
Protected
create@@ -416,19 +442,19 @@ Can be overridden.
destroy
Terminate every current worker in this pool.
+Terminates every current worker in this pool.
Returns Promise<void>
+Protected
destroy@@ -448,7 +474,7 @@ Can be overridden.
enable Tasks Queue
@@ -473,7 +499,7 @@ Can be overridden.
execute
@@ -486,7 +512,7 @@ Can be overridden.-
-
@@ -499,7 +525,7 @@ Can be overridden.
+- Defined in src/pools/abstract-pool.ts:466
Busy
+- Defined in src/pools/abstract-pool.ts:457
Main
-
-
+- Defined in src/pools/cluster/fixed.ts:63
To Worker
-
-
-Optional
data: DataThe task input data for the specified worker function. This can only be serializable data.
+The task input data for the specified worker function. This can only be structured-cloneable data.
Protected
internal@@ -512,7 +538,7 @@ Can be overridden.
Protected
is@@ -524,48 +550,7 @@ Can be overridden.
Worker Message Listener
-Protected
register-- register
Worker Message Listener<Message>(worker, listener): void
--
-
-
-
-
-
-
Registers a listener callback on the given worker.
-Type Parameters
---
-
Message
Parameters
---
-
-
--
-
-
-
worker: Worker
-The worker which should register a listener.
-listener: ((message) => void)
-The message listener callback.
---
-
-- (message): void
--
-
-
-
Parameters
---
-
message: MessageValue<Message, unknown, Worker | MessagePort>
Returns void
Returns void
-Protected
send@@ -582,7 +567,7 @@ Can be overridden.
message: MessageValue<Data, unknown, Worker | MessagePort>
+message: MessageValue<Data, unknown>
The message.
set Tasks Queue Options
@@ -610,7 +595,7 @@ Can be overridden.
set Worker Choice Strategy
@@ -635,7 +620,7 @@ Can be overridden.
set Worker Choice Strategy Options
@@ -655,20 +640,20 @@ Can be overridden.
Protected
setupSetup hook to execute code before worker node are created in the abstract constructor. -Can be overridden
+Setup hook to execute code before worker nodes are created in the abstract constructor. +Can be overridden.
Returns void
+Protected
worker@@ -689,14 +674,14 @@ 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.