io.vertx.spi.cluster.ignite

## Class IgniteClusterManager

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

- All Implemented Interfaces:
    ClusterManager

      public class IgniteClusterManager
      extends Object
      implements ClusterManager

  Apache Ignite based cluster manager.
  Author:
    Andrey Gura

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `VERTX_CACHE_TEMPLATE_NAME`

  - ### 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 cfg)` Creates cluster manager instance with given Ignite 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
    --- | ---
    `<K,V> void` | `getAsyncMap(String name, Handler<AsyncResult<AsyncMap<K,V>>> handler)` Return an async map for the given name
    `<K,V> void` | `getAsyncMultiMap(String name, Handler<AsyncResult<AsyncMultiMap<K,V>>> handler)` Return an async multi-map for the given name
    `void` | `getCounter(String name, Handler<AsyncResult<Counter>> handler)`
    `org.apache.ignite.Ignite` | `getIgniteInstance()` Returns instance of `Ignite`.
    `void` | `getLockWithTimeout(String name, long timeout, Handler<AsyncResult<Lock>> handler)`
    `String` | `getNodeID()` Return the unique node ID for this node
    `List<String>` | `getNodes()` Return a list of node IDs corresponding to the nodes in the cluster
    `<K,V> Map<K,V>` | `getSyncMap(String name)` Return a synchronous map for the given name
    `boolean` | `isActive()` Is the cluster manager active?
    `void` | `join(Handler<AsyncResult<Void>> handler)` Join the cluster
    `void` | `leave(Handler<AsyncResult<Void>> handler)` Leave the cluster
    `void` | `nodeListener(NodeListener nodeListener)` Set a listener that will be called when a node joins or leaves the cluster.
    `void` | `setVertx(Vertx vertx)`

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

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

- - ### Field Detail

    - #### VERTX_CACHE_TEMPLATE_NAME

          public static final String VERTX_CACHE_TEMPLATE_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### IgniteClusterManager

          public IgniteClusterManager()

      Default constructor. Cluster manager will get configuration from classpath.

    - #### IgniteClusterManager

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

      Creates cluster manager instance with given Ignite configuration. Use this constructor in order to configure cluster manager programmatically.
      Parameters:
        `cfg` - `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(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.

    - #### setVertx

          public void setVertx(Vertx vertx)

      Specified by:
        `setVertx` in interface `ClusterManager`

    - #### 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`

    - #### getAsyncMultiMap

          public <K,V> void getAsyncMultiMap(String name,
                                             Handler<AsyncResult<AsyncMultiMap<K,V>>> handler)

      Description copied from interface: `ClusterManager`
      Return an async multi-map for the given name
      Specified by:
        `getAsyncMultiMap` in interface `ClusterManager`

    - #### getAsyncMap

          public <K,V> void getAsyncMap(String name,
                                        Handler<AsyncResult<AsyncMap<K,V>>> handler)

      Description copied from interface: `ClusterManager`
      Return an async map 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,
                                         Handler<AsyncResult<Lock>> handler)

      Specified by:
        `getLockWithTimeout` in interface `ClusterManager`

    - #### getCounter

          public void getCounter(String name,
                                 Handler<AsyncResult<Counter>> handler)

      Specified by:
        `getCounter` in interface `ClusterManager`

    - #### getNodeID

          public String getNodeID()

      Description copied from interface: `ClusterManager`
      Return the unique node ID for this node
      Specified by:
        `getNodeID` in interface `ClusterManager`

    - #### getNodes

          public List<String> getNodes()

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

    - #### join

          public void join(Handler<AsyncResult<Void>> handler)

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

    - #### leave

          public void leave(Handler<AsyncResult<Void>> handler)

      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

Copyright © 2021 Eclipse. All rights reserved.