Hazelcast client instance. When you want to use Hazelcast's distributed data structures, you must first create a client instance. Multiple instances can be created on a single Node.js process.

Client instances should be shut down explicitly.

Hierarchy

  • HazelcastClient

Methods

  • Returns all DistributedObjects, that is all maps, queues, topics, locks etc.

    The results are returned on a best-effort basis. The result might miss just-created objects and contain just-deleted objects. An existing object can also be missing from the list occasionally. One cluster member is queried to obtain the list.

    Returns

    the collection of all instances in the cluster

    Returns Promise<DistributedObject[]>

  • Returns the distributed List instance with given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<IList<E>>

  • Returns the distributed Map instance with given name.

    Type Parameters

    • K

    • V

    Parameters

    • name: string

    Returns Promise<IMap<K, V>>

  • Returns the distributed MultiMap instance with given name.

    Type Parameters

    • K

    • V

    Parameters

    • name: string

    Returns Promise<MultiMap<K, V>>

  • Returns the distributed Queue instance with given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<IQueue<E>>

  • Returns a distributed Reliable Topic instance with the given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<ITopic<E>>

  • Returns the distributed Set instance with given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<ISet<E>>

  • Removes a distributed object listener from the cluster.

    Returns

    true if registration was removed, false otherwise.

    Parameters

    • listenerId: string

      id of the listener to be removed.

    Returns Promise<boolean>

  • Shuts down this client instance.

    Returns

    Shutdown promise. Multiple invocations will return the same promise.

    Returns Promise<void>

  • Creates a new client object and automatically connects to cluster.

    Throws

    InvalidConfigurationError before returning if config is not a valid configuration object.

    Returns

    a new client instance

    Parameters

    • Optional config: ClientConfig

      Client config. Default client config is used when this parameter is absent.

    Returns Promise<HazelcastClient>

  • Creates a client with cluster switch capability. Client will try to connect to alternative clusters according to failover configuration when it disconnects from a cluster.

    Returns

    a new client instance

    Throws

    InvalidConfigurationError before returning if the provided failover configuration is not valid

    Parameters

    • Optional failoverConfig: ClientFailoverConfig

      Configuration object describing the failover client configs and try count

    Returns Promise<HazelcastClient>

Generated using TypeDoc