Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

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 Promise<DistributedObject[]>

    the collection of all instances in the cluster

  • getList<E>(name: string): Promise<IList<E>>
  • Returns the distributed List instance with given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<IList<E>>

  • getMap<K, V>(name: string): Promise<IMap<K, V>>
  • Returns the distributed Map instance with given name.

    Type Parameters

    • K

    • V

    Parameters

    • name: string

    Returns Promise<IMap<K, V>>

  • getMultiMap<K, V>(name: string): Promise<MultiMap<K, V>>
  • getName(): string
  • getPNCounter(name: string): Promise<PNCounter>
  • getQueue<E>(name: string): Promise<IQueue<E>>
  • getReliableTopic<E>(name: string): Promise<ITopic<E>>
  • Returns a distributed Reliable Topic instance with the given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<ITopic<E>>

  • getReplicatedMap<K, V>(name: string): Promise<ReplicatedMap<K, V>>
  • getRingbuffer<E>(name: string): Promise<Ringbuffer<E>>
  • getSet<E>(name: string): Promise<ISet<E>>
  • Returns the distributed Set instance with given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns Promise<ISet<E>>

  • removeDistributedObjectListener(listenerId: string): Promise<boolean>
  • Removes a distributed object listener from the cluster.

    Parameters

    • listenerId: string

      id of the listener to be removed.

    Returns Promise<boolean>

    true if registration was removed, false otherwise.

  • shutdown(): Promise<void>
  • Shuts down this client instance.

    Returns Promise<void>

    Shutdown promise. Multiple invocations will return the same promise.

  • 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.

    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>

    a new client instance

Generated using TypeDoc