X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicClusterPool.html;h=10e968f8a809e4966a607183ffab07d4170bbe17;hb=0e502832d98443e291ea5558423ca0de86b96e13;hp=b90c3a725abe82b09f7ffa2e2f6719a1e384244c;hpb=c7e01b67847217903200f2453a4ffd4ba6bb191a;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index b90c3a72..10e968f8 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -1,13 +1,13 @@ -DynamicClusterPool | poolifier - v2.6.22
+DynamicClusterPool | poolifier - v2.6.42
-
+
  • The search index is not available
  • poolifier - v2.6.42 +
    @@ -45,21 +45,21 @@ When the maximum number of workers is reached and workers are busy, an event is
    • DynamicClusterPool
    +
  • Defined in src/pools/cluster/dynamic.ts:15
  • - +

    Constructors

    -

    Properties

    -
    emitter? +
    emitter? filePath -max +max numberOfWorkers opts promiseResponseMap @@ -68,10 +68,10 @@ When the maximum number of workers is reached and workers are busy, an event is

    Accessors

    -
    busy +
    busy full info -maxSize +maxSize minSize ready type @@ -80,7 +80,7 @@ When the maximum number of workers is reached and workers are busy, an event is

    Methods

    -
    afterTaskExecutionHook +
    afterTaskExecutionHook afterWorkerNodeSetup beforeTaskExecutionHook checkDynamicPoolSize @@ -93,9 +93,12 @@ When the maximum number of workers is reached and workers are busy, an event is execute flushTasksQueue getWorkerInfo +hasWorkerNodeBackPressure internalBusy isMain +listTaskFunctions registerWorkerMessageListener +sendKillMessageToWorker sendStartupMessageToWorker sendToWorker setTasksQueueOptions @@ -107,7 +110,7 @@ When the maximum number of workers is reached and workers are busy, an event is

    Constructors

    - +
    +
  • Defined in src/pools/cluster/dynamic.ts:27
  • Properties

    @@ -156,17 +159,19 @@ When the maximum number of workers is reached and workers are busy, an event is

    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:68
  • filePath: string
    @@ -175,15 +180,16 @@ When the maximum number of workers is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:117
  • +
    max: number

    Maximum number of workers that can be created by this pool.

    +
  • Defined in src/pools/cluster/dynamic.ts:29
  • numberOfWorkers: number
    @@ -192,7 +198,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:116
  • @@ -201,7 +207,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/fixed.ts:47
  • promiseResponseMap: Map<string, PromiseResponseWrapper<Response>> = ...
    @@ -215,7 +221,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:78
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -224,16 +230,16 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:84
  • - +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -248,7 +254,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/dynamic.ts:43
    • @@ -261,7 +267,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:689
    • @@ -273,19 +279,19 @@ When the maximum number of workers is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:350
  • +
    -
      +
      • get maxSize(): number
      • The pool maximum size.

        Returns number

    +
  • Defined in src/pools/abstract-pool.ts:562
    • @@ -297,7 +303,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:555
    • @@ -309,7 +315,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:507
    • @@ -322,7 +328,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/dynamic.ts:38
    • @@ -335,7 +341,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:524
    • @@ -347,7 +353,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/fixed.ts:119
  • Methods

    @@ -375,7 +381,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:888
  • +
  • Defined in src/pools/abstract-pool.ts:1162
  • +
  • Defined in src/pools/abstract-pool.ts:858
  • +
  • Defined in src/pools/abstract-pool.ts:187
  • +
  • Defined in src/pools/abstract-pool.ts:1105
  • +
  • Defined in src/pools/abstract-pool.ts:1061
  • +
  • Defined in src/pools/cluster/fixed.ts:109
  • +
  • Defined in src/pools/abstract-pool.ts:803
  • +
  • Defined in src/pools/cluster/fixed.ts:63
    • -

      Enables/disables the worker tasks queue in this pool.

      +

      Enables/disables the worker node tasks queue in this pool.

      Parameters

      • enable: boolean
        -

        Whether to enable or disable the worker tasks queue.

        +

        Whether to enable or disable the worker node tasks queue.

      • Optional tasksQueueOptions: TasksQueueOptions
        -

        The worker tasks queue options.

        +

        The worker node tasks queue options.

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:643
    • - +
    • Executes the specified function in the worker constructor with the task data input parameter.

      @@ -547,12 +553,17 @@ Can be overridden.

      • Optional data: Data
        -

        The task input data for the specified task function. This can only be structured-cloneable data.

        +

        The optional task input data for the specified task function. This can only be structured-cloneable data.

      • Optional name: string
        -

        The name of the task function to execute. If not specified, the default task function will be executed.

        +

        The optional name of the task function to execute. If not specified, the default task function will be executed.

        +
        +
      • +
      • +
        Optional transferList: TransferListItem[]
        +

        An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the pool's worker_threads worker and they should not be used in the main thread afterwards.

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    @@ -560,7 +571,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:747
  • +
  • Defined in src/pools/abstract-pool.ts:1491
  • +
  • Defined in src/pools/abstract-pool.ts:1407
  • +
    + +
      + +
    • Internal +

      Whether the worker node has back pressure (i.e. its tasks queue is full).

      +
      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      +

      Returns boolean

      true if the worker node has back pressure, false otherwise.

      + +
    • -

      Whether worker nodes are executing at least one task.

      +

      Whether worker nodes are executing concurrently their tasks quota or not.

      Returns boolean

      Worker nodes busyness boolean status.

    +
  • Defined in src/pools/abstract-pool.ts:705
  • +
  • Defined in src/pools/cluster/fixed.ts:58
  • +
    + +
    +
  • Defined in src/pools/cluster/fixed.ts:101
  • +
    + +
    +
  • Defined in src/pools/cluster/fixed.ts:93
  • +
  • Defined in src/pools/cluster/fixed.ts:85
  • +
  • Defined in src/pools/abstract-pool.ts:655
  • +
  • Defined in src/pools/abstract-pool.ts:610
  • +
  • Defined in src/pools/abstract-pool.ts:629
  • +
  • Defined in src/pools/cluster/fixed.ts:53
  • +
  • Defined in src/pools/abstract-pool.ts:1321
  • @@ -835,7 +896,7 @@ Can be overridden.

  • constructor
  • emitter
  • filePath
  • -
  • max
  • +
  • max
  • numberOfWorkers
  • opts
  • promiseResponseMap
  • @@ -844,7 +905,7 @@ Can be overridden.

  • busy
  • full
  • info
  • -
  • maxSize
  • +
  • maxSize
  • minSize
  • ready
  • type
  • @@ -863,9 +924,12 @@ Can be overridden.

  • execute
  • flushTasksQueue
  • getWorkerInfo
  • +
  • hasWorkerNodeBackPressure
  • internalBusy
  • isMain
  • +
  • listTaskFunctions
  • registerWorkerMessageListener
  • +
  • sendKillMessageToWorker
  • sendStartupMessageToWorker
  • sendToWorker
  • setTasksQueueOptions
  • @@ -874,67 +938,30 @@ Can be overridden.

  • setupHook
  • workerListener
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file