X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractPool.html;h=92d46d153c26a6e332bce691985d560adac71ee5;hb=cc35cd9cb7323e39c9f521cdd4fbf51d1d31bbdf;hp=4a702c21b1eeab59420a01ffa9169bf18e4916d7;hpb=a464a1f80f2239f7c8faa2998b0ba814ac7bddc6;p=poolifier.git diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html index 4a702c21..92d46d15 100644 --- a/docs/classes/AbstractPool.html +++ b/docs/classes/AbstractPool.html @@ -1,4 +1,4 @@ -AbstractPool | poolifier - v2.6.15
+AbstractPool | poolifier - v2.6.40
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.15
+
  • The search index is not available
  • poolifier - v2.6.40
    @@ -49,7 +49,7 @@
    • IPool<Worker, Data, Response>
    +
  • Defined in src/pools/abstract-pool.ts:57
  • @@ -63,10 +63,13 @@

    Properties

    @@ -78,7 +81,6 @@ maxSize minSize ready -starting type utilization worker @@ -87,10 +89,12 @@

    Methods

    addWorkerNode afterTaskExecutionHook -afterWorkerSetup +afterWorkerNodeSetup beforeTaskExecutionHook buildTasksQueueOptions -checkAndEmitEvents +checkAndEmitDynamicWorkerCreationEvents +checkAndEmitTaskExecutionEvents +checkAndEmitTaskQueuingEvents checkDynamicPoolSize checkFilePath checkMessageWorkerId @@ -100,40 +104,51 @@ checkValidWorkerChoiceStrategy checkValidWorkerChoiceStrategyOptions chooseWorkerNode -createAndSetupDynamicWorker -createAndSetupWorker +createAndSetupDynamicWorkerNode +createAndSetupWorkerNode createWorker dequeueTask destroy -destroyWorker +destroyWorkerNode enableTasksQueue enqueueTask execute executeTask -flushTasksQueue +flushTasksQueue flushTasksQueues -getWorkerById -getWorkerInfo -getWorkerNodeKey +getWorkerInfo +getWorkerNodeKeyByWorker +getWorkerNodeKeyByWorkerId handleTaskExecutionResponse handleWorkerReadyResponse +hasBackPressure +hasWorkerNodeBackPressure internalBusy isMain +listTaskFunctions redistributeQueuedTasks -registerWorkerMessageListener +registerWorkerMessageListener removeWorkerNode +sendKillMessageToWorker +sendStartupMessageToWorker +sendStatisticsMessageToWorker sendToWorker -sendWorkerStartupMessage setTasksQueueOptions +setTasksQueueSize setWorkerChoiceStrategy setWorkerChoiceStrategyOptions -setWorkerStatistics setupHook shallCreateDynamicWorker +shallExecuteTask +shallUpdateTaskFunctionWorkerUsage +startPool +taskStealingOnEmptyQueue tasksQueueSize +tasksStealingOnBackPressure updateEluWorkerUsage updateRunTimeWorkerUsage updateTaskStatisticsWorkerUsage +updateTaskStolenStatisticsWorkerUsage updateWaitTimeWorkerUsage workerListener
    @@ -161,22 +176,19 @@
  • numberOfWorkers: number

    Number of workers that this pool should manage.

    -
    -
  • +
  • filePath: string

    Path to the worker file.

    -
    -
  • +
  • opts: PoolOptions<Worker>

    Options for the pool.

    -
    -
  • +

    Returns AbstractPool<Worker, Data, Response>

    +
  • Defined in src/pools/abstract-pool.ts:113
  • Properties

    @@ -185,17 +197,19 @@

    Emitter on which events can be listened to.

    Events that can currently be listened to:

      -
    • 'full': Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.
    • 'ready': Emitted when the number of workers created in the pool has reached the minimum size expected and are ready.
    • -
    • 'busy': Emitted when the number of workers created in the pool has reached the maximum size expected and are executing at least one task.
    • +
    • 'busy': Emitted when the number of workers created in the pool has reached the maximum size expected and are executing concurrently their tasks quota.
    • +
    • 'full': Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.
    • +
    • 'destroy': Emitted when the pool is destroyed.
    • 'error': Emitted when an uncaught error occurs.
    • 'taskError': Emitted when an error occurs while executing a task.
    • +
    • 'backPressure': Emitted when all worker nodes have back pressure (i.e. their tasks queue is full: queue size >= maximum queue size).
    +
  • Defined in src/pools/abstract-pool.ts:66
  • filePath: string
    @@ -203,7 +217,15 @@
    +
  • Defined in src/pools/abstract-pool.ts:115
  • +
    + +
    max?: number
    +

    Dynamic pool maximum size property placeholder.

    +
    +
    numberOfWorkers: number
    @@ -211,7 +233,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:114
  • opts: PoolOptions<Worker>
    @@ -219,11 +241,11 @@
    +
  • Defined in src/pools/abstract-pool.ts:116
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...
    -

    The execution response promise map.

    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Response>> = ...
    +

    The task execution response promise map.

    • key: The message id of each submitted task.
    • value: An object that contains the worker, the execution response promise resolve and reject callbacks.
    • @@ -232,7 +254,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:76
  • startTimestamp: number
    @@ -240,7 +262,23 @@
    +
  • Defined in src/pools/abstract-pool.ts:104
  • +
    + +
    started: boolean
    +

    Whether the pool is started or not.

    +
    +
    +
    + +
    starting: boolean
    +

    Whether the pool is starting or not.

    +
    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -248,16 +286,16 @@
    +
  • Defined in src/pools/abstract-pool.ts:82
  • - +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

    +
  • Defined in src/pools/abstract-pool.ts:63
  • Accessors

    @@ -271,7 +309,7 @@

    Returns boolean

    +
  • Defined in src/pools/abstract-pool.ts:696
  • +
  • Defined in src/pools/abstract-pool.ts:687
  • +
  • Defined in src/pools/abstract-pool.ts:348
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:560
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:553
  • -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:505
  • +
  • Defined in src/pools/abstract-pool.ts:543
  • +
  • Defined in src/pools/abstract-pool.ts:522
  • +
  • Defined in src/pools/abstract-pool.ts:548
  • Methods

    @@ -384,17 +417,18 @@
  • worker: Worker

    The worker.

    -
    -
  • -

    Returns number

    The worker nodes length.

    + +

    Returns number

    The added worker node key.

    -
    +
  • Defined in src/pools/abstract-pool.ts:1428
  • Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:886
  • +
    +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:1160
  • +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:856
  • Returns TasksQueueOptions

    -
    - +
  • Defined in src/pools/abstract-pool.ts:670
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1403
  • +
    + +
    +
    + +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:185
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:154
  • +

    Returns void

    Throws

    https://nodejs.org/api/errors.html#class-error If the worker id is invalid.

    +
  • Defined in src/pools/abstract-pool.ts:570
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:167
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:211
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:293
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:239
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:249
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:1013
  • +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:1103
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1059
  • +
  • Defined in src/pools/abstract-pool.ts:1052
  • Returns undefined | Task<Data>

    +
  • Defined in src/pools/abstract-pool.ts:1493
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:801
  • +
    + +

    Returns Promise<void>

    +
  • Defined in src/pools/abstract-pool.ts:832
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:641
  • Returns number

    +
  • Defined in src/pools/abstract-pool.ts:1487
  • Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    +
  • Defined in src/pools/abstract-pool.ts:745
  • Returns void

    -
    - -
    +
    + +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:1501
  • -
    - -
    +
    + + +

    Returns undefined | WorkerInfo

    The worker information.

    -
    - +
  • Defined in src/pools/abstract-pool.ts:1417
  • +
    + +

    Returns number

    The worker node key if found in the pool worker nodes, -1 otherwise.

    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:589
  • +
    + +

    Returns number

    The worker node key if the worker id is found in the pool worker nodes, -1 otherwise.

    +
  • Defined in src/pools/abstract-pool.ts:601
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:1363
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:1349
  • +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:703
  • +
  • Defined in src/pools/abstract-pool.ts:847
  • +
    + +

    Returns void

    -
    - -
    +
    + +
    +

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:1450
  • +
    +
    +
    + + +
    +

    Parameters

    +
      +
    • +
      workerNodeKey: number
      +

      The worker node key.

      +

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:1180
  • +
    + +

    Returns void

    +
    +
  • Defined in src/pools/abstract-pool.ts:1187
  • +
    + +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:653
  • +
    + +
    +Optional

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:608
  • +

    Returns void

    -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:627
  • +
  • Defined in src/pools/abstract-pool.ts:840
  • +
  • Defined in src/pools/abstract-pool.ts:1030
  • +
    + +
    +
    + +
    +
    + +
    +
    + +

    Returns number

    +
  • Defined in src/pools/abstract-pool.ts:1497
  • +
    + +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:973
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:946
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:928
  • +
    + +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:960
  • +
  • Defined in src/pools/abstract-pool.ts:1329
  • -

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file