X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=d01ac89f93063843087ec0adbbed184d06ff3d76;hb=51e49c70379025e6709ae33e5cb4bf91b22ccc41;hp=58b9e508201371739be81acdaf23b08cc610c336;hpb=dea288f11483ea6c15807b20e4c621483c7fa5af;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index 58b9e508..d01ac89f 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -1,13 +1,13 @@ -ClusterWorker | poolifier
+ClusterWorker | poolifier - v2.7.1
-
+
  • The search index is not available
  • poolifier - v2.7.1 +
    @@ -21,22 +21,25 @@ it will send a termination request to its main worker.

    If you use a DynamicClusterPool the extra workers that were created will be terminated, but the minimum number of workers will be guaranteed.

    +
    +
    +

    Author

    Christopher Quadflieg

    -

    Author

    Christopher Quadflieg

    - -

    Since

    2.0.0

    +

    Since

    2.0.0

    Type Parameters

    • Data = unknown

      -

      Type of data this worker receives from pool's execution. This can only be serializable data.

      -
    • +

      Type of data this worker receives from pool's execution. This can only be structured-cloneable data.

      +
      +
    • Response = unknown

      -

      Type of response the worker sends back to the main worker. This can only be serializable data.

      -
    +

    Type of response the worker sends back to the main worker. This can only be structured-cloneable data.

    +
    +

    Hierarchy

      @@ -44,47 +47,60 @@ but the minimum number of workers will be guaranteed.

      • ClusterWorker
    +
  • Defined in src/worker/cluster-worker.ts:21
  • - +

    Constructors

    - +
      - +
    • Constructs a new poolifier cluster worker.

      @@ -99,88 +115,136 @@ but the minimum number of workers will be guaranteed.

      Parameters

    +
  • opts: WorkerOptions = {}

    Options for the worker.

    -
  • -

    Returns ClusterWorker<Data, Response>

    Properties

    -
    - -
    aliveInterval?: Timeout
    -

    Handler id of the aliveInterval worker alive check.

    -
    - +
    isMain: boolean

    Whether this is the main worker or not.

    -
    +
  • Defined in src/worker/abstract-worker.ts:91
  • - +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    -
    -
    - -
    mainWorker: undefined | null | Worker
    -

    Reference to main worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:71
  • - -
    opts: WorkerOptions = ...
    + +
    opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

    Options for the worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:94
  • +
    + +
    statistics: WorkerStatistics
    +

    Performance statistics computation requirements.

    +
    +
    - -
    taskFunctions: Map<string, WorkerFunction<Data, Response>>
    + +
    taskFunctions: Map<string, TaskFunction<Data, Response>>

    Task function(s) processed by the worker when the pool's execution function is invoked.

    -
    +
  • Defined in src/worker/abstract-worker.ts:67
  • +
    +

    Accessors

    +
    + +

    Methods

    +
    + +
    - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:307
  • - + -

    Returns Func

    -
    - - +

    Returns Func

    +
    +

    Since

    v14.8.0, v12.19.0

    +
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:284
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:303
  • - +
    -
    - -
    +
    + + +

    Returns string

    The error message.

    + +
    +
    + +
    +
    + +
    +
  • Defined in src/worker/cluster-worker.ts:45
  • +
    + +
    +
    + +
    +
    + +
    - + +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:306
  • +
    + +
    +
    + +
    - + +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:555
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:295
  • - + +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:521
  • +
    + +
    - + +

    Returns void

    +
    +
  • Defined in src/worker/cluster-worker.ts:68
  • +
    + +
    - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:312
  • - + -

    Returns Func

    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:278
  • -

    On This Page

    +

    On This Page

    +
  • constructor
  • +
  • activeInterval
  • +
  • isMain
  • +
  • lastTaskTimestamp
  • +
  • opts
  • +
  • statistics
  • +
  • taskFunctions
  • +
  • id
  • +
  • addTaskFunction
  • +
  • asyncId
  • +
  • bind
  • +
  • emitDestroy
  • +
  • getMainWorker
  • +
  • handleError
  • +
  • handleKillMessage
  • +
  • handleReadyMessage
  • +
  • handleTaskFunctionOperationMessage
  • +
  • hasTaskFunction
  • +
  • listTaskFunctionNames
  • +
  • messageListener
  • +
  • removeTaskFunction
  • +
  • run
  • +
  • runAsync
  • +
  • runInAsyncScope
  • +
  • runSync
  • +
  • sendTaskFunctionNamesToMainWorker
  • +
  • sendToMainWorker
  • +
  • setDefaultTaskFunction
  • +
  • triggerAsyncId
  • +
  • bind
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file