X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=b37bc3fbf9b1e9e5efef60264d54b2eb9137e9ac;hb=7ef6859d79e3a30918f2c53c898e94cd22104622;hp=5384f9a72a45fa9b228a6e29c183d67ff45b1d3b;hpb=fb8fbcfd7983c1eadc39411c9b29054e6fa97d5b;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 5384f9a7..b37bc3fb 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,13 +1,13 @@ -FixedThreadPool | poolifier - v2.6.28
+FixedThreadPool | poolifier - v3.0.0
-
+
  • The search index is not available
  • poolifier - v3.0.0 +
    @@ -45,20 +45,21 @@ +
  • Defined in src/pools/thread/fixed.ts:35
  • - +

    Constructors

    - +
    +
  • Defined in src/pools/thread/fixed.ts:46
  • Properties

    - -
    emitter?: PoolEmitter
    -

    Emitter on which events can be listened to.

    + +
    emitter?: EventEmitterAsyncResource
    +

    Event emitter integrated with async resource on which events can be listened to. +The async tracking tooling identifier is poolifier:<PoolType>-<WorkerType>-pool.

    Events that can currently be listened to:

    • '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.
    • +
    • '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:73
  • filePath: string
    @@ -172,7 +182,16 @@
    +
  • Defined in src/pools/abstract-pool.ts:128
  • +
    + +
    max?: number
    +

    Dynamic pool maximum size property placeholder.

    +
    +
    numberOfWorkers: number
    @@ -181,7 +200,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:127
  • @@ -190,11 +209,11 @@
    +
  • Defined in src/pools/thread/fixed.ts:49
  • promiseResponseMap: Map<string, PromiseResponseWrapper<Response>> = ...
    -

    The task execution response promise map.

    +

    The task execution response promise map:

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

    Pool worker nodes.

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

    @@ -237,7 +256,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:154
  • +
  • Defined in src/pools/abstract-pool.ts:651
  • -
    +
  • Defined in src/pools/abstract-pool.ts:271
  • +
    -
      +
      • get maxSize(): number
      • The pool maximum size.

        Returns number

    -
    +
  • Defined in src/pools/abstract-pool.ts:484
  • +
    -
      +
      • get minSize(): number
      • The pool minimum size.

        Returns number

    +
  • Defined in src/pools/abstract-pool.ts:477
  • +
  • Defined in src/pools/abstract-pool.ts:429
  • +
  • Defined in src/pools/thread/fixed.ts:144
  • +
  • Defined in src/pools/abstract-pool.ts:446
  • +
  • Defined in src/pools/thread/fixed.ts:149
  • Methods

    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1033
  • +
  • Defined in src/pools/abstract-pool.ts:1344
  • -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:1003
  • +
  • Defined in src/pools/abstract-pool.ts:1250
  • +
  • Defined in src/pools/abstract-pool.ts:1206
  • +
  • Defined in src/pools/thread/fixed.ts:136
  • +
    + +
      + +
    • +

      Deregisters 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

      +
    +
  • Defined in src/pools/abstract-pool.ts:940
  • +
  • Defined in src/pools/thread/fixed.ts:60
    • -

      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:565
  • +
  • Defined in src/pools/abstract-pool.ts:870
  • +
  • Defined in src/pools/abstract-pool.ts:1666
  • +
  • Defined in src/pools/abstract-pool.ts:1582
  • +
    + +
      + +
    • +

      Whether the specified task function exists in this pool.

      +
      +
      +

      Parameters

      +
        +
      • +
        name: string
        +

        The name of the task function.

        +
        +
      +

      Returns boolean

      true if the task function exists, false otherwise.

      + +
    +
    + +
      + +
    • 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.

      + +
    +
  • Defined in src/pools/abstract-pool.ts:667
  • -
    - +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    +
    +
    + +
      + +
    • +

      Registers once 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

      +
    +
  • Defined in src/pools/thread/fixed.ts:116
  • +
  • Defined in src/pools/thread/fixed.ts:106
  • +
    + +
      + +
    • +

      Removes a task function from this pool.

      +
      +
      +

      Parameters

      +
        +
      • +
        name: string
        +

        The name of the task function.

        +
        +
      +

      Returns Promise<boolean>

      true if the task function was removed, false otherwise.

      + +
      - +
    • Parameters

      • -
        workerNodeKey: number
      • -
      • -
        workerId: number
      +
      workerNodeKey: number

    Returns Promise<void>

    +
  • Defined in src/pools/abstract-pool.ts:951
  • +
  • Defined in src/pools/thread/fixed.ts:91
  • +
  • Defined in src/pools/thread/fixed.ts:77
  • +
    + +
      + +
    • +

      Sets the default task function in this pool.

      +
      +
      +

      Parameters

      +
        +
      • +
        name: string
        +

        The name of the task function.

        +
        +
      +

      Returns Promise<boolean>

      true if the default task function was set, false otherwise.

      + +
    +
  • Defined in src/pools/abstract-pool.ts:579
  • +
  • Defined in src/pools/abstract-pool.ts:532
  • +
  • Defined in src/pools/abstract-pool.ts:551
  • -
    - -
    +
    + +
      +
    • -

      This method is the listener registered for each worker message.

      +

      Starts the minimum number of workers in this pool.

      -

      Returns ((message) => void)

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

      - -
    +
    + +
      +
    • -

      This method is the listener registered for each worker message.

      +

      This method is the message listener registered on each worker.

      Parameters

      -

      Returns void

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

      - -
    +

    Returns void

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

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file