X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicClusterPool.html;h=e27ae5eda86ac56158af4280a219e76c1938e18a;hb=23a6c28d3cc6edb778653a4d9d9a4d36f9a961c3;hp=01a9f721bae7aef3aadbd8b20afa73c63e88dbb3;hpb=c914a50e9996ca3f869c130974bff87b117f70f5;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index 01a9f721..e27ae5ed 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -1,4 +1,4 @@ -DynamicClusterPool | poolifier - v2.6.9
+DynamicClusterPool | poolifier - v2.6.20
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.9
+
  • The search index is not available
  • poolifier - v2.6.20
    @@ -45,7 +45,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    • DynamicClusterPool
    +
  • Defined in src/pools/cluster/dynamic.ts:15
  • @@ -74,7 +74,6 @@ When the maximum number of workers is reached and workers are busy, an event is maxSize minSize ready -starting type utilization worker @@ -82,18 +81,22 @@ When the maximum number of workers is reached and workers are busy, an event is

    Methods

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

    @@ -154,7 +157,7 @@ When the maximum number of workers is reached and workers are busy, an event is

    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 maximum size expected and are ready.
    • +
    • '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.
    • 'error': Emitted when an uncaught error occurs.
    • 'taskError': Emitted when an error occurs while executing a task.
    • @@ -163,7 +166,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:64
  • filePath: string
    @@ -172,7 +175,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:104
  • max: number
    @@ -180,7 +183,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/dynamic.ts:29
  • numberOfWorkers: number
    @@ -189,7 +192,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:103
  • @@ -198,11 +201,11 @@ 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<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.
    • @@ -212,7 +215,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:74
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -221,7 +224,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:80
  • workerNodes: IWorkerNode<Worker, Data>[] = []
    @@ -230,7 +233,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:61
  • Accessors

    @@ -245,7 +248,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/dynamic.ts:48
    • @@ -258,7 +261,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:602
    • @@ -270,93 +273,87 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:301
    • get maxSize(): number
    • -

      Pool maximum size.

      +

      The pool maximum size.

      Returns number

    +
  • Defined in src/pools/cluster/dynamic.ts:43
    • get minSize(): number
    • -

      Pool minimum size.

      +

      The pool minimum size.

      Returns number

    +
  • Defined in src/pools/cluster/fixed.ts:120
    • get ready(): boolean
    • -

      Returns boolean

    -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:440
    • get type(): "fixed" | "dynamic"
    • -

      Pool type.

      +

      The pool type.

      If it is 'dynamic', it provides the max property.

      Returns "fixed" | "dynamic"

    +
  • Defined in src/pools/cluster/dynamic.ts:38
    • get utilization(): number
    • -

      Gets the approximate pool utilization.

      +

      The approximate pool utilization.

      Returns number

      The pool utilization.

    +
  • Defined in src/pools/abstract-pool.ts:457
    • get worker(): "cluster" | "thread"
    • -

      Gets the worker type.

      +

      The worker type.

      Returns "cluster" | "thread"

    +
  • Defined in src/pools/cluster/fixed.ts:115
  • Methods

      - +
    • Hook executed after the worker task execution. Can be overridden.

      @@ -365,8 +362,8 @@ Can be overridden.

      Parameters

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

      Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes. +

      Method hooked up after a worker node has been newly created. Can be overridden.

      Parameters

      • -
        worker: Worker
        -

        The newly created worker.

        +
        workerNodeKey: number
        +

        The newly created worker node key.

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:947
  • +
  • Defined in src/pools/abstract-pool.ts:697
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:173
  • +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:896
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:856
  • +
  • Defined in src/pools/cluster/fixed.ts:105
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:660
  • +
    +
    +
  • Defined in src/pools/cluster/fixed.ts:63
  • +
  • Defined in src/pools/abstract-pool.ts:567
  • +
  • Defined in src/pools/abstract-pool.ts:628
  • +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:618
  • +
  • Defined in src/pools/cluster/fixed.ts:58
  • +
    + +
      + +
    • +

      Registers a listener callback on the worker given its worker node key.

      +
      +
      +

      Type Parameters

      +
        +
      • +

        Message

      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      • +
      • +
        listener: ((message) => void)
        +

        The message listener callback.

        +
        +
        +
          +
        • +
            +
          • (message): void
          • +
          • +
            +

            Parameters

            +
            +

            Returns void

      +

      Returns void

      +
    +
    + +
      - +
    • -

      Sends a message to the given worker.

      +

      Sends a message to worker given its worker node key.

      Parameters

    +
  • Defined in src/pools/cluster/fixed.ts:81
  • +
  • Defined in src/pools/abstract-pool.ts:579
  • +
  • Defined in src/pools/abstract-pool.ts:537
  • +
  • Defined in src/pools/abstract-pool.ts:556
  • +
  • Defined in src/pools/cluster/fixed.ts:53
    • -

      This function is the listener registered for each worker message.

      +

      This method is the listener registered for each worker message.

      Returns ((message) => void)

      The listener function to execute when a message is received from a worker.

      @@ -706,7 +799,7 @@ Can be overridden.

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