implicit final class WorkerEvents extends AnyVal
Worker Events and Extensions
- Alphabetic
- By Inheritance
- WorkerEvents
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
onDisconnect(callback: () ⇒ Any): Worker
Similar to the cluster.on('disconnect') event, but specific to this worker.
Similar to the cluster.on('disconnect') event, but specific to this worker.
- callback
the event handler
- Annotations
- @inline()
-
def
onError(callback: (Error) ⇒ Any): Worker
This event is the same as the one provided by child_process.fork().
This event is the same as the one provided by child_process.fork(). In a worker you can also use process.on('error').
- callback
the error handler
- Annotations
- @inline()
-
def
onExit(callback: (Worker, Int, String) ⇒ Any): Worker
Similar to the cluster.on('exit') event, but specific to this worker.
Similar to the cluster.on('exit') event, but specific to this worker.
- callback
the callback <il>worker <Worker> the worker
- code <Number> the exit code, if it exited normally.
- signal <String> the name of the signal (eg. 'SIGHUP') that caused the process to be killed.
- Annotations
- @inline()
-
def
onListening(callback: (Address) ⇒ Any): Worker
Similar to the cluster.on('listening') event, but specific to this worker.
Similar to the cluster.on('listening') event, but specific to this worker.
- callback
the event handler
- Annotations
- @inline()
-
def
onMessage(callback: (Message) ⇒ Any): Worker
Similar to the cluster.on('message') event, but specific to this worker.
Similar to the cluster.on('message') event, but specific to this worker. This event is the same as the one provided by child_process.fork(). In a worker you can also use process.on('message').
- callback
the event handler
- Annotations
- @inline()
-
def
onOnline(callback: () ⇒ Any): Worker
Similar to the cluster.on('online') event, but specific to this worker.
Similar to the cluster.on('online') event, but specific to this worker.
- callback
the event handler
- Annotations
- @inline()
-
def
sendFuture[T](message: Message): Future[T]
Send a message to a worker or master, optionally with a handle.
Send a message to a worker or master, optionally with a handle. In the master this sends a message to a specific worker. It is identical to ChildProcess.send(). In a worker this sends a message to the master. It is identical to process.send().
- Annotations
- @inline()
worker.send(message[, sendHandle][, callback])
Example: -
def
toString(): String
- Definition Classes
- Any