Class

io.scalajs.nodejs.cluster

WorkerEvents

Related Doc: package cluster

Permalink

implicit final class WorkerEvents extends AnyVal

Worker Events and Extensions

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

Instance Constructors

  1. new WorkerEvents(worker: Worker)

    Permalink

    worker

    the given worker

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  7. def onDisconnect(callback: () ⇒ Any): worker.type

    Permalink

    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.type

    Permalink

    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.type

    Permalink

    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.type

    Permalink

    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.type

    Permalink

    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.type

    Permalink

    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): Promise[T]

    Permalink

    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

    Permalink
    Definition Classes
    Any
  15. val worker: Worker

    Permalink

    the given worker

Inherited from AnyVal

Inherited from Any

Ungrouped