io.vertx.spi.cluster.ignite

## Class IgniteClusterManager

- java.lang.Object
- - io.vertx.spi.cluster.ignite.IgniteClusterManager

- All Implemented Interfaces:
    ClusterManager, VertxServiceProvider

      public class IgniteClusterManager
      extends Object
      implements ClusterManager

  Apache Ignite based cluster manager.
  Author:
    Andrey Gura, Lukas Prettenthaler

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IgniteClusterManager()` Default constructor.
    `IgniteClusterManager(org.apache.ignite.Ignite ignite)` Creates cluster manager instance with given `Ignite` instance.
    `IgniteClusterManager(org.apache.ignite.configuration.IgniteConfiguration extCfg)` Creates cluster manager instance with given Ignite configuration.
    `IgniteClusterManager(IgniteOptions extOptions)` Creates cluster manager instance with given IgniteOptions.
    `IgniteClusterManager(JsonObject jsonConfig)` Creates cluster manager instance with given JSON configuration.
    `IgniteClusterManager(URL configFile)` Creates cluster manager instance with given Spring XML configuration file.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRegistration(String address, RegistrationInfo registrationInfo, Promise<Void> promise)` Share a new messaging handler registration with other nodes in the cluster.
    `<K,V> void` | `getAsyncMap(String name, Promise<AsyncMap<K,V>> promise)` Return an `AsyncMap` for the given `name`.
    `void` | `getCounter(String name, Promise<Counter> promise)` Return a `Counter` for the given `name`.
    `org.apache.ignite.Ignite` | `getIgniteInstance()` Returns instance of `Ignite`.
    `void` | `getLockWithTimeout(String name, long timeout, Promise<Lock> promise)` Attempts to acquire a `Lock` for the given `name` within `timeout` milliseconds.
    `String` | `getNodeId()` Return the unique node identifier for this node.
    `NodeInfo` | `getNodeInfo()` Get details about this clustered node.
    `void` | `getNodeInfo(String id, Promise<NodeInfo> promise)` Get details about a specific node in the cluster.
    `List<String>` | `getNodes()` Return a list of node identifiers corresponding to the nodes in the cluster.
    `void` | `getRegistrations(String address, Promise<List<RegistrationInfo>> promise)` Get the messaging handler currently registered in the cluster.
    `<K,V> Map<K,V>` | `getSyncMap(String name)` Return a synchronous map for the given `name`.
    `void` | `init(Vertx vertx, NodeSelector nodeSelector)` Invoked before this cluster node tries to join the cluster.
    `boolean` | `isActive()` Is the cluster manager active?
    `void` | `join(Promise<Void> promise)` Join the cluster.
    `void` | `leave(Promise<Void> promise)` Leave the cluster.
    `void` | `nodeListener(NodeListener nodeListener)` Set a listener that will be called when a node joins or leaves the cluster.
    `void` | `removeRegistration(String address, RegistrationInfo registrationInfo, Promise<Void> promise)` Signal removal of a messaging handler registration to other nodes in the cluster.
    `void` | `setNodeInfo(NodeInfo nodeInfo, Promise<Void> promise)` Store the details about this clustered node.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.core.spi.cluster.ClusterManager

      `clusterHost, clusterPublicHost, init`

- - ### Constructor Detail

    - #### IgniteClusterManager

          public IgniteClusterManager()

      Default constructor. Cluster manager will get configuration from classpath.

    - #### IgniteClusterManager

          public IgniteClusterManager(org.apache.ignite.configuration.IgniteConfiguration extCfg)

      Creates cluster manager instance with given Ignite configuration. Use this constructor in order to configure cluster manager programmatically.
      Parameters:
        `extCfg` - `IgniteConfiguration` instance.

    - #### IgniteClusterManager

          public IgniteClusterManager(URL configFile)

      Creates cluster manager instance with given Spring XML configuration file. Use this constructor in order to configure cluster manager programmatically.
      Parameters:
        `configFile` - `URL` path to Spring XML configuration file.

    - #### IgniteClusterManager

          public IgniteClusterManager(JsonObject jsonConfig)

      Creates cluster manager instance with given JSON configuration. Use this constructor in order to configure cluster manager programmatically.
      Parameters:
        `jsonConfig` - `JsonObject` JSON configuration.

    - #### IgniteClusterManager

          public IgniteClusterManager(IgniteOptions extOptions)

      Creates cluster manager instance with given IgniteOptions. Use this constructor in order to configure cluster manager programmatically.
      Parameters:
        `extOptions` - `IgniteOptions` options object.

    - #### IgniteClusterManager

          public IgniteClusterManager(org.apache.ignite.Ignite ignite)

      Creates cluster manager instance with given `Ignite` instance.
      Parameters:
        `ignite` - `Ignite` instance.

  - ### Method Detail

    - #### getIgniteInstance

          public org.apache.ignite.Ignite getIgniteInstance()

      Returns instance of `Ignite`.
      Returns:
        `Ignite` instance.

    - #### init

          public void init(Vertx vertx,
                           NodeSelector nodeSelector)

      Description copied from interface: `ClusterManager`
      Invoked before this cluster node tries to join the cluster.

      Implementations must signal the provided `nodeSelector` when messaging handler registrations are added or removed by sending a `RegistrationUpdateEvent` with `NodeSelector.registrationsUpdated(RegistrationUpdateEvent)`.

      Specified by:
        `init` in interface `ClusterManager`
      Parameters:
        `vertx` - the Vert.x instance
        `nodeSelector` - the `NodeSelector` that must receive `RegistrationUpdateEvent`.

    - #### nodeListener

          public void nodeListener(NodeListener nodeListener)

      Description copied from interface: `ClusterManager`
      Set a listener that will be called when a node joins or leaves the cluster.
      Specified by:
        `nodeListener` in interface `ClusterManager`

    - #### getAsyncMap

          public <K,V> void getAsyncMap(String name,
                                        Promise<AsyncMap<K,V>> promise)

      Description copied from interface: `ClusterManager`
      Return an `AsyncMap` for the given `name`.
      Specified by:
        `getAsyncMap` in interface `ClusterManager`

    - #### getSyncMap

          public <K,V> Map<K,V> getSyncMap(String name)

      Description copied from interface: `ClusterManager`
      Return a synchronous map for the given `name`.
      Specified by:
        `getSyncMap` in interface `ClusterManager`

    - #### getLockWithTimeout

          public void getLockWithTimeout(String name,
                                         long timeout,
                                         Promise<Lock> promise)

      Description copied from interface: `ClusterManager`
      Attempts to acquire a `Lock` for the given `name` within `timeout` milliseconds.
      Specified by:
        `getLockWithTimeout` in interface `ClusterManager`

    - #### getCounter

          public void getCounter(String name,
                                 Promise<Counter> promise)

      Description copied from interface: `ClusterManager`
      Return a `Counter` for the given `name`.
      Specified by:
        `getCounter` in interface `ClusterManager`

    - #### getNodeId

          public String getNodeId()

      Description copied from interface: `ClusterManager`
      Return the unique node identifier for this node.
      Specified by:
        `getNodeId` in interface `ClusterManager`

    - #### setNodeInfo

          public void setNodeInfo(NodeInfo nodeInfo,
                                  Promise<Void> promise)

      Description copied from interface: `ClusterManager`
      Store the details about this clustered node.
      Specified by:
        `setNodeInfo` in interface `ClusterManager`

    - #### getNodeInfo

          public NodeInfo getNodeInfo()

      Description copied from interface: `ClusterManager`
      Get details about this clustered node.
      Specified by:
        `getNodeInfo` in interface `ClusterManager`

    - #### getNodeInfo

          public void getNodeInfo(String id,
                                  Promise<NodeInfo> promise)

      Description copied from interface: `ClusterManager`
      Get details about a specific node in the cluster.
      Specified by:
        `getNodeInfo` in interface `ClusterManager`
      Parameters:
        `id` - the clustered node id

    - #### getNodes

          public List<String> getNodes()

      Description copied from interface: `ClusterManager`
      Return a list of node identifiers corresponding to the nodes in the cluster.
      Specified by:
        `getNodes` in interface `ClusterManager`

    - #### join

          public void join(Promise<Void> promise)

      Description copied from interface: `ClusterManager`
      Join the cluster.
      Specified by:
        `join` in interface `ClusterManager`

    - #### leave

          public void leave(Promise<Void> promise)

      Description copied from interface: `ClusterManager`
      Leave the cluster.
      Specified by:
        `leave` in interface `ClusterManager`

    - #### isActive

          public boolean isActive()

      Description copied from interface: `ClusterManager`
      Is the cluster manager active?
      Specified by:
        `isActive` in interface `ClusterManager`
      Returns:
        true if active, false otherwise

    - #### addRegistration

          public void addRegistration(String address,
                                      RegistrationInfo registrationInfo,
                                      Promise<Void> promise)

      Description copied from interface: `ClusterManager`
      Share a new messaging handler registration with other nodes in the cluster.
      Specified by:
        `addRegistration` in interface `ClusterManager`

    - #### removeRegistration

          public void removeRegistration(String address,
                                         RegistrationInfo registrationInfo,
                                         Promise<Void> promise)

      Description copied from interface: `ClusterManager`
      Signal removal of a messaging handler registration to other nodes in the cluster.
      Specified by:
        `removeRegistration` in interface `ClusterManager`

    - #### getRegistrations

          public void getRegistrations(String address,
                                       Promise<List<RegistrationInfo>> promise)

      Description copied from interface: `ClusterManager`
      Get the messaging handler currently registered in the cluster.
      Specified by:
        `getRegistrations` in interface `ClusterManager`

Copyright © 2023 Eclipse. All rights reserved.