Packages

implicit final class WorkerEvents extends AnyVal

Worker Events and Extensions

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WorkerEvents
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new WorkerEvents(worker: Worker)

    worker

    the given worker

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  7. 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()
  8. 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()
  9. 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()
  10. 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()
  11. 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()
  12. 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()
  13. 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()
    Example:
    1. worker.send(message[, sendHandle][, callback])

  14. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped