Class System<T>

Type Parameters

Implements

Constructors

Properties

components: T
graph: DGraph<keyof T>
specs: SystemSpecs<T>
topology: (keyof T)[]

Methods

  • Calls ILifecycle.stop on the n first items in given topo array (in reverse order).

    Parameters

    • topo: (keyof T)[]
    • n: number = topo.length

    Returns Promise<boolean>

  • Builds the system component dependency graph and initializes all components using their async SystemSpec.factory functions. Returns the initialized system.

    Returns Promise<System<T>>

  • Syntax sugar for stop() && start() sequence. The restart phase will only be executed if all components could be stopped successfully.

    Returns Promise<boolean>

  • Initializes all system components in dependency order. If any component's start() method returns false, system start up will be stopped, any already started components will be stopped (in reverse order) and this method returns false itself.

    Returns Promise<boolean>

    Remarks

    Any errors thrown during child component startup (or shutdown) will not be intercepted.

  • Stops all system components in reverse dependency order. If any component's stop() method returns false, a warning message will be logged, but unlike System.start, the shutdown process of other components will not be stopped.

    Any errors thrown during child component shutdown will not be intercepted.

    Returns Promise<boolean>

Generated using TypeDoc