Class BrokerDirectClient

Hierarchy

Constructors

Properties

activeChannels: Map<string, BrokerChannel<any>> = ...
entityFieldsPromise?: Promise<void>
entityFieldsReceived: boolean = false

On first getEntityFields() call we check if entityFieldsReceived is true. If not we connect and load all available entity-fields from the server and start streaming all changes to the entity-fields directly to our entityFields map.

knownEntityFields: Map<string, string[]> = ...
publishedEntityFields: Map<string, Map<string, number>> = ...

Methods

  • Locks an id on the broker. If the id is already locked, it waits until it is released. If timeout is specified, the lock acquisition should take maximum timeout seconds. 0 means it waits without limit.

    ttl (time to life) defines how long the given lock is allowed to stay active. Per default each lock is automatically unlocked after 30 seconds. If you haven't released the lock until then, another lock acquisition is allowed to receive it anyways. ttl of 0 disables ttl and keeps the lock alive until you manually unlock it (or the process dies).

    Parameters

    • id: string
    • ttl: number = 30
    • timeout: number = 0

    Returns Promise<AsyncSubscription>

  • Tries to lock an id on the broker. If the id is already locked, it returns immediately undefined without locking anything

    ttl (time to life) defines how long the given lock is allowed to stay active. Per default each lock is automatically unlocked after 30 seconds. If you haven't released the lock until then, another lock acquisition is allowed to receive it anyways. ttl of 0 disables ttl and keeps the lock alive until you manually unlock it (or the process dies).

    Parameters

    • id: string
    • ttl: number = 30

    Returns Promise<undefined | AsyncSubscription>

Generated using TypeDoc