X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FAbstractWorker.html;h=83823ef34f77b0afa3518d50743409132d3fdc02;hb=1639315e9fcda007015bad70bd480f7c8cd68669;hp=2fe528e337366b26aeb513f8e8db91df4d8e80f0;hpb=3db479d12e6d8dff22ca35537d96af8d6830ff13;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 2fe528e3..83823ef3 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -
Task function(s) processed by the worker when the pool's execution
function is invoked. The first function is the default function.
Reference to main worker.
Reference to main worker.
+Task function(s) processed by the worker when the pool's execution
function is invoked. The first function is the default function.
Options for the worker.
Protected
Abstract
idProtected
Readonly
isProtected
lastProtected
Readonly
mainPrivate
Readonly
mainReference to main worker.
Protected
Readonly
optsProtected
optsOptions for the worker.
Protected
statisticsProtected
taskTask function(s) processed by the worker when the pool's execution
function is invoked.
Adds a task function to the worker. If a task function with the same name already exists, it is replaced.
@@ -234,21 +239,15 @@ If a task function with the same name already exists, it is replaced.The task function to add.
Whether the task function was added or not.
+Whether the task function was added or not.
-https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the default task function reserved name.
https://nodejs.org/api/errors.html#class-typeerror If the fn
parameter is not a function.
Inherited from AsyncResource.asyncId
Private
beginOptional
name: stringInherited from AsyncResource.bind
Private
checkPrivate
checkCheck if the message worker id is set and matches the worker id.
+The message to check.
+https://nodejs.org/api/errors.html#class-error If the message worker id is not set or does not match the worker id.
+Private
checkPrivate
checkChecks if the taskFunctions
parameter is passed to the constructor.
Checks if the taskFunctions
parameter is passed to the constructor and valid.
The task function(s) parameter that should be checked.
Private
checkInherited from AsyncResource.emitDestroy
Private
endProtected
getReference to the main worker.
-https://nodejs.org/api/errors.html#class-error If the main worker is not set.
+Private
getProtected
handleGets the task function with the given name.
+Handles an error and convert it to a string so it can be sent back to the main worker.
Optional
name: stringName of the task function that will be returned.
+The error raised by the worker.
The task function.
+The error message.
-https://nodejs.org/api/errors.html#class-error If the task function is not found.
-Protected
handleProtected
handleHandles an error and convert it to a string so it can be sent back to the main worker.
+Handles a kill message sent by the main worker.
The error raised by the worker.
+Protected
Abstract
handleHandles the ready message sent by the main worker.
+The ready message.
The error message.
- +Protected
handleChecks if the worker has a task function with the given name.
The name of the task function to check.
Whether the worker has a task function with the given name or not.
+Whether the worker has a task function with the given name or not.
-https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
Lists the names of the worker's task functions.
+The names of the worker's task functions.
+ +Protected
messageThe received message.
Removes a task function from the worker.
The name of the task function to remove.
Whether the task function existed and was removed or not.
+Whether the task function existed and was removed or not.
-https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the default task function reserved name.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the task function used as default task function.
Protected
runhttps://nodejs.org/api/errors.html#class-error If the task function is not found.
-Protected
runTask function that will be executed.
Inherited from AsyncResource.runInAsyncScope
Protected
runTask function that will be executed.
Protected
sendProtected
sendSends to the main worker the ready response.
+Sends task function names to the main worker.
Protected
Abstract
sendSends a message to the main worker.
+Sends a message to main worker.
Sets the default task function to use when no task function name is specified.
+Sets the default task function to use in the worker.
The name of the task function to use as default task function.
Whether the default task function was set or not.
- -https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the default task function reserved name.
Whether the default task function was set or not.
-https://nodejs.org/api/errors.html#class-error If the name
parameter is a non-existing task function.
Private
startPrivate
stopInherited from AsyncResource.triggerAsyncId
Private
updateStatic
bindInherited from AsyncResource.bind
Generated using TypeDoc
Generated using TypeDoc
+ \ No newline at end of file
Constructs a new poolifier worker.