Commit | Line | Data |
---|---|---|
5ea22628 JB |
1 | <!doctype html> |
2 | <html class="default no-js"> | |
3 | <head> | |
4 | <meta charset="utf-8"> | |
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
6 | <title>FixedClusterPool | poolifier</title> | |
7 | <meta name="description" content="Documentation for poolifier"> | |
8 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
9 | <link rel="stylesheet" href="../assets/css/main.css"> | |
10 | <script async src="../assets/js/search.js" id="search-script"></script> | |
11 | </head> | |
12 | <body> | |
13 | <header> | |
14 | <div class="tsd-page-toolbar"> | |
15 | <div class="container"> | |
16 | <div class="table-wrap"> | |
17 | <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> | |
18 | <div class="field"> | |
19 | <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> | |
20 | <input id="tsd-search-field" type="text" /> | |
21 | </div> | |
22 | <ul class="results"> | |
23 | <li class="state loading">Preparing search index...</li> | |
24 | <li class="state failure">The search index is not available</li> | |
25 | </ul> | |
26 | <a href="../index.html" class="title">poolifier</a> | |
27 | </div> | |
28 | <div class="table-cell" id="tsd-widgets"> | |
29 | <div id="tsd-filter"> | |
30 | <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> | |
31 | <div class="tsd-filter-group"> | |
32 | <div class="tsd-select" id="tsd-filter-visibility"> | |
33 | <span class="tsd-select-label">All</span> | |
34 | <ul class="tsd-select-list"> | |
35 | <li data-value="public">Public</li> | |
36 | <li data-value="protected">Public/Protected</li> | |
37 | <li data-value="private" class="selected">All</li> | |
38 | </ul> | |
39 | </div> | |
40 | <input type="checkbox" id="tsd-filter-inherited" checked /> | |
41 | <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> | |
42 | <input type="checkbox" id="tsd-filter-externals" checked /> | |
43 | <label class="tsd-widget" for="tsd-filter-externals">Externals</label> | |
44 | </div> | |
45 | </div> | |
46 | <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> | |
47 | </div> | |
48 | </div> | |
49 | </div> | |
50 | </div> | |
51 | <div class="tsd-page-title"> | |
52 | <div class="container"> | |
53 | <ul class="tsd-breadcrumb"> | |
54 | <li> | |
55 | <a href="../index.html">poolifier</a> | |
56 | </li> | |
57 | <li> | |
58 | <a href="fixedclusterpool.html">FixedClusterPool</a> | |
59 | </li> | |
60 | </ul> | |
61 | <h1>Class FixedClusterPool<Data, Response></h1> | |
62 | </div> | |
63 | </div> | |
64 | </header> | |
65 | <div class="container container-main"> | |
66 | <div class="row"> | |
67 | <div class="col-8 col-content"> | |
68 | <section class="tsd-panel tsd-comment"> | |
69 | <div class="tsd-comment tsd-typography"> | |
70 | <div class="lead"> | |
71 | <p>A cluster pool with a fixed number of workers.</p> | |
72 | </div> | |
73 | <p>It is possible to perform tasks in sync or asynchronous mode as you prefer.</p> | |
74 | <p>This pool selects the workers in a round robin fashion.</p> | |
75 | <dl class="tsd-comment-tags"> | |
76 | <dt>author</dt> | |
77 | <dd><p><a href="https://github.com/Shinigami92">Christopher Quadflieg</a></p> | |
78 | </dd> | |
79 | <dt>since</dt> | |
80 | <dd><p>2.0.0</p> | |
81 | </dd> | |
82 | </dl> | |
83 | </div> | |
84 | </section> | |
85 | <section class="tsd-panel tsd-type-parameters"> | |
86 | <h3>Type parameters</h3> | |
87 | <ul class="tsd-type-parameters"> | |
88 | <li> | |
89 | <h4>Data = <span class="tsd-signature-type">unknown</span></h4> | |
90 | <div class="tsd-comment tsd-typography"> | |
91 | <div class="lead"> | |
92 | <p>Type of data sent to the worker. This can only be serializable data.</p> | |
93 | </div> | |
94 | </div> | |
95 | </li> | |
96 | <li> | |
97 | <h4>Response = <span class="tsd-signature-type">unknown</span></h4> | |
98 | <div class="tsd-comment tsd-typography"> | |
99 | <div class="lead"> | |
100 | <p>Type of response of execution. This can only be serializable data.</p> | |
101 | </div> | |
102 | </div> | |
103 | </li> | |
104 | </ul> | |
105 | </section> | |
106 | <section class="tsd-panel tsd-hierarchy"> | |
107 | <h3>Hierarchy</h3> | |
108 | <ul class="tsd-hierarchy"> | |
109 | <li> | |
110 | <span class="tsd-signature-type">AbstractPool</span><span class="tsd-signature-symbol"><</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">></span> | |
111 | <ul class="tsd-hierarchy"> | |
112 | <li> | |
113 | <span class="target">FixedClusterPool</span> | |
114 | <ul class="tsd-hierarchy"> | |
115 | <li> | |
116 | <a href="dynamicclusterpool.html" class="tsd-signature-type" data-tsd-kind="Class">DynamicClusterPool</a> | |
117 | </li> | |
118 | </ul> | |
119 | </li> | |
120 | </ul> | |
121 | </li> | |
122 | </ul> | |
123 | </section> | |
124 | <section class="tsd-panel-group tsd-index-group"> | |
125 | <h2>Index</h2> | |
126 | <section class="tsd-panel tsd-index-panel"> | |
127 | <div class="tsd-index-content"> | |
128 | <section class="tsd-index-section "> | |
129 | <h3>Constructors</h3> | |
130 | <ul class="tsd-index-list"> | |
131 | <li class="tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"><a href="fixedclusterpool.html#constructor" class="tsd-kind-icon">constructor</a></li> | |
132 | </ul> | |
133 | </section> | |
134 | <section class="tsd-index-section "> | |
135 | <h3>Properties</h3> | |
136 | <ul class="tsd-index-list"> | |
137 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#emitter" class="tsd-kind-icon">emitter</a></li> | |
138 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#filepath" class="tsd-kind-icon">file<wbr>Path</a></li> | |
7c0ba920 | 139 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#max" class="tsd-kind-icon">max</a></li> |
5ea22628 JB |
140 | <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#nextmessageid" class="tsd-kind-icon">next<wbr>Message<wbr>Id</a></li> |
141 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#numberofworkers" class="tsd-kind-icon">number<wbr>OfWorkers</a></li> | |
142 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#opts" class="tsd-kind-icon">opts</a></li> | |
143 | <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#promisemap" class="tsd-kind-icon">promise<wbr>Map</a></li> | |
144 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#tasks" class="tsd-kind-icon">tasks</a></li> | |
145 | <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#workerchoicestrategycontext" class="tsd-kind-icon">worker<wbr>Choice<wbr>Strategy<wbr>Context</a></li> | |
146 | <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedclusterpool.html#workers" class="tsd-kind-icon">workers</a></li> | |
147 | </ul> | |
148 | </section> | |
149 | <section class="tsd-index-section "> | |
150 | <h3>Accessors</h3> | |
151 | <ul class="tsd-index-list"> | |
7c0ba920 JB |
152 | <li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="fixedclusterpool.html#busy" class="tsd-kind-icon">busy</a></li> |
153 | <li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="fixedclusterpool.html#numberofrunningtasks" class="tsd-kind-icon">number<wbr>OfRunning<wbr>Tasks</a></li> | |
154 | <li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="fixedclusterpool.html#type" class="tsd-kind-icon">type</a></li> | |
5ea22628 JB |
155 | </ul> |
156 | </section> | |
157 | <section class="tsd-index-section "> | |
158 | <h3>Methods</h3> | |
159 | <ul class="tsd-index-list"> | |
160 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#afterworkersetup" class="tsd-kind-icon">after<wbr>Worker<wbr>Setup</a></li> | |
161 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#chooseworker" class="tsd-kind-icon">choose<wbr>Worker</a></li> | |
162 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#createandsetupworker" class="tsd-kind-icon">create<wbr>And<wbr>Setup<wbr>Worker</a></li> | |
163 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#createworker" class="tsd-kind-icon">create<wbr>Worker</a></li> | |
164 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#decreaseworkerstasks" class="tsd-kind-icon">decrease<wbr>Workers<wbr>Tasks</a></li> | |
165 | <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedclusterpool.html#destroy" class="tsd-kind-icon">destroy</a></li> | |
166 | <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedclusterpool.html#destroyworker" class="tsd-kind-icon">destroy<wbr>Worker</a></li> | |
167 | <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedclusterpool.html#execute" class="tsd-kind-icon">execute</a></li> | |
7c0ba920 | 168 | <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedclusterpool.html#findfreetasksmapentry" class="tsd-kind-icon">find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry</a></li> |
5ea22628 JB |
169 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#increaseworkerstask" class="tsd-kind-icon">increase<wbr>Workers<wbr>Task</a></li> |
170 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#internalexecute" class="tsd-kind-icon">internal<wbr>Execute</a></li> | |
7c0ba920 | 171 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#internalgetbusystatus" class="tsd-kind-icon">internal<wbr>Get<wbr>Busy<wbr>Status</a></li> |
5ea22628 JB |
172 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#ismain" class="tsd-kind-icon">is<wbr>Main</a></li> |
173 | <li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="fixedclusterpool.html#registerworkermessagelistener" class="tsd-kind-icon">register<wbr>Worker<wbr>Message<wbr>Listener</a></li> | |
174 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#removeworker" class="tsd-kind-icon">remove<wbr>Worker</a></li> | |
175 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#sendtoworker" class="tsd-kind-icon">send<wbr>ToWorker</a></li> | |
176 | <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedclusterpool.html#setworkerchoicestrategy" class="tsd-kind-icon">set<wbr>Worker<wbr>Choice<wbr>Strategy</a></li> | |
177 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#setuphook" class="tsd-kind-icon">setup<wbr>Hook</a></li> | |
178 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedclusterpool.html#workerlistener" class="tsd-kind-icon">worker<wbr>Listener</a></li> | |
179 | </ul> | |
180 | </section> | |
181 | </div> | |
182 | </section> | |
183 | </section> | |
184 | <section class="tsd-panel-group tsd-member-group "> | |
185 | <h2>Constructors</h2> | |
186 | <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"> | |
187 | <a name="constructor" class="tsd-anchor"></a> | |
188 | <h3>constructor</h3> | |
189 | <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"> | |
190 | <li class="tsd-signature tsd-kind-icon">new <wbr>Fixed<wbr>Cluster<wbr>Pool<Data, Response><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/clusterpooloptions.html" class="tsd-signature-type" data-tsd-kind="Interface">ClusterPoolOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="fixedclusterpool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedClusterPool</a><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">></span></li> | |
191 | </ul> | |
192 | <ul class="tsd-descriptions"> | |
193 | <li class="tsd-description"> | |
194 | <aside class="tsd-sources"> | |
195 | <ul> | |
849e0547 | 196 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L36">src/pools/cluster/fixed.ts:36</a></li> |
5ea22628 JB |
197 | </ul> |
198 | </aside> | |
199 | <div class="tsd-comment tsd-typography"> | |
200 | <div class="lead"> | |
201 | <p>Constructs a new poolifier fixed cluster pool.</p> | |
202 | </div> | |
203 | </div> | |
204 | <h4 class="tsd-type-parameters-title">Type parameters</h4> | |
205 | <ul class="tsd-type-parameters"> | |
206 | <li> | |
207 | <h4>Data = <span class="tsd-signature-type">unknown</span></h4> | |
208 | </li> | |
209 | <li> | |
210 | <h4>Response = <span class="tsd-signature-type">unknown</span></h4> | |
211 | </li> | |
212 | </ul> | |
213 | <h4 class="tsd-parameters-title">Parameters</h4> | |
214 | <ul class="tsd-parameters"> | |
215 | <li> | |
216 | <h5>numberOfWorkers: <span class="tsd-signature-type">number</span></h5> | |
217 | <div class="tsd-comment tsd-typography"> | |
218 | <p>Number of workers for this pool.</p> | |
219 | </div> | |
220 | </li> | |
221 | <li> | |
222 | <h5>filePath: <span class="tsd-signature-type">string</span></h5> | |
223 | <div class="tsd-comment tsd-typography"> | |
224 | <p>Path to an implementation of a <code>ClusterWorker</code> file, which can be relative or absolute.</p> | |
225 | </div> | |
226 | </li> | |
227 | <li> | |
228 | <h5>opts: <a href="../interfaces/clusterpooloptions.html" class="tsd-signature-type" data-tsd-kind="Interface">ClusterPoolOptions</a><span class="tsd-signature-symbol"> = ...</span></h5> | |
229 | <div class="tsd-comment tsd-typography"> | |
230 | <p>Options for this fixed cluster pool. Default: <code>{}</code></p> | |
231 | </div> | |
232 | </li> | |
233 | </ul> | |
234 | <h4 class="tsd-returns-title">Returns <a href="fixedclusterpool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedClusterPool</a><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">></span></h4> | |
235 | </li> | |
236 | </ul> | |
237 | </section> | |
238 | </section> | |
239 | <section class="tsd-panel-group tsd-member-group "> | |
240 | <h2>Properties</h2> | |
241 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> | |
242 | <a name="emitter" class="tsd-anchor"></a> | |
7c0ba920 JB |
243 | <h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> emitter</h3> |
244 | <div class="tsd-signature tsd-kind-icon">emitter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">PoolEmitter</span></div> | |
5ea22628 JB |
245 | <aside class="tsd-sources"> |
246 | <ul> | |
849e0547 | 247 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L117">src/pools/abstract-pool.ts:117</a></li> |
5ea22628 JB |
248 | </ul> |
249 | </aside> | |
250 | <div class="tsd-comment tsd-typography"> | |
251 | <dl class="tsd-comment-tags"> | |
252 | <dt>inheritdoc</dt> | |
253 | <dd></dd> | |
254 | </dl> | |
255 | </div> | |
256 | </section> | |
257 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> | |
258 | <a name="filepath" class="tsd-anchor"></a> | |
259 | <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> file<wbr>Path</h3> | |
260 | <div class="tsd-signature tsd-kind-icon">file<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> | |
261 | <aside class="tsd-sources"> | |
262 | </aside> | |
263 | </section> | |
7c0ba920 JB |
264 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> |
265 | <a name="max" class="tsd-anchor"></a> | |
266 | <h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> max</h3> | |
267 | <div class="tsd-signature tsd-kind-icon">max<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></div> | |
268 | <aside class="tsd-sources"> | |
269 | <ul> | |
849e0547 | 270 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L120">src/pools/abstract-pool.ts:120</a></li> |
7c0ba920 JB |
271 | </ul> |
272 | </aside> | |
273 | <div class="tsd-comment tsd-typography"> | |
274 | <dl class="tsd-comment-tags"> | |
275 | <dt>inheritdoc</dt> | |
276 | <dd></dd> | |
277 | </dl> | |
278 | </div> | |
279 | </section> | |
5ea22628 JB |
280 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"> |
281 | <a name="nextmessageid" class="tsd-anchor"></a> | |
282 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> next<wbr>Message<wbr>Id</h3> | |
283 | <div class="tsd-signature tsd-kind-icon">next<wbr>Message<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div> | |
284 | <aside class="tsd-sources"> | |
285 | <ul> | |
849e0547 | 286 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L138">src/pools/abstract-pool.ts:138</a></li> |
5ea22628 JB |
287 | </ul> |
288 | </aside> | |
289 | <div class="tsd-comment tsd-typography"> | |
290 | <div class="lead"> | |
291 | <p>ID of the next message.</p> | |
292 | </div> | |
293 | </div> | |
294 | </section> | |
295 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> | |
296 | <a name="numberofworkers" class="tsd-anchor"></a> | |
297 | <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> number<wbr>OfWorkers</h3> | |
298 | <div class="tsd-signature tsd-kind-icon">number<wbr>OfWorkers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> | |
299 | <aside class="tsd-sources"> | |
300 | </aside> | |
301 | </section> | |
302 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> | |
303 | <a name="opts" class="tsd-anchor"></a> | |
304 | <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> opts</h3> | |
305 | <div class="tsd-signature tsd-kind-icon">opts<span class="tsd-signature-symbol">:</span> <a href="../interfaces/clusterpooloptions.html" class="tsd-signature-type" data-tsd-kind="Interface">ClusterPoolOptions</a><span class="tsd-signature-symbol"> = ...</span></div> | |
306 | <aside class="tsd-sources"> | |
307 | </aside> | |
308 | </section> | |
309 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"> | |
310 | <a name="promisemap" class="tsd-anchor"></a> | |
311 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> promise<wbr>Map</h3> | |
312 | <div class="tsd-signature tsd-kind-icon">promise<wbr>Map<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">PromiseWorkerResponseWrapper</span><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div> | |
313 | <aside class="tsd-sources"> | |
314 | <ul> | |
849e0547 | 315 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L130">src/pools/abstract-pool.ts:130</a></li> |
5ea22628 JB |
316 | </ul> |
317 | </aside> | |
318 | <div class="tsd-comment tsd-typography"> | |
319 | <div class="lead"> | |
320 | <p>The promise map.</p> | |
321 | </div> | |
322 | <ul> | |
323 | <li><code>key</code>: This is the message ID of each submitted task.</li> | |
324 | <li><code>value</code>: An object that contains the worker, the resolve function and the reject function.</li> | |
325 | </ul> | |
326 | <p>When we receive a message from the worker we get a map entry and resolve/reject the promise based on the message.</p> | |
327 | </div> | |
328 | </section> | |
329 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> | |
330 | <a name="tasks" class="tsd-anchor"></a> | |
331 | <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> tasks</h3> | |
332 | <div class="tsd-signature tsd-kind-icon">tasks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Worker</span><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></div> | |
333 | <aside class="tsd-sources"> | |
334 | <ul> | |
849e0547 | 335 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L114">src/pools/abstract-pool.ts:114</a></li> |
5ea22628 JB |
336 | </ul> |
337 | </aside> | |
338 | <div class="tsd-comment tsd-typography"> | |
339 | <dl class="tsd-comment-tags"> | |
340 | <dt>inheritdoc</dt> | |
341 | <dd></dd> | |
342 | </dl> | |
343 | </div> | |
344 | </section> | |
345 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"> | |
346 | <a name="workerchoicestrategycontext" class="tsd-anchor"></a> | |
347 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> worker<wbr>Choice<wbr>Strategy<wbr>Context</h3> | |
348 | <div class="tsd-signature tsd-kind-icon">worker<wbr>Choice<wbr>Strategy<wbr>Context<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WorkerChoiceStrategyContext</span><span class="tsd-signature-symbol"><</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">></span></div> | |
349 | <aside class="tsd-sources"> | |
350 | <ul> | |
849e0547 | 351 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L145">src/pools/abstract-pool.ts:145</a></li> |
5ea22628 JB |
352 | </ul> |
353 | </aside> | |
354 | <div class="tsd-comment tsd-typography"> | |
355 | <div class="lead"> | |
356 | <p>Worker choice strategy instance implementing the worker choice algorithm.</p> | |
357 | </div> | |
358 | <p>Default to a strategy implementing a round robin algorithm.</p> | |
359 | </div> | |
360 | </section> | |
361 | <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> | |
362 | <a name="workers" class="tsd-anchor"></a> | |
363 | <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> workers</h3> | |
364 | <div class="tsd-signature tsd-kind-icon">workers<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></div> | |
365 | <aside class="tsd-sources"> | |
366 | <ul> | |
849e0547 | 367 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L111">src/pools/abstract-pool.ts:111</a></li> |
5ea22628 JB |
368 | </ul> |
369 | </aside> | |
370 | <div class="tsd-comment tsd-typography"> | |
371 | <dl class="tsd-comment-tags"> | |
372 | <dt>inheritdoc</dt> | |
373 | <dd></dd> | |
374 | </dl> | |
375 | </div> | |
376 | </section> | |
377 | </section> | |
378 | <section class="tsd-panel-group tsd-member-group "> | |
379 | <h2>Accessors</h2> | |
380 | <section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"> | |
7c0ba920 JB |
381 | <a name="busy" class="tsd-anchor"></a> |
382 | <h3>busy</h3> | |
5ea22628 | 383 | <ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"> |
7c0ba920 | 384 | <li class="tsd-signature tsd-kind-icon"><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> |
5ea22628 JB |
385 | </ul> |
386 | <ul class="tsd-descriptions"> | |
387 | <li class="tsd-description"> | |
388 | <aside class="tsd-sources"> | |
389 | <ul> | |
849e0547 | 390 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L95">src/pools/cluster/fixed.ts:95</a></li> |
5ea22628 JB |
391 | </ul> |
392 | </aside> | |
393 | <div class="tsd-comment tsd-typography"> | |
394 | <dl class="tsd-comment-tags"> | |
395 | <dt>inheritdoc</dt> | |
396 | <dd></dd> | |
397 | </dl> | |
398 | </div> | |
399 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> | |
400 | </li> | |
401 | </ul> | |
402 | </section> | |
7c0ba920 JB |
403 | <section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"> |
404 | <a name="numberofrunningtasks" class="tsd-anchor"></a> | |
405 | <h3>number<wbr>OfRunning<wbr>Tasks</h3> | |
406 | <ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"> | |
407 | <li class="tsd-signature tsd-kind-icon"><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> | |
408 | </ul> | |
409 | <ul class="tsd-descriptions"> | |
410 | <li class="tsd-description"> | |
411 | <aside class="tsd-sources"> | |
412 | <ul> | |
849e0547 | 413 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L232">src/pools/abstract-pool.ts:232</a></li> |
7c0ba920 JB |
414 | </ul> |
415 | </aside> | |
416 | <div class="tsd-comment tsd-typography"> | |
417 | <dl class="tsd-comment-tags"> | |
418 | <dt>inheritdoc</dt> | |
419 | <dd></dd> | |
420 | </dl> | |
421 | </div> | |
422 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> | |
423 | </li> | |
424 | </ul> | |
425 | </section> | |
426 | <section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"> | |
427 | <a name="type" class="tsd-anchor"></a> | |
428 | <h3>type</h3> | |
429 | <ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"> | |
430 | <li class="tsd-signature tsd-kind-icon"><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><span class="tsd-signature-type">PoolType</span></li> | |
431 | </ul> | |
432 | <ul class="tsd-descriptions"> | |
433 | <li class="tsd-description"> | |
434 | <aside class="tsd-sources"> | |
435 | <ul> | |
849e0547 | 436 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L90">src/pools/cluster/fixed.ts:90</a></li> |
7c0ba920 JB |
437 | </ul> |
438 | </aside> | |
439 | <div class="tsd-comment tsd-typography"> | |
440 | <dl class="tsd-comment-tags"> | |
441 | <dt>inheritdoc</dt> | |
442 | <dd></dd> | |
443 | </dl> | |
444 | </div> | |
445 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PoolType</span></h4> | |
446 | </li> | |
447 | </ul> | |
448 | </section> | |
5ea22628 JB |
449 | </section> |
450 | <section class="tsd-panel-group tsd-member-group "> | |
451 | <h2>Methods</h2> | |
452 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
453 | <a name="afterworkersetup" class="tsd-anchor"></a> | |
454 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> after<wbr>Worker<wbr>Setup</h3> | |
455 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
456 | <li class="tsd-signature tsd-kind-icon">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></li> | |
457 | </ul> | |
458 | <ul class="tsd-descriptions"> | |
459 | <li class="tsd-description"> | |
460 | <aside class="tsd-sources"> | |
461 | <ul> | |
849e0547 | 462 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L84">src/pools/cluster/fixed.ts:84</a></li> |
5ea22628 JB |
463 | </ul> |
464 | </aside> | |
465 | <h4 class="tsd-parameters-title">Parameters</h4> | |
466 | <ul class="tsd-parameters"> | |
467 | <li> | |
468 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
469 | </li> | |
470 | </ul> | |
471 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
472 | </li> | |
473 | </ul> | |
474 | </section> | |
475 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
476 | <a name="chooseworker" class="tsd-anchor"></a> | |
477 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> choose<wbr>Worker</h3> | |
478 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
479 | <li class="tsd-signature tsd-kind-icon">choose<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></li> | |
480 | </ul> | |
481 | <ul class="tsd-descriptions"> | |
482 | <li class="tsd-description"> | |
483 | <aside class="tsd-sources"> | |
484 | <ul> | |
849e0547 | 485 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L356">src/pools/abstract-pool.ts:356</a></li> |
5ea22628 JB |
486 | </ul> |
487 | </aside> | |
488 | <div class="tsd-comment tsd-typography"> | |
489 | <div class="lead"> | |
490 | <p>Choose a worker for the next task.</p> | |
491 | </div> | |
492 | <p>The default implementation uses a round robin algorithm to distribute the load.</p> | |
493 | </div> | |
494 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Worker</span></h4> | |
495 | <p>Worker.</p> | |
496 | </li> | |
497 | </ul> | |
498 | </section> | |
499 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
500 | <a name="createandsetupworker" class="tsd-anchor"></a> | |
501 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> create<wbr>And<wbr>Setup<wbr>Worker</h3> | |
502 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
503 | <li class="tsd-signature tsd-kind-icon">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></li> | |
504 | </ul> | |
505 | <ul class="tsd-descriptions"> | |
506 | <li class="tsd-description"> | |
507 | <aside class="tsd-sources"> | |
508 | <ul> | |
849e0547 | 509 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L409">src/pools/abstract-pool.ts:409</a></li> |
5ea22628 JB |
510 | </ul> |
511 | </aside> | |
512 | <div class="tsd-comment tsd-typography"> | |
513 | <div class="lead"> | |
514 | <p>Creates a new worker for this pool and sets it up completely.</p> | |
515 | </div> | |
516 | </div> | |
517 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Worker</span></h4> | |
518 | <p>New, completely set up worker.</p> | |
519 | </li> | |
520 | </ul> | |
521 | </section> | |
522 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
523 | <a name="createworker" class="tsd-anchor"></a> | |
524 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> create<wbr>Worker</h3> | |
525 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
526 | <li class="tsd-signature tsd-kind-icon">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></li> | |
527 | </ul> | |
528 | <ul class="tsd-descriptions"> | |
529 | <li class="tsd-description"> | |
530 | <aside class="tsd-sources"> | |
531 | <ul> | |
849e0547 | 532 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L80">src/pools/cluster/fixed.ts:80</a></li> |
5ea22628 JB |
533 | </ul> |
534 | </aside> | |
535 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Worker</span></h4> | |
536 | </li> | |
537 | </ul> | |
538 | </section> | |
539 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
540 | <a name="decreaseworkerstasks" class="tsd-anchor"></a> | |
541 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> decrease<wbr>Workers<wbr>Tasks</h3> | |
542 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
543 | <li class="tsd-signature tsd-kind-icon">decrease<wbr>Workers<wbr>Tasks<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></li> | |
544 | </ul> | |
545 | <ul class="tsd-descriptions"> | |
546 | <li class="tsd-description"> | |
547 | <aside class="tsd-sources"> | |
548 | <ul> | |
849e0547 | 549 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L318">src/pools/abstract-pool.ts:318</a></li> |
5ea22628 JB |
550 | </ul> |
551 | </aside> | |
552 | <div class="tsd-comment tsd-typography"> | |
553 | <div class="lead"> | |
7c0ba920 | 554 | <p>Decrease the number of tasks that the given workers has applied.</p> |
5ea22628 JB |
555 | </div> |
556 | </div> | |
557 | <h4 class="tsd-parameters-title">Parameters</h4> | |
558 | <ul class="tsd-parameters"> | |
559 | <li> | |
560 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
561 | <div class="tsd-comment tsd-typography"> | |
562 | <p>Worker whose tasks are decreased.</p> | |
563 | </div> | |
564 | </li> | |
565 | </ul> | |
566 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
567 | </li> | |
568 | </ul> | |
569 | </section> | |
570 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> | |
571 | <a name="destroy" class="tsd-anchor"></a> | |
572 | <h3>destroy</h3> | |
573 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> | |
574 | <li class="tsd-signature tsd-kind-icon">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"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li> | |
575 | </ul> | |
576 | <ul class="tsd-descriptions"> | |
577 | <li class="tsd-description"> | |
578 | <aside class="tsd-sources"> | |
579 | <ul> | |
849e0547 | 580 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L280">src/pools/abstract-pool.ts:280</a></li> |
5ea22628 JB |
581 | </ul> |
582 | </aside> | |
583 | <div class="tsd-comment tsd-typography"> | |
584 | <dl class="tsd-comment-tags"> | |
585 | <dt>inheritdoc</dt> | |
586 | <dd></dd> | |
587 | </dl> | |
588 | </div> | |
589 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4> | |
590 | </li> | |
591 | </ul> | |
592 | </section> | |
593 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> | |
594 | <a name="destroyworker" class="tsd-anchor"></a> | |
595 | <h3>destroy<wbr>Worker</h3> | |
596 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> | |
597 | <li class="tsd-signature tsd-kind-icon">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></li> | |
598 | </ul> | |
599 | <ul class="tsd-descriptions"> | |
600 | <li class="tsd-description"> | |
601 | <aside class="tsd-sources"> | |
602 | <ul> | |
849e0547 | 603 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L63">src/pools/cluster/fixed.ts:63</a></li> |
5ea22628 JB |
604 | </ul> |
605 | </aside> | |
606 | <div class="tsd-comment tsd-typography"> | |
607 | <dl class="tsd-comment-tags"> | |
608 | <dt>inheritdoc</dt> | |
609 | <dd></dd> | |
610 | </dl> | |
611 | </div> | |
612 | <h4 class="tsd-parameters-title">Parameters</h4> | |
613 | <ul class="tsd-parameters"> | |
614 | <li> | |
615 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
616 | </li> | |
617 | </ul> | |
618 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
619 | </li> | |
620 | </ul> | |
621 | </section> | |
622 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> | |
623 | <a name="execute" class="tsd-anchor"></a> | |
624 | <h3>execute</h3> | |
625 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> | |
626 | <li class="tsd-signature tsd-kind-icon">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"><</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">></span></li> | |
627 | </ul> | |
628 | <ul class="tsd-descriptions"> | |
629 | <li class="tsd-description"> | |
630 | <aside class="tsd-sources"> | |
631 | <ul> | |
849e0547 | 632 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L268">src/pools/abstract-pool.ts:268</a></li> |
5ea22628 JB |
633 | </ul> |
634 | </aside> | |
635 | <div class="tsd-comment tsd-typography"> | |
636 | <dl class="tsd-comment-tags"> | |
637 | <dt>inheritdoc</dt> | |
638 | <dd></dd> | |
639 | </dl> | |
640 | </div> | |
641 | <h4 class="tsd-parameters-title">Parameters</h4> | |
642 | <ul class="tsd-parameters"> | |
643 | <li> | |
644 | <h5>data: <span class="tsd-signature-type">Data</span></h5> | |
645 | </li> | |
646 | </ul> | |
647 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">></span></h4> | |
648 | </li> | |
649 | </ul> | |
650 | </section> | |
7c0ba920 JB |
651 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> |
652 | <a name="findfreetasksmapentry" class="tsd-anchor"></a> | |
653 | <h3>find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry</h3> | |
654 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> | |
655 | <li class="tsd-signature tsd-kind-icon">find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></li> | |
656 | </ul> | |
657 | <ul class="tsd-descriptions"> | |
658 | <li class="tsd-description"> | |
659 | <aside class="tsd-sources"> | |
660 | <ul> | |
849e0547 | 661 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L257">src/pools/abstract-pool.ts:257</a></li> |
7c0ba920 JB |
662 | </ul> |
663 | </aside> | |
664 | <div class="tsd-comment tsd-typography"> | |
665 | <dl class="tsd-comment-tags"> | |
666 | <dt>inheritdoc</dt> | |
667 | <dd></dd> | |
668 | </dl> | |
669 | </div> | |
670 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></h4> | |
671 | </li> | |
672 | </ul> | |
673 | </section> | |
5ea22628 JB |
674 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> |
675 | <a name="increaseworkerstask" class="tsd-anchor"></a> | |
676 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> increase<wbr>Workers<wbr>Task</h3> | |
677 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
678 | <li class="tsd-signature tsd-kind-icon">increase<wbr>Workers<wbr>Task<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></li> | |
679 | </ul> | |
680 | <ul class="tsd-descriptions"> | |
681 | <li class="tsd-description"> | |
682 | <aside class="tsd-sources"> | |
683 | <ul> | |
849e0547 | 684 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L309">src/pools/abstract-pool.ts:309</a></li> |
5ea22628 JB |
685 | </ul> |
686 | </aside> | |
687 | <div class="tsd-comment tsd-typography"> | |
688 | <div class="lead"> | |
7c0ba920 | 689 | <p>Increase the number of tasks that the given workers has applied.</p> |
5ea22628 JB |
690 | </div> |
691 | </div> | |
692 | <h4 class="tsd-parameters-title">Parameters</h4> | |
693 | <ul class="tsd-parameters"> | |
694 | <li> | |
695 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
696 | <div class="tsd-comment tsd-typography"> | |
697 | <p>Worker whose tasks are increased.</p> | |
698 | </div> | |
699 | </li> | |
700 | </ul> | |
701 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
702 | </li> | |
703 | </ul> | |
704 | </section> | |
705 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
706 | <a name="internalexecute" class="tsd-anchor"></a> | |
707 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> internal<wbr>Execute</h3> | |
708 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
709 | <li class="tsd-signature tsd-kind-icon">internal<wbr>Execute<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Worker</span>, messageId<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">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">></span></li> | |
710 | </ul> | |
711 | <ul class="tsd-descriptions"> | |
712 | <li class="tsd-description"> | |
713 | <aside class="tsd-sources"> | |
714 | <ul> | |
849e0547 | 715 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L381">src/pools/abstract-pool.ts:381</a></li> |
5ea22628 JB |
716 | </ul> |
717 | </aside> | |
718 | <h4 class="tsd-parameters-title">Parameters</h4> | |
719 | <ul class="tsd-parameters"> | |
720 | <li> | |
721 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
722 | </li> | |
723 | <li> | |
724 | <h5>messageId: <span class="tsd-signature-type">number</span></h5> | |
725 | </li> | |
726 | </ul> | |
727 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">></span></h4> | |
728 | </li> | |
729 | </ul> | |
730 | </section> | |
7c0ba920 JB |
731 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> |
732 | <a name="internalgetbusystatus" class="tsd-anchor"></a> | |
733 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> internal<wbr>Get<wbr>Busy<wbr>Status</h3> | |
734 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
735 | <li class="tsd-signature tsd-kind-icon">internal<wbr>Get<wbr>Busy<wbr>Status<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> | |
736 | </ul> | |
737 | <ul class="tsd-descriptions"> | |
738 | <li class="tsd-description"> | |
739 | <aside class="tsd-sources"> | |
740 | <ul> | |
849e0547 | 741 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L249">src/pools/abstract-pool.ts:249</a></li> |
7c0ba920 JB |
742 | </ul> |
743 | </aside> | |
744 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> | |
745 | </li> | |
746 | </ul> | |
747 | </section> | |
5ea22628 JB |
748 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> |
749 | <a name="ismain" class="tsd-anchor"></a> | |
750 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> is<wbr>Main</h3> | |
751 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
752 | <li class="tsd-signature tsd-kind-icon">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></li> | |
753 | </ul> | |
754 | <ul class="tsd-descriptions"> | |
755 | <li class="tsd-description"> | |
756 | <aside class="tsd-sources"> | |
757 | <ul> | |
849e0547 | 758 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L58">src/pools/cluster/fixed.ts:58</a></li> |
5ea22628 JB |
759 | </ul> |
760 | </aside> | |
761 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> | |
762 | </li> | |
763 | </ul> | |
764 | </section> | |
765 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"> | |
766 | <a name="registerworkermessagelistener" class="tsd-anchor"></a> | |
767 | <h3>register<wbr>Worker<wbr>Message<wbr>Listener</h3> | |
768 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"> | |
769 | <li class="tsd-signature tsd-kind-icon">register<wbr>Worker<wbr>Message<wbr>Listener<Message><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>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></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-symbol">: </span><span class="tsd-signature-type">void</span></li> | |
770 | </ul> | |
771 | <ul class="tsd-descriptions"> | |
772 | <li class="tsd-description"> | |
773 | <aside class="tsd-sources"> | |
774 | <ul> | |
849e0547 | 775 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L73">src/pools/cluster/fixed.ts:73</a></li> |
5ea22628 JB |
776 | </ul> |
777 | </aside> | |
778 | <div class="tsd-comment tsd-typography"> | |
779 | <dl class="tsd-comment-tags"> | |
780 | <dt>inheritdoc</dt> | |
781 | <dd></dd> | |
782 | </dl> | |
783 | </div> | |
784 | <h4 class="tsd-type-parameters-title">Type parameters</h4> | |
785 | <ul class="tsd-type-parameters"> | |
786 | <li> | |
787 | <h4>Message</h4> | |
788 | </li> | |
789 | </ul> | |
790 | <h4 class="tsd-parameters-title">Parameters</h4> | |
791 | <ul class="tsd-parameters"> | |
792 | <li> | |
793 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
794 | </li> | |
795 | <li> | |
796 | <h5>listener: <span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5> | |
797 | <ul class="tsd-parameters"> | |
798 | <li class="tsd-parameter-signature"> | |
799 | <ul class="tsd-signatures tsd-kind-type-literal"> | |
800 | <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> | |
801 | </ul> | |
802 | <ul class="tsd-descriptions"> | |
803 | <li class="tsd-description"> | |
804 | <h4 class="tsd-parameters-title">Parameters</h4> | |
805 | <ul class="tsd-parameters"> | |
806 | <li> | |
807 | <h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span></h5> | |
808 | </li> | |
809 | </ul> | |
810 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
811 | </li> | |
812 | </ul> | |
813 | </li> | |
814 | </ul> | |
815 | </li> | |
816 | </ul> | |
817 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
818 | </li> | |
819 | </ul> | |
820 | </section> | |
821 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
822 | <a name="removeworker" class="tsd-anchor"></a> | |
823 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> remove<wbr>Worker</h3> | |
824 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
825 | <li class="tsd-signature tsd-kind-icon">remove<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></li> | |
826 | </ul> | |
827 | <ul class="tsd-descriptions"> | |
828 | <li class="tsd-description"> | |
829 | <aside class="tsd-sources"> | |
830 | <ul> | |
849e0547 | 831 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L342">src/pools/abstract-pool.ts:342</a></li> |
5ea22628 JB |
832 | </ul> |
833 | </aside> | |
834 | <div class="tsd-comment tsd-typography"> | |
835 | <div class="lead"> | |
836 | <p>Removes the given worker from the pool.</p> | |
837 | </div> | |
838 | </div> | |
839 | <h4 class="tsd-parameters-title">Parameters</h4> | |
840 | <ul class="tsd-parameters"> | |
841 | <li> | |
842 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
843 | <div class="tsd-comment tsd-typography"> | |
844 | <p>Worker that will be removed.</p> | |
845 | </div> | |
846 | </li> | |
847 | </ul> | |
848 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
849 | </li> | |
850 | </ul> | |
851 | </section> | |
852 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
853 | <a name="sendtoworker" class="tsd-anchor"></a> | |
854 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> send<wbr>ToWorker</h3> | |
855 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
856 | <li class="tsd-signature tsd-kind-icon">send<wbr>ToWorker<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><span class="tsd-signature-type">MessageValue</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">unknown</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></li> | |
857 | </ul> | |
858 | <ul class="tsd-descriptions"> | |
859 | <li class="tsd-description"> | |
860 | <aside class="tsd-sources"> | |
861 | <ul> | |
849e0547 | 862 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L68">src/pools/cluster/fixed.ts:68</a></li> |
5ea22628 JB |
863 | </ul> |
864 | </aside> | |
865 | <h4 class="tsd-parameters-title">Parameters</h4> | |
866 | <ul class="tsd-parameters"> | |
867 | <li> | |
868 | <h5>worker: <span class="tsd-signature-type">Worker</span></h5> | |
869 | </li> | |
870 | <li> | |
871 | <h5>message: <span class="tsd-signature-type">MessageValue</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">unknown</span><span class="tsd-signature-symbol">></span></h5> | |
872 | </li> | |
873 | </ul> | |
874 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
875 | </li> | |
876 | </ul> | |
877 | </section> | |
878 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> | |
879 | <a name="setworkerchoicestrategy" class="tsd-anchor"></a> | |
880 | <h3>set<wbr>Worker<wbr>Choice<wbr>Strategy</h3> | |
881 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> | |
882 | <li class="tsd-signature tsd-kind-icon">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">"ROUND_ROBIN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LESS_RECENTLY_USED"</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> | |
883 | </ul> | |
884 | <ul class="tsd-descriptions"> | |
885 | <li class="tsd-description"> | |
886 | <aside class="tsd-sources"> | |
887 | <ul> | |
849e0547 | 888 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L237">src/pools/abstract-pool.ts:237</a></li> |
5ea22628 JB |
889 | </ul> |
890 | </aside> | |
891 | <div class="tsd-comment tsd-typography"> | |
892 | <dl class="tsd-comment-tags"> | |
893 | <dt>inheritdoc</dt> | |
894 | <dd></dd> | |
895 | </dl> | |
896 | </div> | |
897 | <h4 class="tsd-parameters-title">Parameters</h4> | |
898 | <ul class="tsd-parameters"> | |
899 | <li> | |
900 | <h5>workerChoiceStrategy: <span class="tsd-signature-type">"ROUND_ROBIN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LESS_RECENTLY_USED"</span></h5> | |
901 | </li> | |
902 | </ul> | |
903 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
904 | </li> | |
905 | </ul> | |
906 | </section> | |
907 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
908 | <a name="setuphook" class="tsd-anchor"></a> | |
909 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> setup<wbr>Hook</h3> | |
910 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
911 | <li class="tsd-signature tsd-kind-icon">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></li> | |
912 | </ul> | |
913 | <ul class="tsd-descriptions"> | |
914 | <li class="tsd-description"> | |
915 | <aside class="tsd-sources"> | |
916 | <ul> | |
849e0547 | 917 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/cluster/fixed.ts#L52">src/pools/cluster/fixed.ts:52</a></li> |
5ea22628 JB |
918 | </ul> |
919 | </aside> | |
920 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
921 | </li> | |
922 | </ul> | |
923 | </section> | |
924 | <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
925 | <a name="workerlistener" class="tsd-anchor"></a> | |
926 | <h3><span class="tsd-flag ts-flagProtected">Protected</span> worker<wbr>Listener</h3> | |
927 | <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
928 | <li class="tsd-signature tsd-kind-icon">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>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></li> | |
929 | </ul> | |
930 | <ul class="tsd-descriptions"> | |
931 | <li class="tsd-description"> | |
932 | <aside class="tsd-sources"> | |
933 | <ul> | |
849e0547 | 934 | <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L432">src/pools/abstract-pool.ts:432</a></li> |
5ea22628 JB |
935 | </ul> |
936 | </aside> | |
937 | <div class="tsd-comment tsd-typography"> | |
938 | <div class="lead"> | |
939 | <p>This function is the listener registered for each worker.</p> | |
940 | </div> | |
941 | </div> | |
942 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h4> | |
943 | <p>The listener function to execute when a message is sent from a worker.</p> | |
944 | <ul class="tsd-parameters"> | |
945 | <li class="tsd-parameter-signature"> | |
946 | <ul class="tsd-signatures tsd-kind-type-literal"> | |
947 | <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> | |
948 | </ul> | |
949 | <ul class="tsd-descriptions"> | |
950 | <li class="tsd-description"> | |
951 | <h4 class="tsd-parameters-title">Parameters</h4> | |
952 | <ul class="tsd-parameters"> | |
953 | <li> | |
954 | <h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol"><</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">></span></h5> | |
955 | </li> | |
956 | </ul> | |
957 | <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> | |
958 | </li> | |
959 | </ul> | |
960 | </li> | |
961 | </ul> | |
962 | </li> | |
963 | </ul> | |
964 | </section> | |
965 | </section> | |
966 | </div> | |
967 | <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> | |
968 | <nav class="tsd-navigation primary"> | |
969 | <ul> | |
970 | <li class=" "> | |
971 | <a href="../index.html">Exports</a> | |
972 | </li> | |
973 | </ul> | |
974 | </nav> | |
975 | <nav class="tsd-navigation secondary menu-sticky"> | |
976 | <ul class="before-current"> | |
977 | <li class=" tsd-kind-class tsd-has-type-parameter"> | |
978 | <a href="abstractworker.html" class="tsd-kind-icon">Abstract<wbr>Worker</a> | |
979 | </li> | |
980 | <li class=" tsd-kind-class tsd-has-type-parameter"> | |
981 | <a href="clusterworker.html" class="tsd-kind-icon">Cluster<wbr>Worker</a> | |
982 | </li> | |
983 | <li class=" tsd-kind-class tsd-has-type-parameter"> | |
984 | <a href="dynamicclusterpool.html" class="tsd-kind-icon">Dynamic<wbr>Cluster<wbr>Pool</a> | |
985 | </li> | |
986 | <li class=" tsd-kind-class tsd-has-type-parameter"> | |
987 | <a href="dynamicthreadpool.html" class="tsd-kind-icon">Dynamic<wbr>Thread<wbr>Pool</a> | |
988 | </li> | |
989 | </ul> | |
990 | <ul class="current"> | |
991 | <li class="current tsd-kind-class tsd-has-type-parameter"> | |
992 | <a href="fixedclusterpool.html" class="tsd-kind-icon">Fixed<wbr>Cluster<wbr>Pool</a> | |
993 | <ul> | |
994 | <li class=" tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"> | |
995 | <a href="fixedclusterpool.html#constructor" class="tsd-kind-icon">constructor</a> | |
996 | </li> | |
997 | <li class=" tsd-kind-property tsd-parent-kind-class"> | |
998 | <a href="fixedclusterpool.html#emitter" class="tsd-kind-icon">emitter</a> | |
999 | </li> | |
1000 | <li class=" tsd-kind-property tsd-parent-kind-class"> | |
1001 | <a href="fixedclusterpool.html#filepath" class="tsd-kind-icon">file<wbr>Path</a> | |
1002 | </li> | |
7c0ba920 JB |
1003 | <li class=" tsd-kind-property tsd-parent-kind-class"> |
1004 | <a href="fixedclusterpool.html#max" class="tsd-kind-icon">max</a> | |
1005 | </li> | |
5ea22628 JB |
1006 | <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected"> |
1007 | <a href="fixedclusterpool.html#nextmessageid" class="tsd-kind-icon">next<wbr>Message<wbr>Id</a> | |
1008 | </li> | |
1009 | <li class=" tsd-kind-property tsd-parent-kind-class"> | |
1010 | <a href="fixedclusterpool.html#numberofworkers" class="tsd-kind-icon">number<wbr>OfWorkers</a> | |
1011 | </li> | |
1012 | <li class=" tsd-kind-property tsd-parent-kind-class"> | |
1013 | <a href="fixedclusterpool.html#opts" class="tsd-kind-icon">opts</a> | |
1014 | </li> | |
1015 | <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected"> | |
1016 | <a href="fixedclusterpool.html#promisemap" class="tsd-kind-icon">promise<wbr>Map</a> | |
1017 | </li> | |
1018 | <li class=" tsd-kind-property tsd-parent-kind-class"> | |
1019 | <a href="fixedclusterpool.html#tasks" class="tsd-kind-icon">tasks</a> | |
1020 | </li> | |
1021 | <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected"> | |
1022 | <a href="fixedclusterpool.html#workerchoicestrategycontext" class="tsd-kind-icon">worker<wbr>Choice<wbr>Strategy<wbr>Context</a> | |
1023 | </li> | |
1024 | <li class=" tsd-kind-property tsd-parent-kind-class"> | |
1025 | <a href="fixedclusterpool.html#workers" class="tsd-kind-icon">workers</a> | |
1026 | </li> | |
1027 | <li class=" tsd-kind-get-signature tsd-parent-kind-class"> | |
7c0ba920 JB |
1028 | <a href="fixedclusterpool.html#busy" class="tsd-kind-icon">busy</a> |
1029 | </li> | |
1030 | <li class=" tsd-kind-get-signature tsd-parent-kind-class"> | |
1031 | <a href="fixedclusterpool.html#numberofrunningtasks" class="tsd-kind-icon">number<wbr>OfRunning<wbr>Tasks</a> | |
1032 | </li> | |
1033 | <li class=" tsd-kind-get-signature tsd-parent-kind-class"> | |
1034 | <a href="fixedclusterpool.html#type" class="tsd-kind-icon">type</a> | |
5ea22628 JB |
1035 | </li> |
1036 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1037 | <a href="fixedclusterpool.html#afterworkersetup" class="tsd-kind-icon">after<wbr>Worker<wbr>Setup</a> | |
1038 | </li> | |
1039 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1040 | <a href="fixedclusterpool.html#chooseworker" class="tsd-kind-icon">choose<wbr>Worker</a> | |
1041 | </li> | |
1042 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1043 | <a href="fixedclusterpool.html#createandsetupworker" class="tsd-kind-icon">create<wbr>And<wbr>Setup<wbr>Worker</a> | |
1044 | </li> | |
1045 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1046 | <a href="fixedclusterpool.html#createworker" class="tsd-kind-icon">create<wbr>Worker</a> | |
1047 | </li> | |
1048 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1049 | <a href="fixedclusterpool.html#decreaseworkerstasks" class="tsd-kind-icon">decrease<wbr>Workers<wbr>Tasks</a> | |
1050 | </li> | |
1051 | <li class=" tsd-kind-method tsd-parent-kind-class"> | |
1052 | <a href="fixedclusterpool.html#destroy" class="tsd-kind-icon">destroy</a> | |
1053 | </li> | |
1054 | <li class=" tsd-kind-method tsd-parent-kind-class"> | |
1055 | <a href="fixedclusterpool.html#destroyworker" class="tsd-kind-icon">destroy<wbr>Worker</a> | |
1056 | </li> | |
1057 | <li class=" tsd-kind-method tsd-parent-kind-class"> | |
1058 | <a href="fixedclusterpool.html#execute" class="tsd-kind-icon">execute</a> | |
1059 | </li> | |
7c0ba920 JB |
1060 | <li class=" tsd-kind-method tsd-parent-kind-class"> |
1061 | <a href="fixedclusterpool.html#findfreetasksmapentry" class="tsd-kind-icon">find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry</a> | |
1062 | </li> | |
5ea22628 JB |
1063 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> |
1064 | <a href="fixedclusterpool.html#increaseworkerstask" class="tsd-kind-icon">increase<wbr>Workers<wbr>Task</a> | |
1065 | </li> | |
1066 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1067 | <a href="fixedclusterpool.html#internalexecute" class="tsd-kind-icon">internal<wbr>Execute</a> | |
1068 | </li> | |
7c0ba920 JB |
1069 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> |
1070 | <a href="fixedclusterpool.html#internalgetbusystatus" class="tsd-kind-icon">internal<wbr>Get<wbr>Busy<wbr>Status</a> | |
1071 | </li> | |
5ea22628 JB |
1072 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> |
1073 | <a href="fixedclusterpool.html#ismain" class="tsd-kind-icon">is<wbr>Main</a> | |
1074 | </li> | |
1075 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"> | |
1076 | <a href="fixedclusterpool.html#registerworkermessagelistener" class="tsd-kind-icon">register<wbr>Worker<wbr>Message<wbr>Listener</a> | |
1077 | </li> | |
1078 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1079 | <a href="fixedclusterpool.html#removeworker" class="tsd-kind-icon">remove<wbr>Worker</a> | |
1080 | </li> | |
1081 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1082 | <a href="fixedclusterpool.html#sendtoworker" class="tsd-kind-icon">send<wbr>ToWorker</a> | |
1083 | </li> | |
1084 | <li class=" tsd-kind-method tsd-parent-kind-class"> | |
1085 | <a href="fixedclusterpool.html#setworkerchoicestrategy" class="tsd-kind-icon">set<wbr>Worker<wbr>Choice<wbr>Strategy</a> | |
1086 | </li> | |
1087 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1088 | <a href="fixedclusterpool.html#setuphook" class="tsd-kind-icon">setup<wbr>Hook</a> | |
1089 | </li> | |
1090 | <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> | |
1091 | <a href="fixedclusterpool.html#workerlistener" class="tsd-kind-icon">worker<wbr>Listener</a> | |
1092 | </li> | |
1093 | </ul> | |
1094 | </li> | |
1095 | </ul> | |
1096 | <ul class="after-current"> | |
1097 | <li class=" tsd-kind-class tsd-has-type-parameter"> | |
1098 | <a href="fixedthreadpool.html" class="tsd-kind-icon">Fixed<wbr>Thread<wbr>Pool</a> | |
1099 | </li> | |
1100 | <li class=" tsd-kind-class tsd-has-type-parameter"> | |
1101 | <a href="threadworker.html" class="tsd-kind-icon">Thread<wbr>Worker</a> | |
1102 | </li> | |
1103 | <li class=" tsd-kind-interface"> | |
1104 | <a href="../interfaces/clusterpooloptions.html" class="tsd-kind-icon">Cluster<wbr>Pool<wbr>Options</a> | |
1105 | </li> | |
1106 | <li class=" tsd-kind-interface tsd-has-type-parameter"> | |
1107 | <a href="../interfaces/ipool.html" class="tsd-kind-icon">IPool</a> | |
1108 | </li> | |
1109 | <li class=" tsd-kind-interface"> | |
1110 | <a href="../interfaces/iworker.html" class="tsd-kind-icon">IWorker</a> | |
1111 | </li> | |
1112 | <li class=" tsd-kind-interface tsd-has-type-parameter"> | |
1113 | <a href="../interfaces/pooloptions.html" class="tsd-kind-icon">Pool<wbr>Options</a> | |
1114 | </li> | |
1115 | <li class=" tsd-kind-interface"> | |
1116 | <a href="../interfaces/workeroptions.html" class="tsd-kind-icon">Worker<wbr>Options</a> | |
1117 | </li> | |
1118 | <li class=" tsd-kind-type-alias tsd-has-type-parameter"> | |
1119 | <a href="../index.html#errorhandler" class="tsd-kind-icon">Error<wbr>Handler</a> | |
1120 | </li> | |
1121 | <li class=" tsd-kind-type-alias tsd-has-type-parameter"> | |
1122 | <a href="../index.html#exithandler" class="tsd-kind-icon">Exit<wbr>Handler</a> | |
1123 | </li> | |
1124 | <li class=" tsd-kind-type-alias"> | |
1125 | <a href="../index.html#killbehavior" class="tsd-kind-icon">Kill<wbr>Behavior</a> | |
1126 | </li> | |
1127 | <li class=" tsd-kind-type-alias tsd-has-type-parameter"> | |
1128 | <a href="../index.html#onlinehandler" class="tsd-kind-icon">Online<wbr>Handler</a> | |
1129 | </li> | |
1130 | <li class=" tsd-kind-type-alias"> | |
1131 | <a href="../index.html#threadworkerwithmessagechannel" class="tsd-kind-icon">Thread<wbr>Worker<wbr>With<wbr>Message<wbr>Channel</a> | |
1132 | </li> | |
1133 | <li class=" tsd-kind-type-alias"> | |
1134 | <a href="../index.html#workerchoicestrategy" class="tsd-kind-icon">Worker<wbr>Choice<wbr>Strategy</a> | |
1135 | </li> | |
1136 | <li class=" tsd-kind-variable"> | |
1137 | <a href="../index.html#killbehaviors" class="tsd-kind-icon">Kill<wbr>Behaviors</a> | |
1138 | </li> | |
1139 | <li class=" tsd-kind-variable"> | |
1140 | <a href="../index.html#workerchoicestrategies" class="tsd-kind-icon">Worker<wbr>Choice<wbr>Strategies</a> | |
1141 | </li> | |
1142 | </ul> | |
1143 | </nav> | |
1144 | </div> | |
1145 | </div> | |
1146 | </div> | |
1147 | <footer class="with-border-bottom"> | |
1148 | <div class="container"> | |
1149 | <h2>Legend</h2> | |
1150 | <div class="tsd-legend-group"> | |
1151 | <ul class="tsd-legend"> | |
1152 | <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> | |
1153 | <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> | |
1154 | </ul> | |
1155 | <ul class="tsd-legend"> | |
1156 | <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> | |
1157 | <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> | |
1158 | </ul> | |
1159 | <ul class="tsd-legend"> | |
1160 | <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> | |
1161 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> | |
1162 | </ul> | |
1163 | <ul class="tsd-legend"> | |
1164 | <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> | |
1165 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> | |
1166 | </ul> | |
1167 | <ul class="tsd-legend"> | |
1168 | <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> | |
1169 | </ul> | |
1170 | </div> | |
1171 | </div> | |
1172 | </footer> | |
1173 | <div class="container tsd-generator"> | |
1174 | <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> | |
1175 | </div> | |
1176 | <div class="overlay"></div> | |
1177 | <script src="../assets/js/main.js"></script> | |
1178 | </body> | |
1179 | </html> |