Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git] / docs / classes / AbstractPool.html
CommitLineData
6c525543 1<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AbstractPool | poolifier</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/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2<div class="tsd-toolbar-contents container">
3<div class="table-cell" id="tsd-search" data-base="..">
4<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"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5<div class="field">
6<div id="tsd-toolbar-links"></div></div>
7<ul class="results">
8<li class="state loading">Preparing search index...</li>
9<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">poolifier</a></div>
10<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"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11<div class="container container-main">
12<div class="col-content">
13<div class="tsd-page-title">
14<ul class="tsd-breadcrumb">
15<li><a href="../index.html">poolifier</a></li>
16<li><a href="AbstractPool.html">AbstractPool</a></li></ul>
17<h1>Class AbstractPool&lt;Worker, Data, Response&gt;<code class="tsd-tag ts-flagAbstract">Abstract</code> </h1></div>
18<section class="tsd-panel tsd-comment">
19<div class="tsd-comment tsd-typography"><p>Base class that implements some shared logic for all poolifier pools.</p>
20</div></section>
21<section class="tsd-panel tsd-type-parameters">
22<h4>Type Parameters</h4>
23<ul class="tsd-type-parameters">
24<li>
25<h4>Worker<span class="tsd-signature-symbol"> extends </span><a href="../interfaces/IWorker.html" class="tsd-signature-type" data-tsd-kind="Interface">IWorker</a></h4>
26<div class="tsd-comment tsd-typography"><p>Type of worker which manages this pool.</p>
27</div></li>
28<li>
29<h4>Data = <span class="tsd-signature-type">unknown</span></h4>
30<div class="tsd-comment tsd-typography"><p>Type of data sent to the worker. This can only be serializable data.</p>
31</div></li>
32<li>
33<h4>Response = <span class="tsd-signature-type">unknown</span></h4>
34<div class="tsd-comment tsd-typography"><p>Type of response of execution. This can only be serializable data.</p>
35</div></li></ul></section>
36<section class="tsd-panel tsd-hierarchy">
37<h4>Hierarchy</h4>
38<ul class="tsd-hierarchy">
39<li><span class="target">AbstractPool</span>
40<ul class="tsd-hierarchy">
41<li><a href="FixedClusterPool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedClusterPool</a></li>
42<li><a href="FixedThreadPool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedThreadPool</a></li></ul></li></ul></section>
43<section class="tsd-panel">
44<h4>Implements</h4>
45<ul class="tsd-hierarchy">
46<li><a href="../interfaces/IPool.html" class="tsd-signature-type" data-tsd-kind="Interface">IPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></li></ul></section><aside class="tsd-sources">
47<ul>
842d8918 48<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L32">src/pools/abstract-pool.ts:32</a></li></ul></aside>
6c525543 49<section class="tsd-panel-group tsd-index-group">
50<section class="tsd-panel tsd-index-panel">
51<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
52<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"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
53<div class="tsd-accordion-details">
54<section class="tsd-index-section">
55<h3 class="tsd-index-heading">Constructors</h3>
56<div class="tsd-index-list"><a href="AbstractPool.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
57</div></section>
58<section class="tsd-index-section">
59<h3 class="tsd-index-heading">Properties</h3>
60<div class="tsd-index-list"><a href="AbstractPool.html#emitter" class="tsd-index-link tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>emitter?</span></a>
61<a href="AbstractPool.html#filePath" class="tsd-index-link tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>file<wbr/>Path</span></a>
62<a href="AbstractPool.html#numberOfWorkers" class="tsd-index-link tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>number<wbr/>Of<wbr/>Workers</span></a>
63<a href="AbstractPool.html#opts" class="tsd-index-link tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>opts</span></a>
64<a href="AbstractPool.html#promiseResponseMap" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>promise<wbr/>Response<wbr/>Map</span></a>
65<a href="AbstractPool.html#workerChoiceStrategyContext" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</span></a>
66<a href="AbstractPool.html#workerNodes" class="tsd-index-link tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>worker<wbr/>Nodes</span></a>
67</div></section>
68<section class="tsd-index-section">
69<h3 class="tsd-index-heading">Accessors</h3>
70<div class="tsd-index-list"><a href="AbstractPool.html#busy" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>busy</span></a>
71<a href="AbstractPool.html#full" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>full</span></a>
72<a href="AbstractPool.html#numberOfQueuedTasks" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>number<wbr/>Of<wbr/>Queued<wbr/>Tasks</span></a>
73<a href="AbstractPool.html#numberOfRunningTasks" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>number<wbr/>Of<wbr/>Running<wbr/>Tasks</span></a>
74<a href="AbstractPool.html#type" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>type</span></a>
75</div></section>
76<section class="tsd-index-section">
77<h3 class="tsd-index-heading">Methods</h3>
78<div class="tsd-index-list"><a href="AbstractPool.html#afterTaskExecutionHook" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a>
79<a href="AbstractPool.html#afterWorkerSetup" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>after<wbr/>Worker<wbr/>Setup</span></a>
80<a href="AbstractPool.html#beforeTaskExecutionHook" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a>
81<a href="AbstractPool.html#checkAndEmitEvents" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>And<wbr/>Emit<wbr/>Events</span></a>
82<a href="AbstractPool.html#checkFilePath" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>File<wbr/>Path</span></a>
83<a href="AbstractPool.html#checkNumberOfWorkers" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Number<wbr/>Of<wbr/>Workers</span></a>
84<a href="AbstractPool.html#checkPoolOptions" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Pool<wbr/>Options</span></a>
85<a href="AbstractPool.html#checkValidWorkerChoiceStrategy" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Valid<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a>
86<a href="AbstractPool.html#chooseWorkerNode" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>choose<wbr/>Worker<wbr/>Node</span></a>
87<a href="AbstractPool.html#createAndSetupWorker" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Worker</span></a>
88<a href="AbstractPool.html#createWorker" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>Worker</span></a>
89<a href="AbstractPool.html#dequeueTask" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>dequeue<wbr/>Task</span></a>
90<a href="AbstractPool.html#destroy" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>destroy</span></a>
91<a href="AbstractPool.html#destroyWorker" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>destroy<wbr/>Worker</span></a>
92<a href="AbstractPool.html#enqueueTask" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>enqueue<wbr/>Task</span></a>
93<a href="AbstractPool.html#execute" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>execute</span></a>
94<a href="AbstractPool.html#executeTask" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>execute<wbr/>Task</span></a>
95<a href="AbstractPool.html#findFreeWorkerNodeKey" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key</span></a>
96<a href="AbstractPool.html#flushTasksQueue" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue</span></a>
97<a href="AbstractPool.html#flushTasksQueueByWorker" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue<wbr/>By<wbr/>Worker</span></a>
98<a href="AbstractPool.html#getWorkerNodeKey" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Worker<wbr/>Node<wbr/>Key</span></a>
99<a href="AbstractPool.html#getWorkerTasksUsage" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Worker<wbr/>Tasks<wbr/>Usage</span></a>
100<a href="AbstractPool.html#internalBusy" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>internal<wbr/>Busy</span></a>
101<a href="AbstractPool.html#isMain" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>is<wbr/>Main</span></a>
102<a href="AbstractPool.html#pushWorkerNode" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>push<wbr/>Worker<wbr/>Node</span></a>
103<a href="AbstractPool.html#registerWorkerMessageListener" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
104<a href="AbstractPool.html#removeWorkerNode" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>remove<wbr/>Worker<wbr/>Node</span></a>
105<a href="AbstractPool.html#sendToWorker" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Worker</span></a>
106<a href="AbstractPool.html#setWorkerChoiceStrategy" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a>
107<a href="AbstractPool.html#setWorkerNode" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Worker<wbr/>Node</span></a>
108<a href="AbstractPool.html#setWorkerNodeTasksUsage" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Worker<wbr/>Node<wbr/>Tasks<wbr/>Usage</span></a>
109<a href="AbstractPool.html#setupHook" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>setup<wbr/>Hook</span></a>
110<a href="AbstractPool.html#tasksQueueSize" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>tasks<wbr/>Queue<wbr/>Size</span></a>
111<a href="AbstractPool.html#workerListener" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>worker<wbr/>Listener</span></a>
112</div></section></div></details></section></section>
113<section class="tsd-panel-group tsd-member-group">
114<h2>Constructors</h2>
115<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
116<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
117<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
118<li class="tsd-signature tsd-anchor-link" id="constructor.new_AbstractPool">new <wbr/>Abstract<wbr/>Pool<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>numberOfWorkers<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, filePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, opts<span class="tsd-signature-symbol">: </span><a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractPool.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_AbstractPool" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
119<li class="tsd-description">
120<div class="tsd-comment tsd-typography"><p>Constructs a new poolifier pool.</p>
121</div>
122<section class="tsd-panel tsd-type-parameters">
123<h4>Type Parameters</h4>
124<ul class="tsd-type-parameters">
125<li>
126<h4>Worker<span class="tsd-signature-symbol"> extends </span><a href="../interfaces/IWorker.html" class="tsd-signature-type" data-tsd-kind="Interface">IWorker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">&gt;</span></h4></li>
127<li>
128<h4>Data = <span class="tsd-signature-type">unknown</span></h4></li>
129<li>
130<h4>Response = <span class="tsd-signature-type">unknown</span></h4></li></ul></section>
131<div class="tsd-parameters">
132<h4 class="tsd-parameters-title">Parameters</h4>
133<ul class="tsd-parameter-list">
134<li>
135<h5>numberOfWorkers: <span class="tsd-signature-type">number</span></h5>
136<div class="tsd-comment tsd-typography"><p>Number of workers that this pool should manage.</p>
137</div></li>
138<li>
139<h5>filePath: <span class="tsd-signature-type">string</span></h5>
140<div class="tsd-comment tsd-typography"><p>Path to the worker-file.</p>
141</div></li>
142<li>
143<h5>opts: <a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-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></h5>
144<div class="tsd-comment tsd-typography"><p>Options for the pool.</p>
145</div></li></ul></div>
146<h4 class="tsd-returns-title">Returns <a href="AbstractPool.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
147<ul>
842d8918 148<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L74">src/pools/abstract-pool.ts:74</a></li></ul></aside></li></ul></section></section>
6c525543 149<section class="tsd-panel-group tsd-member-group">
150<h2>Properties</h2>
151<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="emitter" class="tsd-anchor"></a>
152<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>emitter</span><a href="#emitter" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
153<div class="tsd-signature">emitter<span class="tsd-signature-symbol">?:</span> <a href="PoolEmitter.html" class="tsd-signature-type" data-tsd-kind="Class">PoolEmitter</a></div>
154<div class="tsd-comment tsd-typography"><p>Emitter on which events can be listened to.</p>
155<p>Events that can currently be listened to:</p>
156<ul>
157<li><code>&#39;full&#39;</code>: Emitted when the pool is dynamic and full.</li>
158<li><code>&#39;busy&#39;</code>: Emitted when the pool is busy.</li>
159</ul>
160</div><aside class="tsd-sources">
161<p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#emitter">emitter</a></p>
162<ul>
842d8918 163<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L41">src/pools/abstract-pool.ts:41</a></li></ul></aside></section>
6c525543 164<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="filePath" class="tsd-anchor"></a>
165<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>file<wbr/>Path</span><a href="#filePath" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
166<div class="tsd-signature">file<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
167<div class="tsd-comment tsd-typography"><p>Path to the worker-file.</p>
168</div><aside class="tsd-sources">
169<ul>
842d8918 170<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L76">src/pools/abstract-pool.ts:76</a></li></ul></aside></section>
6c525543 171<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="numberOfWorkers" class="tsd-anchor"></a>
172<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>number<wbr/>Of<wbr/>Workers</span><a href="#numberOfWorkers" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
173<div class="tsd-signature">number<wbr/>Of<wbr/>Workers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
174<div class="tsd-comment tsd-typography"><p>Number of workers that this pool should manage.</p>
175</div><aside class="tsd-sources">
176<ul>
842d8918 177<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L75">src/pools/abstract-pool.ts:75</a></li></ul></aside></section>
6c525543 178<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="opts" class="tsd-anchor"></a>
179<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>opts</span><a href="#opts" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
180<div class="tsd-signature">opts<span class="tsd-signature-symbol">:</span> <a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-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>
181<div class="tsd-comment tsd-typography"><p>Options for the pool.</p>
182</div><aside class="tsd-sources">
183<ul>
842d8918 184<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L77">src/pools/abstract-pool.ts:77</a></li></ul></aside></section>
6c525543 185<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a id="promiseResponseMap" class="tsd-anchor"></a>
186<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>promise<wbr/>Response<wbr/>Map</span><a href="#promiseResponseMap" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
d49303bc 187<div class="tsd-signature">promise<wbr/>Response<wbr/>Map<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/PromiseResponseWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">PromiseResponseWrapper</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div>
6c525543 188<div class="tsd-comment tsd-typography"><p>The execution response promise map.</p>
189<ul>
190<li><code>key</code>: The message id of each submitted task.</li>
191<li><code>value</code>: An object that contains the worker, the execution response promise resolve and reject callbacks.</li>
192</ul>
193<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>
194</div><aside class="tsd-sources">
195<ul>
842d8918 196<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L51">src/pools/abstract-pool.ts:51</a></li></ul></aside></section>
6c525543 197<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a id="workerChoiceStrategyContext" class="tsd-anchor"></a>
198<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</span><a href="#workerChoiceStrategyContext" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
199<div class="tsd-signature">worker<wbr/>Choice<wbr/>Strategy<wbr/>Context<span class="tsd-signature-symbol">:</span> <a href="WorkerChoiceStrategyContext.html" class="tsd-signature-type" data-tsd-kind="Class">WorkerChoiceStrategyContext</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></div>
200<div class="tsd-comment tsd-typography"><p>Worker choice strategy context referencing a worker choice algorithm implementation.</p>
201<p>Default to a round robin algorithm.</p>
202</div><aside class="tsd-sources">
203<ul>
842d8918 204<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L61">src/pools/abstract-pool.ts:61</a></li></ul></aside></section>
6c525543 205<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="workerNodes" class="tsd-anchor"></a>
206<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>worker<wbr/>Nodes</span><a href="#workerNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
207<div class="tsd-signature">worker<wbr/>Nodes<span class="tsd-signature-symbol">:</span> <a href="../interfaces/WorkerNode.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div>
208<div class="tsd-comment tsd-typography"><p>Pool worker nodes.</p>
209</div><aside class="tsd-sources">
210<p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#workerNodes">workerNodes</a></p>
211<ul>
842d8918 212<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L38">src/pools/abstract-pool.ts:38</a></li></ul></aside></section></section>
6c525543 213<section class="tsd-panel-group tsd-member-group">
214<h2>Accessors</h2>
215<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="busy" class="tsd-anchor"></a>
216<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>busy</span><a href="#busy" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
217<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
218<li class="tsd-signature" id="busy.busy-1"><span class="tsd-signature-symbol">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>
219<li class="tsd-description">
220<div class="tsd-comment tsd-typography"><p>Whether the pool is busy or not.</p>
221<p>The pool busyness boolean status.</p>
222</div>
223<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
224<p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#busy">busy</a></p>
225<ul>
842d8918 226<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L234">src/pools/abstract-pool.ts:234</a></li></ul></aside></li></ul></section>
6c525543 227<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="full" class="tsd-anchor"></a>
228<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>full</span><a href="#full" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
229<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
230<li class="tsd-signature" id="full.full-1"><span class="tsd-signature-symbol">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>
231<li class="tsd-description">
232<div class="tsd-comment tsd-typography"><p>Whether the pool is full or not.</p>
233<p>The pool filling boolean status.</p>
234</div>
235<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
236<p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#full">full</a></p>
237<ul>
842d8918 238<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L231">src/pools/abstract-pool.ts:231</a></li></ul></aside></li></ul></section>
6c525543 239<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><a id="numberOfQueuedTasks" class="tsd-anchor"></a>
240<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>number<wbr/>Of<wbr/>Queued<wbr/>Tasks</span><a href="#numberOfQueuedTasks" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
241<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-private">
242<li class="tsd-signature" id="numberOfQueuedTasks.numberOfQueuedTasks-1"><span class="tsd-signature-symbol">get</span> numberOfQueuedTasks<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></li>
243<li class="tsd-description">
244<div class="tsd-comment tsd-typography"><p>Number of tasks queued in the pool.</p>
245</div>
246<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
247<ul>
842d8918 248<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L186">src/pools/abstract-pool.ts:186</a></li></ul></aside></li></ul></section>
6c525543 249<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><a id="numberOfRunningTasks" class="tsd-anchor"></a>
250<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>number<wbr/>Of<wbr/>Running<wbr/>Tasks</span><a href="#numberOfRunningTasks" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
251<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-private">
252<li class="tsd-signature" id="numberOfRunningTasks.numberOfRunningTasks-1"><span class="tsd-signature-symbol">get</span> numberOfRunningTasks<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></li>
253<li class="tsd-description">
254<div class="tsd-comment tsd-typography"><p>Number of tasks running in the pool.</p>
255</div>
256<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
257<ul>
842d8918 258<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L176">src/pools/abstract-pool.ts:176</a></li></ul></aside></li></ul></section>
6c525543 259<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="type" class="tsd-anchor"></a>
260<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
261<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
d49303bc 262<li class="tsd-signature" id="type.type-1"><span class="tsd-signature-symbol">get</span> type<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../enums/PoolType.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PoolType</a></li>
6c525543 263<li class="tsd-description">
264<div class="tsd-comment tsd-typography"><p>Pool type.</p>
265<p>If it is <code>&#39;dynamic&#39;</code>, it provides the <code>max</code> property.</p>
266</div>
d49303bc 267<h4 class="tsd-returns-title">Returns <a href="../enums/PoolType.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PoolType</a></h4><aside class="tsd-sources">
6c525543 268<p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#type">type</a></p>
269<ul>
842d8918 270<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L171">src/pools/abstract-pool.ts:171</a></li></ul></aside></li></ul></section></section>
6c525543 271<section class="tsd-panel-group tsd-member-group">
272<h2>Methods</h2>
273<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="afterTaskExecutionHook" class="tsd-anchor"></a>
274<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span><a href="#afterTaskExecutionHook" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
275<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
276<li class="tsd-signature tsd-anchor-link" id="afterTaskExecutionHook.afterTaskExecutionHook-1">after<wbr/>Task<wbr/>Execution<wbr/>Hook<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span>, message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><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">: </span><span class="tsd-signature-type">void</span><a href="#afterTaskExecutionHook.afterTaskExecutionHook-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
277<li class="tsd-description">
278<div class="tsd-comment tsd-typography"><p>Hook executed after the worker task execution.
279Can be overridden.</p>
280</div>
281<div class="tsd-parameters">
282<h4 class="tsd-parameters-title">Parameters</h4>
283<ul class="tsd-parameter-list">
284<li>
285<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
286<div class="tsd-comment tsd-typography"><p>The worker.</p>
287</div></li>
288<li>
289<h5>message: <a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
290<div class="tsd-comment tsd-typography"><p>The received message.</p>
291</div></li></ul></div>
292<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
293<ul>
842d8918 294<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L327">src/pools/abstract-pool.ts:327</a></li></ul></aside></li></ul></section>
6c525543 295<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="afterWorkerSetup" class="tsd-anchor"></a>
296<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagAbstract">Abstract</code> <span>after<wbr/>Worker<wbr/>Setup</span><a href="#afterWorkerSetup" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
297<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
298<li class="tsd-signature tsd-anchor-link" id="afterWorkerSetup.afterWorkerSetup-1">after<wbr/>Worker<wbr/>Setup<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#afterWorkerSetup.afterWorkerSetup-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
299<li class="tsd-description">
300<div class="tsd-comment tsd-typography"><p>Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes.</p>
301<p>Can be used to update the <code>maxListeners</code> or binding the <code>main-worker</code>&lt;-&gt;<code>worker</code> connection if not bind by default.</p>
302</div>
303<div class="tsd-parameters">
304<h4 class="tsd-parameters-title">Parameters</h4>
305<ul class="tsd-parameter-list">
306<li>
307<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
308<div class="tsd-comment tsd-typography"><p>The newly created worker.</p>
309</div></li></ul></div>
310<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
311<ul>
842d8918 312<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L415">src/pools/abstract-pool.ts:415</a></li></ul></aside></li></ul></section>
6c525543 313<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="beforeTaskExecutionHook" class="tsd-anchor"></a>
314<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span><a href="#beforeTaskExecutionHook" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
315<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
316<li class="tsd-signature tsd-anchor-link" id="beforeTaskExecutionHook.beforeTaskExecutionHook-1">before<wbr/>Task<wbr/>Execution<wbr/>Hook<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
317<li class="tsd-description">
318<div class="tsd-comment tsd-typography"><p>Hook executed before the worker task execution.
319Can be overridden.</p>
320</div>
321<div class="tsd-parameters">
322<h4 class="tsd-parameters-title">Parameters</h4>
323<ul class="tsd-parameter-list">
324<li>
325<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5>
326<div class="tsd-comment tsd-typography"><p>The worker node key.</p>
327</div></li></ul></div>
328<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
329<ul>
842d8918 330<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L316">src/pools/abstract-pool.ts:316</a></li></ul></aside></li></ul></section>
6c525543 331<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="checkAndEmitEvents" class="tsd-anchor"></a>
332<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>check<wbr/>And<wbr/>Emit<wbr/>Events</span><a href="#checkAndEmitEvents" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
333<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
334<li class="tsd-signature tsd-anchor-link" id="checkAndEmitEvents.checkAndEmitEvents-1">check<wbr/>And<wbr/>Emit<wbr/>Events<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="#checkAndEmitEvents.checkAndEmitEvents-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
335<li class="tsd-description">
336<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
337<ul>
842d8918 338<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L473">src/pools/abstract-pool.ts:473</a></li></ul></aside></li></ul></section>
6c525543 339<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="checkFilePath" class="tsd-anchor"></a>
340<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>check<wbr/>File<wbr/>Path</span><a href="#checkFilePath" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
341<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
342<li class="tsd-signature tsd-anchor-link" id="checkFilePath.checkFilePath-1">check<wbr/>File<wbr/>Path<span class="tsd-signature-symbol">(</span>filePath<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-type">void</span><a href="#checkFilePath.checkFilePath-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
343<li class="tsd-description">
344<div class="tsd-parameters">
345<h4 class="tsd-parameters-title">Parameters</h4>
346<ul class="tsd-parameter-list">
347<li>
348<h5>filePath: <span class="tsd-signature-type">string</span></h5></li></ul></div>
349<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
350<ul>
842d8918 351<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L111">src/pools/abstract-pool.ts:111</a></li></ul></aside></li></ul></section>
6c525543 352<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="checkNumberOfWorkers" class="tsd-anchor"></a>
353<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>check<wbr/>Number<wbr/>Of<wbr/>Workers</span><a href="#checkNumberOfWorkers" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
354<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
355<li class="tsd-signature tsd-anchor-link" id="checkNumberOfWorkers.checkNumberOfWorkers-1">check<wbr/>Number<wbr/>Of<wbr/>Workers<span class="tsd-signature-symbol">(</span>numberOfWorkers<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#checkNumberOfWorkers.checkNumberOfWorkers-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
356<li class="tsd-description">
357<div class="tsd-parameters">
358<h4 class="tsd-parameters-title">Parameters</h4>
359<ul class="tsd-parameter-list">
360<li>
361<h5>numberOfWorkers: <span class="tsd-signature-type">number</span></h5></li></ul></div>
362<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
363<ul>
842d8918 364<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L120">src/pools/abstract-pool.ts:120</a></li></ul></aside></li></ul></section>
6c525543 365<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="checkPoolOptions" class="tsd-anchor"></a>
366<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>check<wbr/>Pool<wbr/>Options</span><a href="#checkPoolOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
367<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
368<li class="tsd-signature tsd-anchor-link" id="checkPoolOptions.checkPoolOptions-1">check<wbr/>Pool<wbr/>Options<span class="tsd-signature-symbol">(</span>opts<span class="tsd-signature-symbol">: </span><a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#checkPoolOptions.checkPoolOptions-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
369<li class="tsd-description">
370<div class="tsd-parameters">
371<h4 class="tsd-parameters-title">Parameters</h4>
372<ul class="tsd-parameter-list">
373<li>
374<h5>opts: <a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-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></h5></li></ul></div>
375<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
376<ul>
842d8918 377<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L138">src/pools/abstract-pool.ts:138</a></li></ul></aside></li></ul></section>
6c525543 378<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="checkValidWorkerChoiceStrategy" class="tsd-anchor"></a>
379<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>check<wbr/>Valid<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span><a href="#checkValidWorkerChoiceStrategy" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
380<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
381<li class="tsd-signature tsd-anchor-link" id="checkValidWorkerChoiceStrategy.checkValidWorkerChoiceStrategy-1">check<wbr/>Valid<wbr/>Worker<wbr/>Choice<wbr/>Strategy<span class="tsd-signature-symbol">(</span>workerChoiceStrategy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#checkValidWorkerChoiceStrategy.checkValidWorkerChoiceStrategy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
382<li class="tsd-description">
383<div class="tsd-parameters">
384<h4 class="tsd-parameters-title">Parameters</h4>
385<ul class="tsd-parameter-list">
386<li>
387<h5>workerChoiceStrategy: <span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span></h5></li></ul></div>
388<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
389<ul>
842d8918 390<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L160">src/pools/abstract-pool.ts:160</a></li></ul></aside></li></ul></section>
6c525543 391<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="chooseWorkerNode" class="tsd-anchor"></a>
392<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>choose<wbr/>Worker<wbr/>Node</span><a href="#chooseWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
393<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
394<li class="tsd-signature tsd-anchor-link" id="chooseWorkerNode.chooseWorkerNode-1">choose<wbr/>Worker<wbr/>Node<span class="tsd-signature-symbol">(</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><span class="tsd-signature-symbol">, </span><a href="../interfaces/WorkerNode.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">]</span><a href="#chooseWorkerNode.chooseWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
395<li class="tsd-description">
396<div class="tsd-comment tsd-typography"><p>Chooses a worker node for the next task.</p>
397<p>The default uses a round robin algorithm to distribute the load.</p>
398
399<h3>Returns</h3><p>[worker node key, worker node].</p>
400</div>
401<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/WorkerNode.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">]</span></h4><aside class="tsd-sources">
402<ul>
842d8918 403<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L360">src/pools/abstract-pool.ts:360</a></li></ul></aside></li></ul></section>
6c525543 404<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="createAndSetupWorker" class="tsd-anchor"></a>
405<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>create<wbr/>And<wbr/>Setup<wbr/>Worker</span><a href="#createAndSetupWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
406<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
407<li class="tsd-signature tsd-anchor-link" id="createAndSetupWorker.createAndSetupWorker-1">create<wbr/>And<wbr/>Setup<wbr/>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><a href="#createAndSetupWorker.createAndSetupWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
408<li class="tsd-description">
409<div class="tsd-comment tsd-typography"><p>Creates a new worker and sets it up completely in the pool worker nodes.</p>
410
411<h3>Returns</h3><p>New, completely set up worker.</p>
412</div>
413<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Worker</span></h4><aside class="tsd-sources">
414<ul>
842d8918 415<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L422">src/pools/abstract-pool.ts:422</a></li></ul></aside></li></ul></section>
6c525543 416<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="createWorker" class="tsd-anchor"></a>
417<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagAbstract">Abstract</code> <span>create<wbr/>Worker</span><a href="#createWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
418<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
419<li class="tsd-signature tsd-anchor-link" id="createWorker.createWorker-1">create<wbr/>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><a href="#createWorker.createWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
420<li class="tsd-description">
421<div class="tsd-comment tsd-typography"><p>Returns a newly created worker.</p>
422</div>
423<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Worker</span></h4><aside class="tsd-sources">
424<ul>
842d8918 425<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L406">src/pools/abstract-pool.ts:406</a></li></ul></aside></li></ul></section>
6c525543 426<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="dequeueTask" class="tsd-anchor"></a>
427<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>dequeue<wbr/>Task</span><a href="#dequeueTask" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
428<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
d49303bc 429<li class="tsd-signature tsd-anchor-link" id="dequeueTask.dequeueTask-1">dequeue<wbr/>Task<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</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/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><a href="#dequeueTask.dequeueTask-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
6c525543 430<li class="tsd-description">
431<div class="tsd-parameters">
432<h4 class="tsd-parameters-title">Parameters</h4>
433<ul class="tsd-parameter-list">
434<li>
435<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5></li></ul></div>
d49303bc 436<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
6c525543 437<ul>
842d8918 438<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L574">src/pools/abstract-pool.ts:574</a></li></ul></aside></li></ul></section>
6c525543 439<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="destroy" class="tsd-anchor"></a>
440<h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
441<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
442<li class="tsd-signature tsd-anchor-link" id="destroy.destroy-1">destroy<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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
443<li class="tsd-description">
444<div class="tsd-comment tsd-typography"><p>Shutdowns every current worker in this pool.</p>
445</div>
446<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><aside class="tsd-sources">
447<p>Implementation of IPool.destroy</p>
448<ul>
842d8918 449<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L279">src/pools/abstract-pool.ts:279</a></li></ul></aside></li></ul></section>
6c525543 450<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="destroyWorker" class="tsd-anchor"></a>
451<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagAbstract">Abstract</code> <span>destroy<wbr/>Worker</span><a href="#destroyWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
452<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
453<li class="tsd-signature tsd-anchor-link" id="destroyWorker.destroyWorker-1">destroy<wbr/>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</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="#destroyWorker.destroyWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
454<li class="tsd-description">
455<div class="tsd-comment tsd-typography"><p>Shutdowns the given worker.</p>
456</div>
457<div class="tsd-parameters">
458<h4 class="tsd-parameters-title">Parameters</h4>
459<ul class="tsd-parameter-list">
460<li>
461<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
462<div class="tsd-comment tsd-typography"><p>A worker within <code>workerNodes</code>.</p>
463</div></li></ul></div>
464<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</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></h4><aside class="tsd-sources">
465<ul>
842d8918 466<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L293">src/pools/abstract-pool.ts:293</a></li></ul></aside></li></ul></section>
6c525543 467<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="enqueueTask" class="tsd-anchor"></a>
468<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>enqueue<wbr/>Task</span><a href="#enqueueTask" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
469<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
d49303bc 470<li class="tsd-signature tsd-anchor-link" id="enqueueTask.enqueueTask-1">enqueue<wbr/>Task<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, task<span class="tsd-signature-symbol">: </span><a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#enqueueTask.enqueueTask-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
6c525543 471<li class="tsd-description">
472<div class="tsd-parameters">
473<h4 class="tsd-parameters-title">Parameters</h4>
474<ul class="tsd-parameter-list">
475<li>
476<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5></li>
477<li>
d49303bc 478<h5>task: <a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
6c525543 479<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
480<ul>
842d8918 481<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L570">src/pools/abstract-pool.ts:570</a></li></ul></aside></li></ul></section>
6c525543 482<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="execute" class="tsd-anchor"></a>
483<h3 class="tsd-anchor-link"><span>execute</span><a href="#execute" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
484<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
485<li class="tsd-signature tsd-anchor-link" id="execute.execute-1">execute<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Data</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">Response</span><span class="tsd-signature-symbol">&gt;</span><a href="#execute.execute-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
486<li class="tsd-description">
487<div class="tsd-comment tsd-typography"><p>Performs the task specified in the constructor with the data parameter.</p>
488
489<h3>Returns</h3><p>Promise that will be resolved when the task is successfully completed.</p>
490</div>
491<div class="tsd-parameters">
492<h4 class="tsd-parameters-title">Parameters</h4>
493<ul class="tsd-parameter-list">
494<li>
495<h5>data: <span class="tsd-signature-type">Data</span></h5>
496<div class="tsd-comment tsd-typography"><p>The input for the specified task. This can only be serializable data.</p>
497</div></li></ul></div>
498<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">Response</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
499<p>Implementation of IPool.execute</p>
500<ul>
842d8918 501<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L248">src/pools/abstract-pool.ts:248</a></li></ul></aside></li></ul></section>
6c525543 502<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="executeTask" class="tsd-anchor"></a>
503<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>execute<wbr/>Task</span><a href="#executeTask" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
504<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
d49303bc 505<li class="tsd-signature tsd-anchor-link" id="executeTask.executeTask-1">execute<wbr/>Task<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, task<span class="tsd-signature-symbol">: </span><a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#executeTask.executeTask-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
6c525543 506<li class="tsd-description">
507<div class="tsd-parameters">
508<h4 class="tsd-parameters-title">Parameters</h4>
509<ul class="tsd-parameter-list">
510<li>
511<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5></li>
512<li>
d49303bc 513<h5>task: <a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
6c525543 514<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
515<ul>
842d8918 516<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L565">src/pools/abstract-pool.ts:565</a></li></ul></aside></li></ul></section>
6c525543 517<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="findFreeWorkerNodeKey" class="tsd-anchor"></a>
518<h3 class="tsd-anchor-link"><span>find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key</span><a href="#findFreeWorkerNodeKey" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
519<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
520<li class="tsd-signature tsd-anchor-link" id="findFreeWorkerNodeKey.findFreeWorkerNodeKey-1">find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key<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="#findFreeWorkerNodeKey.findFreeWorkerNodeKey-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
521<li class="tsd-description">
522<div class="tsd-comment tsd-typography"><p>Finds a free worker node key based on the number of tasks the worker has applied.</p>
523<p>If a worker is found with <code>0</code> running tasks, it is detected as free and its worker node key is returned.</p>
524<p>If no free worker is found, <code>-1</code> is returned.</p>
525
526<h3>Returns</h3><p>A worker node key if there is one, <code>-1</code> otherwise.</p>
527</div>
528<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
529<p>Implementation of IPool.findFreeWorkerNodeKey</p>
530<ul>
842d8918 531<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L241">src/pools/abstract-pool.ts:241</a></li></ul></aside></li></ul></section>
6c525543 532<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="flushTasksQueue" class="tsd-anchor"></a>
533<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>flush<wbr/>Tasks<wbr/>Queue</span><a href="#flushTasksQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
534<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
535<li class="tsd-signature tsd-anchor-link" id="flushTasksQueue.flushTasksQueue-1">flush<wbr/>Tasks<wbr/>Queue<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#flushTasksQueue.flushTasksQueue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
536<li class="tsd-description">
537<div class="tsd-parameters">
538<h4 class="tsd-parameters-title">Parameters</h4>
539<ul class="tsd-parameter-list">
540<li>
541<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5></li></ul></div>
542<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
543<ul>
842d8918 544<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L582">src/pools/abstract-pool.ts:582</a></li></ul></aside></li></ul></section>
6c525543 545<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="flushTasksQueueByWorker" class="tsd-anchor"></a>
546<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>flush<wbr/>Tasks<wbr/>Queue<wbr/>By<wbr/>Worker</span><a href="#flushTasksQueueByWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
547<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
548<li class="tsd-signature tsd-anchor-link" id="flushTasksQueueByWorker.flushTasksQueueByWorker-1">flush<wbr/>Tasks<wbr/>Queue<wbr/>By<wbr/>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#flushTasksQueueByWorker.flushTasksQueueByWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
549<li class="tsd-description">
550<div class="tsd-parameters">
551<h4 class="tsd-parameters-title">Parameters</h4>
552<ul class="tsd-parameter-list">
553<li>
554<h5>worker: <span class="tsd-signature-type">Worker</span></h5></li></ul></div>
555<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
556<ul>
842d8918 557<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L590">src/pools/abstract-pool.ts:590</a></li></ul></aside></li></ul></section>
6c525543 558<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="getWorkerNodeKey" class="tsd-anchor"></a>
559<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>get<wbr/>Worker<wbr/>Node<wbr/>Key</span><a href="#getWorkerNodeKey" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
560<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
561<li class="tsd-signature tsd-anchor-link" id="getWorkerNodeKey.getWorkerNodeKey-1">get<wbr/>Worker<wbr/>Node<wbr/>Key<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getWorkerNodeKey.getWorkerNodeKey-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
562<li class="tsd-description">
563<div class="tsd-comment tsd-typography"><p>Gets the given worker its worker node key.</p>
564
565<h3>Returns</h3><p>The worker node key if the worker is found in the pool worker nodes, <code>-1</code> otherwise.</p>
566</div>
567<div class="tsd-parameters">
568<h4 class="tsd-parameters-title">Parameters</h4>
569<ul class="tsd-parameter-list">
570<li>
571<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
572<div class="tsd-comment tsd-typography"><p>The worker.</p>
573</div></li></ul></div>
574<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
575<ul>
842d8918 576<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L202">src/pools/abstract-pool.ts:202</a></li></ul></aside></li></ul></section>
6c525543 577<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="getWorkerTasksUsage" class="tsd-anchor"></a>
578<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>get<wbr/>Worker<wbr/>Tasks<wbr/>Usage</span><a href="#getWorkerTasksUsage" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
579<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
d49303bc 580<li class="tsd-signature tsd-anchor-link" id="getWorkerTasksUsage.getWorkerTasksUsage-1">get<wbr/>Worker<wbr/>Tasks<wbr/>Usage<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</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/TasksUsage.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksUsage</a><a href="#getWorkerTasksUsage.getWorkerTasksUsage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
6c525543 581<li class="tsd-description">
582<div class="tsd-comment tsd-typography"><p>Gets the given worker its tasks usage in the pool.</p>
583
584<h3>Returns</h3><p>The worker tasks usage.</p>
585</div>
586<div class="tsd-parameters">
587<h4 class="tsd-parameters-title">Parameters</h4>
588<ul class="tsd-parameter-list">
589<li>
590<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
591<div class="tsd-comment tsd-typography"><p>The worker.</p>
592</div></li></ul></div>
d49303bc 593<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/TasksUsage.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksUsage</a></h4><aside class="tsd-sources">
6c525543 594<ul>
842d8918 595<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L503">src/pools/abstract-pool.ts:503</a></li></ul></aside></li></ul></section>
6c525543 596<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="internalBusy" class="tsd-anchor"></a>
597<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>internal<wbr/>Busy</span><a href="#internalBusy" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
598<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
599<li class="tsd-signature tsd-anchor-link" id="internalBusy.internalBusy-1">internal<wbr/>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><a href="#internalBusy.internalBusy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
600<li class="tsd-description">
601<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
602<ul>
842d8918 603<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L236">src/pools/abstract-pool.ts:236</a></li></ul></aside></li></ul></section>
6c525543 604<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="isMain" class="tsd-anchor"></a>
605<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagAbstract">Abstract</code> <span>is<wbr/>Main</span><a href="#isMain" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
606<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
607<li class="tsd-signature tsd-anchor-link" id="isMain.isMain-1">is<wbr/>Main<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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
608<li class="tsd-description">
609<div class="tsd-comment tsd-typography"><p>Should return whether the worker is the main worker or not.</p>
610</div>
611<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
612<ul>
842d8918 613<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L308">src/pools/abstract-pool.ts:308</a></li></ul></aside></li></ul></section>
6c525543 614<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="pushWorkerNode" class="tsd-anchor"></a>
615<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>push<wbr/>Worker<wbr/>Node</span><a href="#pushWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
616<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
617<li class="tsd-signature tsd-anchor-link" id="pushWorkerNode.pushWorkerNode-1">push<wbr/>Worker<wbr/>Node<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#pushWorkerNode.pushWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
618<li class="tsd-description">
619<div class="tsd-comment tsd-typography"><p>Pushes the given worker in the pool worker nodes.</p>
620
621<h3>Returns</h3><p>The worker nodes length.</p>
622</div>
623<div class="tsd-parameters">
624<h4 class="tsd-parameters-title">Parameters</h4>
625<ul class="tsd-parameter-list">
626<li>
627<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
628<div class="tsd-comment tsd-typography"><p>The worker.</p>
629</div></li></ul></div>
630<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
631<ul>
842d8918 632<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L517">src/pools/abstract-pool.ts:517</a></li></ul></aside></li></ul></section>
6c525543 633<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="registerWorkerMessageListener" class="tsd-anchor"></a>
634<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagAbstract">Abstract</code> <span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#registerWorkerMessageListener" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
635<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
636<li class="tsd-signature tsd-anchor-link" id="registerWorkerMessageListener.registerWorkerMessageListener-1">register<wbr/>Worker<wbr/>Message<wbr/>Listener<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Message</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><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 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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
637<li class="tsd-description">
638<div class="tsd-comment tsd-typography"><p>Registers a listener callback on the given worker.</p>
639</div>
640<section class="tsd-panel tsd-type-parameters">
641<h4>Type Parameters</h4>
642<ul class="tsd-type-parameters">
643<li>
644<h4>Message</h4></li></ul></section>
645<div class="tsd-parameters">
646<h4 class="tsd-parameters-title">Parameters</h4>
647<ul class="tsd-parameter-list">
648<li>
649<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
650<div class="tsd-comment tsd-typography"><p>The worker which should register a listener.</p>
651</div></li>
652<li>
653<h5>listener: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><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></h5>
654<div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
655</div>
656<ul class="tsd-parameters">
657<li class="tsd-parameter-signature">
658<ul class="tsd-signatures tsd-kind-type-literal">
659<li class="tsd-signature"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><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">: </span><span class="tsd-signature-type">void</span></li>
660<li class="tsd-description">
661<div class="tsd-parameters">
662<h4 class="tsd-parameters-title">Parameters</h4>
663<ul class="tsd-parameter-list">
664<li>
665<h5>message: <a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
666<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div>
667<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
668<ul>
842d8918 669<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L399">src/pools/abstract-pool.ts:399</a></li></ul></aside></li></ul></section>
6c525543 670<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="removeWorkerNode" class="tsd-anchor"></a>
671<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>remove<wbr/>Worker<wbr/>Node</span><a href="#removeWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
672<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
673<li class="tsd-signature tsd-anchor-link" id="removeWorkerNode.removeWorkerNode-1">remove<wbr/>Worker<wbr/>Node<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#removeWorkerNode.removeWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
674<li class="tsd-description">
675<div class="tsd-comment tsd-typography"><p>Removes the given worker from the pool worker nodes.</p>
676</div>
677<div class="tsd-parameters">
678<h4 class="tsd-parameters-title">Parameters</h4>
679<ul class="tsd-parameter-list">
680<li>
681<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
682<div class="tsd-comment tsd-typography"><p>The worker.</p>
683</div></li></ul></div>
684<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
685<ul>
842d8918 686<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L559">src/pools/abstract-pool.ts:559</a></li></ul></aside></li></ul></section>
6c525543 687<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="sendToWorker" class="tsd-anchor"></a>
688<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagAbstract">Abstract</code> <span>send<wbr/>To<wbr/>Worker</span><a href="#sendToWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
689<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
690<li class="tsd-signature tsd-anchor-link" id="sendToWorker.sendToWorker-1">send<wbr/>To<wbr/>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span>, message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><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">: </span><span class="tsd-signature-type">void</span><a href="#sendToWorker.sendToWorker-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
691<li class="tsd-description">
692<div class="tsd-comment tsd-typography"><p>Sends a message to the given worker.</p>
693</div>
694<div class="tsd-parameters">
695<h4 class="tsd-parameters-title">Parameters</h4>
696<ul class="tsd-parameter-list">
697<li>
698<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
699<div class="tsd-comment tsd-typography"><p>The worker which should receive the message.</p>
700</div></li>
701<li>
702<h5>message: <a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
703<div class="tsd-comment tsd-typography"><p>The message.</p>
704</div></li></ul></div>
705<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
706<ul>
842d8918 707<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L388">src/pools/abstract-pool.ts:388</a></li></ul></aside></li></ul></section>
6c525543 708<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setWorkerChoiceStrategy" class="tsd-anchor"></a>
709<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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
710<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
711<li class="tsd-signature tsd-anchor-link" id="setWorkerChoiceStrategy.setWorkerChoiceStrategy-1">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<span class="tsd-signature-symbol">(</span>workerChoiceStrategy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
712<li class="tsd-description">
713<div class="tsd-comment tsd-typography"><p>Sets the worker choice strategy in this pool.</p>
714</div>
715<div class="tsd-parameters">
716<h4 class="tsd-parameters-title">Parameters</h4>
717<ul class="tsd-parameter-list">
718<li>
719<h5>workerChoiceStrategy: <span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span></h5>
720<div class="tsd-comment tsd-typography"><p>The worker choice strategy.</p>
721</div></li></ul></div>
722<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
723<p>Implementation of IPool.setWorkerChoiceStrategy</p>
724<ul>
842d8918 725<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L209">src/pools/abstract-pool.ts:209</a></li></ul></aside></li></ul></section>
6c525543 726<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="setWorkerNode" class="tsd-anchor"></a>
727<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>set<wbr/>Worker<wbr/>Node</span><a href="#setWorkerNode" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
728<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
d49303bc 729<li class="tsd-signature tsd-anchor-link" id="setWorkerNode.setWorkerNode-1">set<wbr/>Worker<wbr/>Node<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span>, tasksUsage<span class="tsd-signature-symbol">: </span><a href="../interfaces/TasksUsage.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksUsage</a>, tasksQueue<span class="tsd-signature-symbol">: </span><a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</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="#setWorkerNode.setWorkerNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
6c525543 730<li class="tsd-description">
731<div class="tsd-comment tsd-typography"><p>Sets the given worker in the pool worker nodes.</p>
732</div>
733<div class="tsd-parameters">
734<h4 class="tsd-parameters-title">Parameters</h4>
735<ul class="tsd-parameter-list">
736<li>
737<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5>
738<div class="tsd-comment tsd-typography"><p>The worker node key.</p>
739</div></li>
740<li>
741<h5>worker: <span class="tsd-signature-type">Worker</span></h5>
742<div class="tsd-comment tsd-typography"><p>The worker.</p>
743</div></li>
744<li>
d49303bc 745<h5>tasksUsage: <a href="../interfaces/TasksUsage.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksUsage</a></h5>
6c525543 746<div class="tsd-comment tsd-typography"><p>The worker tasks usage.</p>
747</div></li>
748<li>
d49303bc 749<h5>tasksQueue: <a href="../interfaces/Task.html" class="tsd-signature-type" data-tsd-kind="Interface">Task</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h5>
6c525543 750<div class="tsd-comment tsd-typography"><p>The worker task queue.</p>
751</div></li></ul></div>
752<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
753<ul>
842d8918 754<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L541">src/pools/abstract-pool.ts:541</a></li></ul></aside></li></ul></section>
6c525543 755<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="setWorkerNodeTasksUsage" class="tsd-anchor"></a>
756<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>set<wbr/>Worker<wbr/>Node<wbr/>Tasks<wbr/>Usage</span><a href="#setWorkerNodeTasksUsage" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
757<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
d49303bc 758<li class="tsd-signature tsd-anchor-link" id="setWorkerNodeTasksUsage.setWorkerNodeTasksUsage-1">set<wbr/>Worker<wbr/>Node<wbr/>Tasks<wbr/>Usage<span class="tsd-signature-symbol">(</span>workerNode<span class="tsd-signature-symbol">: </span><a href="../interfaces/WorkerNode.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span>, tasksUsage<span class="tsd-signature-symbol">: </span><a href="../interfaces/TasksUsage.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksUsage</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setWorkerNodeTasksUsage.setWorkerNodeTasksUsage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
6c525543 759<li class="tsd-description">
760<div class="tsd-comment tsd-typography"><p>Sets the given worker node its tasks usage in the pool.</p>
761</div>
762<div class="tsd-parameters">
763<h4 class="tsd-parameters-title">Parameters</h4>
764<ul class="tsd-parameter-list">
765<li>
766<h5>workerNode: <a href="../interfaces/WorkerNode.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span></h5>
767<div class="tsd-comment tsd-typography"><p>The worker node.</p>
768</div></li>
769<li>
d49303bc 770<h5>tasksUsage: <a href="../interfaces/TasksUsage.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksUsage</a></h5>
6c525543 771<div class="tsd-comment tsd-typography"><p>The worker node tasks usage.</p>
772</div></li></ul></div>
773<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
774<ul>
842d8918 775<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L490">src/pools/abstract-pool.ts:490</a></li></ul></aside></li></ul></section>
6c525543 776<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="setupHook" class="tsd-anchor"></a>
777<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>setup<wbr/>Hook</span><a href="#setupHook" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
778<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
779<li class="tsd-signature tsd-anchor-link" id="setupHook.setupHook-1">setup<wbr/>Hook<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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
780<li class="tsd-description">
781<div class="tsd-comment tsd-typography"><p>Setup hook to execute code before worker node are created in the abstract constructor.
782Can be overridden</p>
783</div>
784<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
785<ul>
842d8918 786<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L301">src/pools/abstract-pool.ts:301</a></li></ul></aside></li></ul></section>
6c525543 787<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="tasksQueueSize" class="tsd-anchor"></a>
788<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>tasks<wbr/>Queue<wbr/>Size</span><a href="#tasksQueueSize" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
789<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
790<li class="tsd-signature tsd-anchor-link" id="tasksQueueSize.tasksQueueSize-1">tasks<wbr/>Queue<wbr/>Size<span class="tsd-signature-symbol">(</span>workerNodeKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#tasksQueueSize.tasksQueueSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
791<li class="tsd-description">
792<div class="tsd-parameters">
793<h4 class="tsd-parameters-title">Parameters</h4>
794<ul class="tsd-parameter-list">
795<li>
796<h5>workerNodeKey: <span class="tsd-signature-type">number</span></h5></li></ul></div>
797<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
798<ul>
842d8918 799<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L578">src/pools/abstract-pool.ts:578</a></li></ul></aside></li></ul></section>
6c525543 800<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="workerListener" class="tsd-anchor"></a>
801<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>worker<wbr/>Listener</span><a href="#workerListener" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
802<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
803<li class="tsd-signature tsd-anchor-link" id="workerListener.workerListener-1">worker<wbr/>Listener<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><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><a href="#workerListener.workerListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
804<li class="tsd-description">
805<div class="tsd-comment tsd-typography"><p>This function is the listener registered for each worker message.</p>
806
807<h3>Returns</h3><p>The listener function to execute when a message is received from a worker.</p>
808</div>
809<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><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></h4>
810<ul class="tsd-parameters">
811<li class="tsd-parameter-signature">
812<ul class="tsd-signatures tsd-kind-type-literal">
813<li class="tsd-signature" id="workerListener.workerListener-1.__type.__type-1"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><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">: </span><span class="tsd-signature-type">void</span></li>
814<li class="tsd-description">
815<div class="tsd-comment tsd-typography"><p>This function is the listener registered for each worker message.</p>
816
817<h3>Returns</h3><p>The listener function to execute when a message is received from a worker.</p>
818</div>
819<div class="tsd-parameters">
820<h4 class="tsd-parameters-title">Parameters</h4>
821<ul class="tsd-parameter-list">
822<li>
823<h5>message: <a href="../interfaces/MessageValue.html" class="tsd-signature-type" data-tsd-kind="Interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
824<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul><aside class="tsd-sources">
825<ul>
842d8918 826<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e7339cf/src/pools/abstract-pool.ts#L445">src/pools/abstract-pool.ts:445</a></li></ul></aside></li></ul></section></section></div>
6c525543 827<div class="col-sidebar">
828<div class="page-menu">
829<div class="tsd-navigation settings">
830<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
831<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
832<div class="tsd-accordion-details">
833<div class="tsd-filter-visibility">
834<h4 class="uppercase">Member Visibility</h4><form>
835<ul id="tsd-filter-options">
836<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>
837<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><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>Private</span></label></li>
838<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>
839<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></form></div>
840<div class="tsd-theme-toggle">
841<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
842<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
843<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
844<div class="tsd-accordion-details">
845<ul>
846<li><a href="#constructor" class="tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
847<li><a href="#emitter" class="tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>emitter</span></a></li>
848<li><a href="#filePath" class="tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>file<wbr/>Path</span></a></li>
849<li><a href="#numberOfWorkers" class="tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>number<wbr/>Of<wbr/>Workers</span></a></li>
850<li><a href="#opts" class="tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>opts</span></a></li>
851<li><a href="#promiseResponseMap" class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>promise<wbr/>Response<wbr/>Map</span></a></li>
852<li><a href="#workerChoiceStrategyContext" class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</span></a></li>
853<li><a href="#workerNodes" class="tsd-kind-property tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>worker<wbr/>Nodes</span></a></li>
854<li><a href="#busy" class="tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>busy</span></a></li>
855<li><a href="#full" class="tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>full</span></a></li>
856<li><a href="#numberOfQueuedTasks" class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>number<wbr/>Of<wbr/>Queued<wbr/>Tasks</span></a></li>
857<li><a href="#numberOfRunningTasks" class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>number<wbr/>Of<wbr/>Running<wbr/>Tasks</span></a></li>
858<li><a href="#type" class="tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>type</span></a></li>
859<li><a href="#afterTaskExecutionHook" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a></li>
860<li><a href="#afterWorkerSetup" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>after<wbr/>Worker<wbr/>Setup</span></a></li>
861<li><a href="#beforeTaskExecutionHook" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a></li>
862<li><a href="#checkAndEmitEvents" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>And<wbr/>Emit<wbr/>Events</span></a></li>
863<li><a href="#checkFilePath" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>File<wbr/>Path</span></a></li>
864<li><a href="#checkNumberOfWorkers" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Number<wbr/>Of<wbr/>Workers</span></a></li>
865<li><a href="#checkPoolOptions" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Pool<wbr/>Options</span></a></li>
866<li><a href="#checkValidWorkerChoiceStrategy" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Valid<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a></li>
867<li><a href="#chooseWorkerNode" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>choose<wbr/>Worker<wbr/>Node</span></a></li>
868<li><a href="#createAndSetupWorker" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Worker</span></a></li>
869<li><a href="#createWorker" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>Worker</span></a></li>
870<li><a href="#dequeueTask" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>dequeue<wbr/>Task</span></a></li>
871<li><a href="#destroy" class="tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>destroy</span></a></li>
872<li><a href="#destroyWorker" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>destroy<wbr/>Worker</span></a></li>
873<li><a href="#enqueueTask" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>enqueue<wbr/>Task</span></a></li>
874<li><a href="#execute" class="tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>execute</span></a></li>
875<li><a href="#executeTask" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>execute<wbr/>Task</span></a></li>
876<li><a href="#findFreeWorkerNodeKey" class="tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key</span></a></li>
877<li><a href="#flushTasksQueue" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue</span></a></li>
878<li><a href="#flushTasksQueueByWorker" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue<wbr/>By<wbr/>Worker</span></a></li>
879<li><a href="#getWorkerNodeKey" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Worker<wbr/>Node<wbr/>Key</span></a></li>
880<li><a href="#getWorkerTasksUsage" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Worker<wbr/>Tasks<wbr/>Usage</span></a></li>
881<li><a href="#internalBusy" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>internal<wbr/>Busy</span></a></li>
882<li><a href="#isMain" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>is<wbr/>Main</span></a></li>
883<li><a href="#pushWorkerNode" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>push<wbr/>Worker<wbr/>Node</span></a></li>
884<li><a href="#registerWorkerMessageListener" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a></li>
885<li><a href="#removeWorkerNode" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>remove<wbr/>Worker<wbr/>Node</span></a></li>
886<li><a href="#sendToWorker" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Worker</span></a></li>
887<li><a href="#setWorkerChoiceStrategy" class="tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a></li>
888<li><a href="#setWorkerNode" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Worker<wbr/>Node</span></a></li>
889<li><a href="#setWorkerNodeTasksUsage" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Worker<wbr/>Node<wbr/>Tasks<wbr/>Usage</span></a></li>
890<li><a href="#setupHook" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>setup<wbr/>Hook</span></a></li>
891<li><a href="#tasksQueueSize" class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>tasks<wbr/>Queue<wbr/>Size</span></a></li>
892<li><a href="#workerListener" class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>worker<wbr/>Listener</span></a></li></ul></div></details></div>
893<div class="site-menu">
894<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>poolifier</span></a>
895<ul class="tsd-small-nested-navigation">
d49303bc 896<li><a href="../enums/PoolType.html" class="tsd-kind-enum"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Pool<wbr/>Type</span></a></li>
6c525543 897<li><a href="AbstractPool.html" class="current tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Abstract<wbr/>Pool</span></a></li>
898<li><a href="AbstractWorker.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Abstract<wbr/>Worker</span></a></li>
842d8918 899<li><a href="CircularArray.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Circular<wbr/>Array</span></a></li>
6c525543 900<li><a href="ClusterWorker.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Cluster<wbr/>Worker</span></a></li>
901<li><a href="DynamicClusterPool.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Dynamic<wbr/>Cluster<wbr/>Pool</span></a></li>
902<li><a href="DynamicThreadPool.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Dynamic<wbr/>Thread<wbr/>Pool</span></a></li>
903<li><a href="FixedClusterPool.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Fixed<wbr/>Cluster<wbr/>Pool</span></a></li>
904<li><a href="FixedThreadPool.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Fixed<wbr/>Thread<wbr/>Pool</span></a></li>
905<li><a href="PoolEmitter.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Pool<wbr/>Emitter</span></a></li>
906<li><a href="ThreadWorker.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Thread<wbr/>Worker</span></a></li>
907<li><a href="WorkerChoiceStrategyContext.html" class="tsd-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</span></a></li>
908<li><a href="../interfaces/ClusterPoolOptions.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Cluster<wbr/>Pool<wbr/>Options</span></a></li>
909<li><a href="../interfaces/IPool.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>IPool</span></a></li>
910<li><a href="../interfaces/IWorker.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>IWorker</span></a></li>
911<li><a href="../interfaces/IWorkerChoiceStrategy.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>IWorker<wbr/>Choice<wbr/>Strategy</span></a></li>
912<li><a href="../interfaces/MessageValue.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Message<wbr/>Value</span></a></li>
913<li><a href="../interfaces/PoolOptions.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Pool<wbr/>Options</span></a></li>
d49303bc 914<li><a href="../interfaces/PromiseResponseWrapper.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Promise<wbr/>Response<wbr/>Wrapper</span></a></li>
915<li><a href="../interfaces/RequiredStatistics.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Required<wbr/>Statistics</span></a></li>
916<li><a href="../interfaces/Task.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Task</span></a></li>
6c525543 917<li><a href="../interfaces/TasksQueueOptions.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Tasks<wbr/>Queue<wbr/>Options</span></a></li>
d49303bc 918<li><a href="../interfaces/TasksUsage.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Tasks<wbr/>Usage</span></a></li>
6c525543 919<li><a href="../interfaces/WorkerChoiceStrategyOptions.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a></li>
920<li><a href="../interfaces/WorkerNode.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Worker<wbr/>Node</span></a></li>
921<li><a href="../interfaces/WorkerOptions.html" class="tsd-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Worker<wbr/>Options</span></a></li>
922<li><a href="../types/Draft.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Draft</span></a></li>
923<li><a href="../types/ErrorHandler.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Error<wbr/>Handler</span></a></li>
924<li><a href="../types/ExitHandler.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Exit<wbr/>Handler</span></a></li>
925<li><a href="../types/KillBehavior.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Kill<wbr/>Behavior</span></a></li>
926<li><a href="../types/MessageHandler.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Message<wbr/>Handler</span></a></li>
927<li><a href="../types/OnlineHandler.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Online<wbr/>Handler</span></a></li>
928<li><a href="../types/PoolEvent.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Pool<wbr/>Event</span></a></li>
929<li><a href="../types/ThreadWorkerWithMessageChannel.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Thread<wbr/>Worker<wbr/>With<wbr/>Message<wbr/>Channel</span></a></li>
930<li><a href="../types/WorkerChoiceStrategy.html" class="tsd-kind-type-alias"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategy</span></a></li>
931<li><a href="../variables/KillBehaviors.html" class="tsd-kind-variable"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg><span>Kill<wbr/>Behaviors</span></a></li>
932<li><a href="../variables/PoolEvents.html" class="tsd-kind-variable"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg><span>Pool<wbr/>Events</span></a></li>
933<li><a href="../variables/WorkerChoiceStrategies.html" class="tsd-kind-variable"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategies</span></a></li></ul></nav></div></div></div>
934<div class="tsd-generator">
935<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
936<div class="overlay"></div></body></html>