Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClusterProcessChild

Hierarchy

  • EventSpewer
    • ClusterProcessChild

Implements

  • EventEmitter

Index

Constructors

constructor

Properties

_shardsIdentifying

_shardsIdentifying: BaseSet<number> = new BaseSet<number>()

cluster

cluster: ClusterClient

clusterCount

clusterCount: number = 1

clusterId

clusterId: number = -1

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

broadcastEval

  • broadcastEval(code: Function | string, ...args: any[]): Promise<Array<any>>
  • Parameters

    • code: Function | string
    • Rest ...args: any[]

    Returns Promise<Array<any>>

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

hasEventListener

  • hasEventListener(name: string | symbol): boolean
  • Parameters

    • name: string | symbol

    Returns boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • on(event: "ipc", listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

  • Parameters

    • event: "ipc"
    • listener: function
        • (message: any): any
        • Parameters

          • message: any

          Returns any

    Returns this

onMessage

  • onMessage(message: IPCMessage | any): Promise<void>
  • Parameters

    Returns Promise<void>

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(name?: string | symbol): this
  • Parameters

    • Optional name: string | symbol

    Returns this

removeAllSubscriptions

  • removeAllSubscriptions(): this
  • Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

removeSubscription

  • removeSubscription(subscription: EventSubscription): void
  • Parameters

    • subscription: EventSubscription

    Returns void

send

  • Parameters

    Returns Promise<void>

sendIPC

  • sendIPC(op: number, data?: any, request?: boolean, shard?: undefined | number): Promise<void>
  • Parameters

    • op: number
    • Default value data: any = null
    • Default value request: boolean = false
    • Optional shard: undefined | number

    Returns Promise<void>

sendIPCOrWarn

  • sendIPCOrWarn(op: number, data?: any, request?: boolean, shard?: undefined | number): Promise<void>
  • Parameters

    • op: number
    • Default value data: any = null
    • Default value request: boolean = false
    • Optional shard: undefined | number

    Returns Promise<void>

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

subscribe

  • subscribe(name: string | symbol, listener: function): EventSubscription
  • Parameters

    • name: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventSubscription

Generated using TypeDoc