docs: generate documentation
[poolifier.git] / docs / classes / DynamicClusterPool.html
CommitLineData
224d0081 1<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>DynamicClusterPool | poolifier - v4.0.15</title><meta name="description" content="Documentation for poolifier"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">poolifier - v4.0.15</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">poolifier</a></li><li><a href="DynamicClusterPool.html">DynamicClusterPool</a></li></ul><h1>Class DynamicClusterPool&lt;Data, Response&gt;</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A cluster pool with a dynamic number of workers, but a guaranteed minimum number of workers.</p>
a76fac14 2<p>This cluster pool creates new workers when the others are busy, up to the maximum number of workers.
224d0081
DB
3When the maximum number of workers is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool's <code>emitter</code>.</p>
4</div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Author" class="tsd-anchor"></a>Author<a href="#Author" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://github.com/Shinigami92">Christopher Quadflieg</a></p>
5<h4 class="tsd-anchor-link"><a id="Since" class="tsd-anchor"></a>Since<a href="#Since" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>2.0.0</p>
86de0a2d
DB
6</div></section> <section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="Data" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Data</span> = <span class="tsd-signature-type">unknown</span></span><div class="tsd-comment tsd-typography"><p>Type of data sent to the worker. This can only be structured-cloneable data.</p>
7</div><div class="tsd-comment tsd-typography"></div></li><li><span><a id="Response" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Response</span> = <span class="tsd-signature-type">unknown</span></span><div class="tsd-comment tsd-typography"><p>Type of execution response. This can only be structured-cloneable data.</p>
224d0081 8</div><div class="tsd-comment tsd-typography"></div></li></ul></section> <section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#DynamicClusterPool">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="FixedClusterPool.html" class="tsd-signature-type tsd-kind-class">FixedClusterPool</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><ul class="tsd-hierarchy"><li><span class="target">DynamicClusterPool</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/dynamic.ts#L15">src/pools/cluster/dynamic.ts:15</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="DynamicClusterPool.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
86de0a2d
DB
9</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="DynamicClusterPool.html#emitter" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>emitter?</span></a>
10<a href="DynamicClusterPool.html#filePath" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>file<wbr/>Path</span></a>
11<a href="DynamicClusterPool.html#maximumNumberOfWorkers" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers?</span></a>
12<a href="DynamicClusterPool.html#minimumNumberOfWorkers" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span></a>
13<a href="DynamicClusterPool.html#opts" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>opts</span></a>
14<a href="DynamicClusterPool.html#promiseResponseMap" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>promise<wbr/>Response<wbr/>Map</span></a>
50b4c8bb 15<a href="DynamicClusterPool.html#workerChoiceStrategiesContext" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategies<wbr/>Context?</span></a>
86de0a2d
DB
16<a href="DynamicClusterPool.html#workerNodes" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Nodes</span></a>
17</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="DynamicClusterPool.html#busy" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>busy</span></a>
18<a href="DynamicClusterPool.html#empty" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>empty</span></a>
19<a href="DynamicClusterPool.html#full" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>full</span></a>
20<a href="DynamicClusterPool.html#info" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>info</span></a>
86de0a2d 21<a href="DynamicClusterPool.html#type" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>type</span></a>
86de0a2d
DB
22<a href="DynamicClusterPool.html#worker" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>worker</span></a>
23</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="DynamicClusterPool.html#addTaskFunction" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Task<wbr/>Function</span></a>
24<a href="DynamicClusterPool.html#afterTaskExecutionHook" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a>
25<a href="DynamicClusterPool.html#afterWorkerNodeSetup" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>after<wbr/>Worker<wbr/>Node<wbr/>Setup</span></a>
26<a href="DynamicClusterPool.html#beforeTaskExecutionHook" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a>
27<a href="DynamicClusterPool.html#checkAndEmitDynamicWorkerCreationEvents" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span></a>
28<a href="DynamicClusterPool.html#createAndSetupDynamicWorkerNode" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span></a>
29<a href="DynamicClusterPool.html#createAndSetupWorkerNode" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span></a>
30<a href="DynamicClusterPool.html#deregisterWorkerMessageListener" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
31<a href="DynamicClusterPool.html#destroy" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a>
32<a href="DynamicClusterPool.html#destroyWorkerNode" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy<wbr/>Worker<wbr/>Node</span></a>
33<a href="DynamicClusterPool.html#enableTasksQueue" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enable<wbr/>Tasks<wbr/>Queue</span></a>
34<a href="DynamicClusterPool.html#execute" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>execute</span></a>
35<a href="DynamicClusterPool.html#flagWorkerNodeAsNotReady" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span></a>
36<a href="DynamicClusterPool.html#flushTasksQueue" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue</span></a>
37<a href="DynamicClusterPool.html#getWorkerInfo" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Worker<wbr/>Info</span></a>
38<a href="DynamicClusterPool.html#hasTaskFunction" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Task<wbr/>Function</span></a>
39<a href="DynamicClusterPool.html#internalBusy" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>internal<wbr/>Busy</span></a>
40<a href="DynamicClusterPool.html#isMain" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Main</span></a>
50b4c8bb 41<a href="DynamicClusterPool.html#listTaskFunctionsProperties" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Task<wbr/>Functions<wbr/>Properties</span></a>
4ac8e928 42<a href="DynamicClusterPool.html#mapExecute" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map<wbr/>Execute</span></a>
86de0a2d
DB
43<a href="DynamicClusterPool.html#registerOnceWorkerMessageListener" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
44<a href="DynamicClusterPool.html#registerWorkerMessageListener" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
45<a href="DynamicClusterPool.html#removeTaskFunction" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Task<wbr/>Function</span></a>
46<a href="DynamicClusterPool.html#sendStartupMessageToWorker" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>send<wbr/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span></a>
47<a href="DynamicClusterPool.html#sendToWorker" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>send<wbr/>To<wbr/>Worker</span></a>
48<a href="DynamicClusterPool.html#setDefaultTaskFunction" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Default<wbr/>Task<wbr/>Function</span></a>
49<a href="DynamicClusterPool.html#setTasksQueueOptions" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span></a>
50<a href="DynamicClusterPool.html#setWorkerChoiceStrategy" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a>
51<a href="DynamicClusterPool.html#setWorkerChoiceStrategyOptions" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a>
52<a href="DynamicClusterPool.html#setupHook" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>setup<wbr/>Hook</span></a>
53<a href="DynamicClusterPool.html#shallCreateDynamicWorker" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span></a>
54<a href="DynamicClusterPool.html#start" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start</span></a>
55<a href="DynamicClusterPool.html#workerMessageListener" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>worker<wbr/>Message<wbr/>Listener</span></a>
224d0081 56</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_DynamicClusterPool" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Dynamic<wbr/>Cluster<wbr/>Pool</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">min</span>, <span class="tsd-kind-parameter">max</span>, <span class="tsd-kind-parameter">filePath</span>, <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DynamicClusterPool.html" class="tsd-signature-type tsd-kind-class">DynamicClusterPool</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_DynamicClusterPool" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a new poolifier dynamic cluster pool.</p>
86de0a2d
DB
57</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="constructor.new_DynamicClusterPool.Data-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Data</span> = <span class="tsd-signature-type">unknown</span></span></li><li><span><a id="constructor.new_DynamicClusterPool.Response-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Response</span> = <span class="tsd-signature-type">unknown</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">min</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Minimum number of workers which are always active.</p>
58</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">max</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Maximum number of workers that can be created by this pool.</p>
59</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">filePath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Path to an implementation of a <code>ClusterWorker</code> file, which can be relative or absolute.</p>
60</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <a href="../types/ClusterPoolOptions.html" class="tsd-signature-type tsd-kind-type-alias">ClusterPoolOptions</a><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>Options for this dynamic cluster pool.</p>
224d0081 61</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="DynamicClusterPool.html" class="tsd-signature-type tsd-kind-class">DynamicClusterPool</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/dynamic.ts#L26">src/pools/cluster/dynamic.ts:26</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="emitter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>emitter</span><a href="#emitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">emitter</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">EventEmitterAsyncResource</span></div><div class="tsd-comment tsd-typography"><p>Pool event emitter integrated with async resource.
48c6ba05 62The async tracking tooling identifier is <code>poolifier:&lt;PoolType&gt;-&lt;WorkerType&gt;-pool</code>.</p>
6c525543 63<p>Events that can currently be listened to:</p>
64<ul>
224d0081
DB
65<li><code>'ready'</code>: Emitted when the number of workers created in the pool has reached the minimum size expected and are ready. If the pool is dynamic with a minimum number of workers is set to zero, this event is emitted when at least one dynamic worker is ready.</li>
66<li><code>'busy'</code>: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing concurrently their tasks quota.</li>
67<li><code>'full'</code>: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.</li>
68<li><code>'empty'</code>: Emitted when the pool is dynamic with a minimum number of workers set to zero and the number of workers has reached the minimum size expected.</li>
69<li><code>'destroy'</code>: Emitted when the pool is destroyed.</li>
70<li><code>'error'</code>: Emitted when an uncaught error occurs.</li>
71<li><code>'taskError'</code>: Emitted when an error occurs while executing a task.</li>
72<li><code>'backPressure'</code>: Emitted when all worker nodes have back pressure (i.e. their tasks queue is full: queue size &gt;= maximum queue size).</li>
6c525543 73</ul>
224d0081
DB
74</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#emitter">emitter</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L86">src/pools/abstract-pool.ts:86</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="filePath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>file<wbr/>Path</span><a href="#filePath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">file<wbr/>Path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Path to the worker file.</p>
75</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#filePath">filePath</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L156">src/pools/abstract-pool.ts:156</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="maximumNumberOfWorkers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span><a href="#maximumNumberOfWorkers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Maximum number of workers that this pool manages.</p>
76</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#maximumNumberOfWorkers">maximumNumberOfWorkers</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L158">src/pools/abstract-pool.ts:158</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="minimumNumberOfWorkers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span><a href="#minimumNumberOfWorkers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Minimum number of workers that this pool manages.</p>
77</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#minimumNumberOfWorkers">minimumNumberOfWorkers</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L155">src/pools/abstract-pool.ts:155</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="opts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>opts</span><a href="#opts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">opts</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/PoolOptions.html" class="tsd-signature-type tsd-kind-interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Options for the pool.</p>
78</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#opts">opts</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L157">src/pools/abstract-pool.ts:157</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="promiseResponseMap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>promise<wbr/>Response<wbr/>Map</span><a href="#promiseResponseMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">promise<wbr/>Response<wbr/>Map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">`</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">`</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/PromiseResponseWrapper.html" class="tsd-signature-type tsd-kind-interface">PromiseResponseWrapper</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-comment tsd-typography"><p>The task execution response promise map:</p>
a76fac14 79<ul>
79458fb6 80<li><code>key</code>: The message id of each submitted task.</li>
224d0081 81<li><code>value</code>: An object that contains task's worker node key, execution response promise resolve and reject callbacks, async resource.</li>
24c3fcb4 82</ul>
21402562 83<p>When we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id.</p>
224d0081
DB
84</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#promiseResponseMap">promiseResponseMap</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L95">src/pools/abstract-pool.ts:95</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="workerChoiceStrategiesContext" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Optional</code><span>worker<wbr/>Choice<wbr/>Strategies<wbr/>Context</span><a href="#workerChoiceStrategiesContext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">worker<wbr/>Choice<wbr/>Strategies<wbr/>Context</span><span class="tsd-signature-symbol">?:</span> <a href="WorkerChoiceStrategiesContext.html" class="tsd-signature-type tsd-kind-class">WorkerChoiceStrategiesContext</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Worker choice strategies context referencing worker choice algorithms implementation.</p>
85</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#workerChoiceStrategiesContext">workerChoiceStrategiesContext</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L106">src/pools/abstract-pool.ts:106</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="workerNodes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code> <code class="tsd-tag">Internal</code><span>worker<wbr/>Nodes</span><a href="#workerNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">worker<wbr/>Nodes</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/IWorkerNode.html" class="tsd-signature-type tsd-kind-interface">IWorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><div class="tsd-comment tsd-typography"><p>Pool worker nodes.</p>
86</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#workerNodes">workerNodes</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L83">src/pools/abstract-pool.ts:83</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Accessors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Accessors</h2></summary><section><section class="tsd-panel tsd-member tsd-is-protected"><a id="busy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>busy</span><a href="#busy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature" id="busy.busy-1"><span class="tsd-signature-keyword">get</span> busy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether the pool is busy or not.</p>
627fc572 87</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The pool busyness boolean status.</p>
224d0081 88<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides FixedClusterPool.busy</p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/dynamic.ts#L57">src/pools/cluster/dynamic.ts:57</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="empty" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>empty</span><a href="#empty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature" id="empty.empty-1"><span class="tsd-signature-keyword">get</span> empty<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether the pool is empty or not.</p>
627fc572 89</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The pool emptiness boolean status.</p>
224d0081 90<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from FixedClusterPool.empty</p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L613">src/pools/abstract-pool.ts:613</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="full" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>full</span><a href="#full" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature" id="full.full-1"><span class="tsd-signature-keyword">get</span> full<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether the pool is full or not.</p>
627fc572 91</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The pool fullness boolean status.</p>
224d0081
DB
92<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from FixedClusterPool.full</p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L827">src/pools/abstract-pool.ts:827</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="info" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>info</span><a href="#info" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature" id="info.info-1"><span class="tsd-signature-keyword">get</span> info<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/PoolInfo.html" class="tsd-signature-type tsd-kind-interface">PoolInfo</a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Pool information.</p>
93</div><h4 class="tsd-returns-title">Returns <a href="../interfaces/PoolInfo.html" class="tsd-signature-type tsd-kind-interface">PoolInfo</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from FixedClusterPool.info</p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L295">src/pools/abstract-pool.ts:295</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature" id="type.type-1"><span class="tsd-signature-keyword">get</span> type<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;fixed&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;dynamic&quot;</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The pool type.</p>
94<p>If it is <code>'dynamic'</code>, it provides the <code>max</code> property.</p>
95</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">&quot;fixed&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;dynamic&quot;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides FixedClusterPool.type</p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/dynamic.ts#L52">src/pools/cluster/dynamic.ts:52</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="worker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>worker</span><a href="#worker" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature" id="worker.worker-1"><span class="tsd-signature-keyword">get</span> worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;thread&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;cluster&quot;</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The worker type.</p>
96</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">&quot;thread&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;cluster&quot;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from FixedClusterPool.worker</p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L108">src/pools/cluster/fixed.ts:108</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTaskFunction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Task<wbr/>Function</span><a href="#addTaskFunction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="addTaskFunction.addTaskFunction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Task<wbr/>Function</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span>, <span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#addTaskFunction.addTaskFunction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the task function.</p>
97</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">fn</span>: <a href="../types/TaskFunction.html" class="tsd-signature-type tsd-kind-type-alias">TaskFunction</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/TaskFunctionObject.html" class="tsd-signature-type tsd-kind-interface">TaskFunctionObject</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The task function.</p>
98</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>true</code> if the task function was added, <code>false</code> otherwise.</p>
99<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#addTaskFunction">addTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L979">src/pools/abstract-pool.ts:979</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="afterTaskExecutionHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span><a href="#afterTaskExecutionHook" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="afterTaskExecutionHook.afterTaskExecutionHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">after<wbr/>Task<wbr/>Execution<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#afterTaskExecutionHook.afterTaskExecutionHook-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Hook executed after the worker task execution.
ed1ecf09 100Can be overridden.</p>
86de0a2d
DB
101</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
102</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The received message.</p>
224d0081 103</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#afterTaskExecutionHook">afterTaskExecutionHook</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1422">src/pools/abstract-pool.ts:1422</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="afterWorkerNodeSetup" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>after<wbr/>Worker<wbr/>Node<wbr/>Setup</span><a href="#afterWorkerNodeSetup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="afterWorkerNodeSetup.afterWorkerNodeSetup-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">after<wbr/>Worker<wbr/>Node<wbr/>Setup</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#afterWorkerNodeSetup.afterWorkerNodeSetup-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Method hooked up after a worker node has been newly created.
030eb5a3 104Can be overridden.</p>
86de0a2d 105</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The newly created worker node key.</p>
224d0081 106</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#afterWorkerNodeSetup">afterWorkerNodeSetup</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1734">src/pools/abstract-pool.ts:1734</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="beforeTaskExecutionHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span><a href="#beforeTaskExecutionHook" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="beforeTaskExecutionHook.beforeTaskExecutionHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">before<wbr/>Task<wbr/>Execution<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">task</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#beforeTaskExecutionHook.beforeTaskExecutionHook-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Hook executed before the worker task execution.
ed1ecf09 107Can be overridden.</p>
86de0a2d
DB
108</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
109</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">task</span>: <a href="../interfaces/Task.html" class="tsd-signature-type tsd-kind-interface">Task</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The task to execute.</p>
224d0081
DB
110</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#beforeTaskExecutionHook">beforeTaskExecutionHook</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1382">src/pools/abstract-pool.ts:1382</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="checkAndEmitDynamicWorkerCreationEvents" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span><a href="#checkAndEmitDynamicWorkerCreationEvents" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="checkAndEmitDynamicWorkerCreationEvents.checkAndEmitDynamicWorkerCreationEvents-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#checkAndEmitDynamicWorkerCreationEvents.checkAndEmitDynamicWorkerCreationEvents-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Emits dynamic worker creation events.</p>
111</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#checkAndEmitDynamicWorkerCreationEvents">checkAndEmitDynamicWorkerCreationEvents</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/dynamic.ts#L45">src/pools/cluster/dynamic.ts:45</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="createAndSetupDynamicWorkerNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span><a href="#createAndSetupDynamicWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="createAndSetupDynamicWorkerNode.createAndSetupDynamicWorkerNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#createAndSetupDynamicWorkerNode.createAndSetupDynamicWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new, completely set up dynamic worker node.</p>
f9fc489a 112</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>New, completely set up dynamic worker node key.</p>
224d0081 113<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#createAndSetupDynamicWorkerNode">createAndSetupDynamicWorkerNode</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1633">src/pools/abstract-pool.ts:1633</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="createAndSetupWorkerNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span><a href="#createAndSetupWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="createAndSetupWorkerNode.createAndSetupWorkerNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#createAndSetupWorkerNode.createAndSetupWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new, completely set up worker node.</p>
f9fc489a 114</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>New, completely set up worker node key.</p>
224d0081 115<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#createAndSetupWorkerNode">createAndSetupWorkerNode</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1570">src/pools/abstract-pool.ts:1570</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="deregisterWorkerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#deregisterWorkerMessageListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="deregisterWorkerMessageListener.deregisterWorkerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message">Message</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deregisters a listener callback on the worker given its worker node key.</p>
86de0a2d 116</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Message</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081
DB
117</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
118</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#deregisterWorkerMessageListener">deregisterWorkerMessageListener</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L85">src/pools/cluster/fixed.ts:85</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="destroy.destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroy.destroy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Inherit Doc" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#destroy">destroy</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1291">src/pools/abstract-pool.ts:1291</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="destroyWorkerNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>destroy<wbr/>Worker<wbr/>Node</span><a href="#destroyWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="destroyWorkerNode.destroyWorkerNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy<wbr/>Worker<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroyWorkerNode.destroyWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Terminates the worker node given its worker node key.</p>
86de0a2d 119</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081
DB
120</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#destroyWorkerNode">destroyWorkerNode</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1345">src/pools/abstract-pool.ts:1345</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="enableTasksQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>enable<wbr/>Tasks<wbr/>Queue</span><a href="#enableTasksQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="enableTasksQueue.enableTasksQueue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">enable<wbr/>Tasks<wbr/>Queue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">enable</span>, <span class="tsd-kind-parameter">tasksQueueOptions</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#enableTasksQueue.enableTasksQueue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">enable</span>: <span class="tsd-signature-type">boolean</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">tasksQueueOptions</span>: <a href="../interfaces/TasksQueueOptions.html" class="tsd-signature-type tsd-kind-interface">TasksQueueOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Inherit Doc-1" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#enableTasksQueue">enableTasksQueue</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L733">src/pools/abstract-pool.ts:733</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="execute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>execute</span><a href="#execute" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="execute.execute-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">execute</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">transferList</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><a href="#execute.execute-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">data</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a></span><div class="tsd-comment tsd-typography"><p>The optional task input data for the specified task function. This can only be structured-cloneable data.</p>
121</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The optional name of the task function to execute. If not specified, the default task function will be executed.</p>
122</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">transferList</span>: <span class="tsd-signature-keyword">readonly </span><span class="tsd-signature-type">TransferListItem</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the chosen pool's worker_threads worker and they should not be used in the main thread afterwards.</p>
123</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise with a task function response that will be fulfilled when the task is completed.</p>
124<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#execute">execute</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1160">src/pools/abstract-pool.ts:1160</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="flagWorkerNodeAsNotReady" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span><a href="#flagWorkerNodeAsNotReady" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="flagWorkerNodeAsNotReady.flagWorkerNodeAsNotReady-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#flagWorkerNodeAsNotReady.flagWorkerNodeAsNotReady-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#flagWorkerNodeAsNotReady">flagWorkerNodeAsNotReady</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L2236">src/pools/abstract-pool.ts:2236</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="flushTasksQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>flush<wbr/>Tasks<wbr/>Queue</span><a href="#flushTasksQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="flushTasksQueue.flushTasksQueue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">flush<wbr/>Tasks<wbr/>Queue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#flushTasksQueue.flushTasksQueue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#flushTasksQueue">flushTasksQueue</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L2277">src/pools/abstract-pool.ts:2277</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="getWorkerInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>get<wbr/>Worker<wbr/>Info</span><a href="#getWorkerInfo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="getWorkerInfo.getWorkerInfo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Worker<wbr/>Info</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/WorkerInfo.html" class="tsd-signature-type tsd-kind-interface">WorkerInfo</a><a href="#getWorkerInfo.getWorkerInfo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets the worker information given its worker node key.</p>
86de0a2d 125</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
36df30dd 126</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/WorkerInfo.html" class="tsd-signature-type tsd-kind-interface">WorkerInfo</a></h4><p>The worker information.</p>
224d0081
DB
127<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#getWorkerInfo">getWorkerInfo</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L2164">src/pools/abstract-pool.ts:2164</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="hasTaskFunction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has<wbr/>Task<wbr/>Function</span><a href="#hasTaskFunction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="hasTaskFunction.hasTaskFunction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">has<wbr/>Task<wbr/>Function</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#hasTaskFunction.hasTaskFunction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the task function.</p>
128</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the task function exists, <code>false</code> otherwise.</p>
129<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#hasTaskFunction">hasTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L972">src/pools/abstract-pool.ts:972</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="internalBusy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>internal<wbr/>Busy</span><a href="#internalBusy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="internalBusy.internalBusy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">internal<wbr/>Busy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#internalBusy.internalBusy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether worker nodes are executing concurrently their tasks quota or not.</p>
f9fc489a 130</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>Worker nodes busyness boolean status.</p>
224d0081 131<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#internalBusy">internalBusy</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L844">src/pools/abstract-pool.ts:844</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="isMain" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>is<wbr/>Main</span><a href="#isMain" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="isMain.isMain-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Main</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isMain.isMain-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns whether the worker is the main worker or not.</p>
772b5f23 132</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the worker is the main worker, <code>false</code> otherwise.</p>
224d0081
DB
133<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#isMain">isMain</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L46">src/pools/cluster/fixed.ts:46</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="listTaskFunctionsProperties" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Task<wbr/>Functions<wbr/>Properties</span><a href="#listTaskFunctionsProperties" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="listTaskFunctionsProperties.listTaskFunctionsProperties-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">list<wbr/>Task<wbr/>Functions<wbr/>Properties</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/TaskFunctionProperties.html" class="tsd-signature-type tsd-kind-interface">TaskFunctionProperties</a><span class="tsd-signature-symbol">[]</span><a href="#listTaskFunctionsProperties.listTaskFunctionsProperties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../interfaces/TaskFunctionProperties.html" class="tsd-signature-type tsd-kind-interface">TaskFunctionProperties</a><span class="tsd-signature-symbol">[]</span></h4><p>The properties of task functions available in this pool.</p>
134<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#listTaskFunctionsProperties">listTaskFunctionsProperties</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1040">src/pools/abstract-pool.ts:1040</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="mapExecute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>map<wbr/>Execute</span><a href="#mapExecute" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="mapExecute.mapExecute-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">map<wbr/>Execute</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">transferList</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#mapExecute.mapExecute-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">Iterable</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The tasks iterable input data for the specified task function. This can only be an iterable of structured-cloneable data.</p>
135</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The optional name of the task function to execute. If not specified, the default task function will be executed.</p>
136</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">transferList</span>: <span class="tsd-signature-keyword">readonly </span><span class="tsd-signature-type">TransferListItem</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the chosen pool's worker_threads worker and they should not be used in the main thread afterwards.</p>
137</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise with an array of task function responses that will be fulfilled when the tasks are completed.</p>
138<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#mapExecute">mapExecute</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1229">src/pools/abstract-pool.ts:1229</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="registerOnceWorkerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#registerOnceWorkerMessageListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1">Message</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Registers once a listener callback on the worker given its worker node key.</p>
86de0a2d 139</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Message</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081
DB
140</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
141</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#registerOnceWorkerMessageListener">registerOnceWorkerMessageListener</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L77">src/pools/cluster/fixed.ts:77</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="registerWorkerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#registerWorkerMessageListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="registerWorkerMessageListener.registerWorkerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">register<wbr/>Worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2">Message</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#registerWorkerMessageListener.registerWorkerMessageListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Registers a listener callback on the worker given its worker node key.</p>
86de0a2d 142</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Message</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081
DB
143</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
144</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#registerWorkerMessageListener">registerWorkerMessageListener</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L69">src/pools/cluster/fixed.ts:69</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="removeTaskFunction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Task<wbr/>Function</span><a href="#removeTaskFunction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="removeTaskFunction.removeTaskFunction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Task<wbr/>Function</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#removeTaskFunction.removeTaskFunction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the task function.</p>
145</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>true</code> if the task function was removed, <code>false</code> otherwise.</p>
146<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#removeTaskFunction">removeTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1013">src/pools/abstract-pool.ts:1013</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="sendStartupMessageToWorker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>send<wbr/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span><a href="#sendStartupMessageToWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="sendStartupMessageToWorker.sendStartupMessageToWorker-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">send<wbr/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendStartupMessageToWorker.sendStartupMessageToWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sends the startup message to worker given its worker node key.</p>
86de0a2d 147</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081 148</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#sendStartupMessageToWorker">sendStartupMessageToWorker</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L62">src/pools/cluster/fixed.ts:62</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="sendToWorker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>send<wbr/>To<wbr/>Worker</span><a href="#sendToWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="sendToWorker.sendToWorker-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">send<wbr/>To<wbr/>Worker</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendToWorker.sendToWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sends a message to worker given its worker node key.</p>
86de0a2d
DB
149</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
150</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The message.</p>
224d0081
DB
151</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#sendToWorker">sendToWorker</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L51">src/pools/cluster/fixed.ts:51</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="setDefaultTaskFunction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Default<wbr/>Task<wbr/>Function</span><a href="#setDefaultTaskFunction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="setDefaultTaskFunction.setDefaultTaskFunction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Default<wbr/>Task<wbr/>Function</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#setDefaultTaskFunction.setDefaultTaskFunction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the task function.</p>
152</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>true</code> if the default task function was set, <code>false</code> otherwise.</p>
153<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#setDefaultTaskFunction">setDefaultTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1140">src/pools/abstract-pool.ts:1140</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="setTasksQueueOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span><a href="#setTasksQueueOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="setTasksQueueOptions.setTasksQueueOptions-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tasksQueueOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setTasksQueueOptions.setTasksQueueOptions-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">tasksQueueOptions</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/TasksQueueOptions.html" class="tsd-signature-type tsd-kind-interface">TasksQueueOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Inherit Doc-2" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#setTasksQueueOptions">setTasksQueueOptions</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L747">src/pools/abstract-pool.ts:747</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="setWorkerChoiceStrategy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span><a href="#setWorkerChoiceStrategy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="setWorkerChoiceStrategy.setWorkerChoiceStrategy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerChoiceStrategy</span>, <span class="tsd-kind-parameter">workerChoiceStrategyOptions</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setWorkerChoiceStrategy.setWorkerChoiceStrategy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerChoiceStrategy</span>: <br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;LEAST_USED&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;LEAST_BUSY&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;LEAST_ELU&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;INTERLEAVED_WEIGHTED_ROUND_ROBIN&quot;</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">workerChoiceStrategyOptions</span>: <a href="../interfaces/WorkerChoiceStrategyOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerChoiceStrategyOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Inherit Doc-3" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#setWorkerChoiceStrategy">setWorkerChoiceStrategy</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L680">src/pools/abstract-pool.ts:680</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="setWorkerChoiceStrategyOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><a href="#setWorkerChoiceStrategyOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="setWorkerChoiceStrategyOptions.setWorkerChoiceStrategyOptions-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerChoiceStrategyOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#setWorkerChoiceStrategyOptions.setWorkerChoiceStrategyOptions-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerChoiceStrategyOptions</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/WorkerChoiceStrategyOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerChoiceStrategyOptions</a></span><div class="tsd-comment tsd-typography"><p>The worker choice strategy options.</p>
154</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the worker choice strategy options were set, <code>false</code> otherwise.</p>
155<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#setWorkerChoiceStrategyOptions">setWorkerChoiceStrategyOptions</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L711">src/pools/abstract-pool.ts:711</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setupHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>setup<wbr/>Hook</span><a href="#setupHook" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="setupHook.setupHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">setup<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setupHook.setupHook-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Setup hook to execute code before worker nodes are created in the abstract constructor.
030eb5a3 156Can be overridden.</p>
224d0081 157</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#setupHook">setupHook</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/fixed.ts#L41">src/pools/cluster/fixed.ts:41</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="shallCreateDynamicWorker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span><a href="#shallCreateDynamicWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="shallCreateDynamicWorker.shallCreateDynamicWorker-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#shallCreateDynamicWorker.shallCreateDynamicWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Conditions for dynamic worker creation.</p>
54a050e9 158</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>Whether to create a dynamic worker or not.</p>
224d0081 159<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#shallCreateDynamicWorker">shallCreateDynamicWorker</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/cluster/dynamic.ts#L40">src/pools/cluster/dynamic.ts:40</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="start" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start</span><a href="#start" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="start.start-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">start</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#start.start-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Inherit Doc-4" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#start">start</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L1273">src/pools/abstract-pool.ts:1273</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="workerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>worker<wbr/>Message<wbr/>Listener</span><a href="#workerMessageListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="workerMessageListener.workerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#workerMessageListener.workerMessageListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method is the message listener registered on each worker.</p>
4ac8e928 160</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="DynamicClusterPool.html#constructor.new_DynamicClusterPool.Response-1">Response</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The message received from the worker.</p>
224d0081 161</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="FixedClusterPool.html">FixedClusterPool</a>.<a href="FixedClusterPool.html#workerMessageListener">workerMessageListener</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/pools/abstract-pool.ts#L2040">src/pools/abstract-pool.ts:2040</a></li></ul></aside></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#emitter" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>emitter</span></a><a href="#filePath" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>file<wbr/>Path</span></a><a href="#maximumNumberOfWorkers" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span></a><a href="#minimumNumberOfWorkers" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span></a><a href="#opts" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>opts</span></a><a href="#promiseResponseMap" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>promise<wbr/>Response<wbr/>Map</span></a><a href="#workerChoiceStrategiesContext" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategies<wbr/>Context</span></a><a href="#workerNodes" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Nodes</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Accessors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Accessors</summary><div><a href="#busy" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>busy</span></a><a href="#empty" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>empty</span></a><a href="#full" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>full</span></a><a href="#info" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>info</span></a><a href="#type" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>type</span></a><a href="#worker" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>worker</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#addTaskFunction" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Task<wbr/>Function</span></a><a href="#afterTaskExecutionHook" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a><a href="#afterWorkerNodeSetup" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>after<wbr/>Worker<wbr/>Node<wbr/>Setup</span></a><a href="#beforeTaskExecutionHook" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a><a href="#checkAndEmitDynamicWorkerCreationEvents" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span></a><a href="#createAndSetupDynamicWorkerNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span></a><a href="#createAndSetupWorkerNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span></a><a href="#deregisterWorkerMessageListener" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a><a href="#destroy" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a><a href="#destroyWorkerNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy<wbr/>Worker<wbr/>Node</span></a><a href="#enableTasksQueue" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enable<wbr/>Tasks<wbr/>Queue</span></a><a href="#execute" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>execute</span></a><a href="#flagWorkerNodeAsNotReady" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span></a><a href="#flushTasksQueue" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue</span></a><a href="#getWorkerInfo" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Worker<wbr/>Info</span></a><a href="#hasTaskFunction" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Task<wbr/>Function</span></a><a href="#internalBusy" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>internal<wbr/>Busy</span></a><a href="#isMain" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Main</span></a><a href="#listTaskFunctionsProperties" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Task<wbr/>Functions<wbr/>Properties</span></a><a href="#mapExecute" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map<wbr/>Execute</span></a><a href="#registerOnceWorkerMessageListener" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a><a href="#registerWorkerMessageListener" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a><a href="#removeTaskFunction" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Task<wbr/>Function</span></a><a href="#sendStartupMessageToWorker" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>send<wbr/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span></a><a href="#sendToWorker" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>send<wbr/>To<wbr/>Worker</span></a><a href="#setDefaultTaskFunction" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Default<wbr/>Task<wbr/>Function</span></a><a href="#setTasksQueueOptions" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span></a><a href="#setWorkerChoiceStrategy" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a><a href="#setWorkerChoiceStrategyOptions" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a><a href="#setupHook" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>setup<wbr/>Hook</span></a><a href="#shallCreateDynamicWorker" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span></a><a href="#start" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start</span></a><a href="#workerMessageListener" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>worker<wbr/>Message<wbr/>Listener</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>poolifier - v4.0.15</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>