Member Junction
    Preparing search index...

    Identity of one MJAPI instance and of one boot of it. A boot stamps its id into the HostInstanceID of the MJ: AI Agent Sessions rows it owns, and of the MJ: AI Agent Session Bridges rows the realtime bridge engine creates for it (see BindBridgeEngineHostInstance), so that after a restart the instance can tell the rows it left behind from another server's live ones.

    An instance is one MJAPI on one host, named by the host and the port it serves on. Two MJAPIs running at the same time on one host can't serve on the same port, so they are two instances; an MJAPI that restarts serves on its port again, so it is the same instance. Each boot adds its process id and a UUID made at load: hostname:port:pid:bootId.

    A row stamped by another boot of this instance was left by a process that has ended, since this boot holds the port. A row of another instance (another port on this host, or another host) may belong to a server that is still running.

    Index

    Constructors

    • Parameters

      • hostName: string

        The OS host name.

      • instanceKey: string

        The port the instance serves on, or pid-<pid> for a process that serves none.

      • processID: number

        The OS process id of this boot.

      • bootID: string

        A UUID made once per boot.

      Returns HostInstanceIdentity

    Properties

    BootID: string

    A UUID made once per boot, so two boots never share an id, even when the OS reuses a process id.

    HostName: string

    The OS host name.

    InstanceKey: string

    What tells this instance apart from the other MJAPIs on the host: the port it serves on, or pid-<pid> for a process that has not set one (see SetHostInstancePort).

    ProcessID: number

    The OS process id of this boot.

    Methods

    • Whether a HostInstanceID was stamped by another boot of this instance: this instance's prefix, then a process id and a boot id, and not this boot's own id. That boot has ended, since this one holds the instance's port.

      False for this boot's id, for another instance's (another port on this host, or another host), for the format used before the port was added (hostname:pid:bootId), and for null. The match is exact: unlike a SQL LIKE, a _ in a host name matches only _.

      Parameters

      • hostInstanceID: string

        A row's HostInstanceID.

      Returns boolean