X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=d01ac89f93063843087ec0adbbed184d06ff3d76;hb=51e49c70379025e6709ae33e5cb4bf91b22ccc41;hp=b6d8cb5acad59756a7e71ab5d714255e88757832;hpb=7ab352a62ac2ae168541b47090e4085a28952f07;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index b6d8cb5a..d01ac89f 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -1,13 +1,13 @@ -ClusterWorker | poolifier - v2.6.37
+ClusterWorker | poolifier - v2.7.1
-
+
  • The search index is not available
  • poolifier - v2.7.1 +
    @@ -47,19 +47,19 @@ but the minimum number of workers will be guaranteed.

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

    Constructors

    -

    Properties

    -
    activeInterval? +
    activeInterval? isMain lastTaskTimestamp opts @@ -68,11 +68,11 @@ but the minimum number of workers will be guaranteed.

    Accessors

    -
    id +

    Methods

    -
    addTaskFunction +
    addTaskFunction asyncId bind emitDestroy @@ -80,15 +80,16 @@ but the minimum number of workers will be guaranteed.

    handleError handleKillMessage handleReadyMessage +handleTaskFunctionOperationMessage hasTaskFunction -listTaskFunctions +listTaskFunctionNames messageListener removeTaskFunction run runAsync runInAsyncScope runSync -sendTaskFunctionsListToMainWorker +sendTaskFunctionNamesToMainWorker sendToMainWorker setDefaultTaskFunction triggerAsyncId @@ -97,7 +98,7 @@ but the minimum number of workers will be guaranteed.

    Constructors

    - +
    • @@ -116,16 +117,18 @@ but the minimum number of workers will be guaranteed.

    • taskFunctions: TaskFunction<Data, Response> | TaskFunctions<Data, Response>

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

      -
    • +
    +
  • opts: WorkerOptions = {}

    Options for the worker.

    -
  • +
    +

    Returns ClusterWorker<Data, Response>

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

    @@ -136,7 +139,7 @@ but the minimum number of workers will be guaranteed.

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

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

    +
  • Defined in src/worker/abstract-worker.ts:71
  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS
    @@ -163,7 +166,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:94
  • statistics: WorkerStatistics
    @@ -172,7 +175,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:75
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -181,7 +184,7 @@ but the minimum number of workers will be guaranteed.

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

    @@ -195,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.

      @@ -212,23 +215,19 @@ If a task function with the same name already exists, it is replaced.

    • name: string

      The name of the task function to add.

      -
    • +
    +
  • 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 or an empty 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.

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

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

    The error message.

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

    Returns void

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

    Returns void

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

    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 or an empty string.

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

    Returns void

    +
  • 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 or an empty 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
  • + +

    Returns void

    -
    -

    Throws

    https://nodejs.org/api/errors.html#class-error If the task function is not found.

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:555
  • Optional thisArg: This

    The receiver to be used for the function call.

    -
    Optional
  • + +
  • Rest ...args: any[]

    Optional arguments to pass to the function.

    -
    Rest
  • + +

    Returns Result

    Since

    v9.6.0

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

    Returns void

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

    Returns boolean

    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 or an empty 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 default task function was set or not.

    -

    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.2/node_modules/@types/node/async_hooks.d.ts:312
  • +
    Optional thisArg: ThisArg

    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:278
  • @@ -689,85 +707,45 @@ then restore the original execution context.

  • handleError
  • handleKillMessage
  • handleReadyMessage
  • +
  • handleTaskFunctionOperationMessage
  • hasTaskFunction
  • -
  • listTaskFunctions
  • +
  • listTaskFunctionNames
  • messageListener
  • removeTaskFunction
  • run
  • runAsync
  • runInAsyncScope
  • runSync
  • -
  • sendTaskFunctionsListToMainWorker
  • +
  • sendTaskFunctionNamesToMainWorker
  • sendToMainWorker
  • setDefaultTaskFunction
  • triggerAsyncId
  • bind
  • +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file