X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=c2b001efaf9942a9d454ebe680ec8d8606d640f9;hb=9d96ba4ea0e2e4b06216657cb1641551b59f58ee;hp=a9feb333004fa17d029dc89a17d439e0ee077f48;hpb=3e406edee2c758263a2e8d8bbbaaeff951a3db7a;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index a9feb333..c2b001ef 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -1,13 +1,13 @@ -ClusterWorker | poolifier - v2.6.12
+ClusterWorker | poolifier - v2.7.4
-
+
  • The search index is not available
  • poolifier - v2.7.4 +
    @@ -47,54 +47,58 @@ but the minimum number of workers will be guaranteed.

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

    Constructors

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

    -
    - -
    aliveInterval?: Timeout
    -

    Handler id of the aliveInterval worker alive check.

    +
    + +
    activeInterval?: Timeout
    +

    Handler id of the activeInterval worker activity check.

    +
  • Defined in src/worker/abstract-worker.ts:79
  • isMain: boolean
    @@ -144,7 +148,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:91
  • lastTaskTimestamp: number
    @@ -153,25 +157,16 @@ but the minimum number of workers will be guaranteed.

    -
    - -
    mainWorker: 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
    @@ -180,16 +175,16 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:75
  • -
    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

    @@ -203,13 +198,13 @@ but the minimum number of workers will be guaranteed.

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

      - +
    • Adds a task function to the worker. If a task function with the same name already exists, it is replaced.

      @@ -223,22 +218,16 @@ If a task function with the same name already exists, it is replaced.

    • -
      fn: WorkerFunction<Data, Response>
      +
      fn: TaskFunction<Data, Response>

      The task function to add.

    -

    Returns boolean

    Whether the task function was added or not.

    - -
    -

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string.

    - -

    Throws

    https://nodejs.org/api/errors.html#class-error If the name parameter is the default task function reserved name.

    +

    Returns TaskFunctionOperationResult

    Whether the task function was added or not.

    -

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the fn parameter is not a function.

    -
      @@ -249,7 +238,7 @@ If a task function with the same name already exists, it is replaced.

    +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:315
    • @@ -276,7 +265,7 @@ If a task function with the same name already exists, it is replaced.

    +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:288
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:311
  • Returns Worker

    Reference to the main worker.

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

    Returns boolean

    Whether the worker has a task function with the given name or not.

    +

    Returns TaskFunctionOperationResult

    Whether the worker has a task function with the given name or not.

    -
    -

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string.

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

    Returns boolean

    Whether the task function existed and was removed or not.

    - -
    -

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string.

    - -

    Throws

    https://nodejs.org/api/errors.html#class-error If the name parameter is the default task function reserved name.

    +

    Returns TaskFunctionOperationResult

    Whether the task function existed and was removed or not.

    -

    Throws

    https://nodejs.org/api/errors.html#class-error If the name parameter is the task function used as default task function.

    -
    +
  • Defined in src/worker/abstract-worker.ts:214
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:555
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:299
  • +
  • Defined in src/worker/abstract-worker.ts:521
  • +
    + +
    +
  • Defined in src/worker/cluster-worker.ts:68
  • -

    Returns boolean

    Whether the default task function was set or not.

    +

    Returns TaskFunctionOperationResult

    Whether the default task function was set or not.

    -
    -

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string.

    - -

    Throws

    https://nodejs.org/api/errors.html#class-error If the name parameter is the default task function reserved name.

    - -

    Throws

    https://nodejs.org/api/errors.html#class-error If the name parameter is a non-existing task function.

    -
    +
  • Defined in src/worker/abstract-worker.ts:270
  • -
    - -
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:319
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:278
  • @@ -628,10 +692,9 @@ then restore the original execution context.

    +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file