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

  • Registers a distributed object listener to cluster.

    Parameters

    Returns Promise<string>

    registration id of the listener.

  • Returns the CP subsystem that offers a set of in-memory linearizable data structures.

    Returns CPSubsystem

  • Returns the Cluster to which this client is connected.

    Returns Cluster

  • Returns configuration that this instance started with. The returned object should not be modified.

    Returns ClientConfig

  • 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

  • Returns the distributed Flake ID Generator instance with given name.

    Parameters

    • name: string

    Returns Promise<FlakeIdGenerator>

  • Returns the lifecycle service for this client.

    Returns LifecycleService

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

  • Gathers information of this local client.

    Returns ClientInfo

  • 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>>
  • Returns the distributed MultiMap instance with given name.

    Type Parameters

    • K

    • V

    Parameters

    • name: string

    Returns Promise<MultiMap<K, V>>

  • getName(): string
  • Returns the name of this Hazelcast instance.

    Returns string

  • getPNCounter(name: string): Promise<PNCounter>
  • Returns the distributed PN Counter instance with given name.

    Parameters

    • name: string

    Returns Promise<PNCounter>

  • Returns the partition service of this client.

    Returns PartitionService

  • getQueue<E>(name: string): Promise<IQueue<E>>
  • Returns the distributed Queue instance with given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns 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>>
  • Returns the distributed Replicated Map instance with given name.

    Type Parameters

    • K

    • V

    Parameters

    • name: string

    Returns Promise<ReplicatedMap<K, V>>

  • getRingbuffer<E>(name: string): Promise<Ringbuffer<E>>
  • Returns a distributed Ringbuffer instance with the given name.

    Type Parameters

    • E

    Parameters

    • name: string

    Returns 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>>

  • Returns a service to execute distributed SQL queries.

    Returns SqlService

    SQL service

    see SqlService

  • 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 new client object and automatically connects to cluster.

    throws

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

    Parameters

    • Optional config: ClientConfig

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

    Returns Promise<HazelcastClient>

    a new client instance

  • 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