vertx / io.vertx.spi.cluster.hazelcast / HazelcastClusterManager

# HazelcastClusterManager

`open class HazelcastClusterManager : ClusterManager, MembershipListener, LifecycleListener`

A cluster manager that uses Hazelcast

Author
Tim Fox

### Constructors

<init> | `HazelcastClusterManager()` Constructor - gets config from classpath `HazelcastClusterManager(conf: Config)` Constructor - config supplied `HazelcastClusterManager(instance: HazelcastInstance)`

### Functions

getAsyncMap | `open fun <K : Any, V : Any> getAsyncMap(name: String, resultHandler: Handler<AsyncResult<AsyncMap<K, V>>>): Unit`
getAsyncMultiMap | `open fun <K : Any, V : Any> getAsyncMultiMap(name: String, resultHandler: Handler<AsyncResult<AsyncMultiMap<K, V>>>): Unit` Every eventbus handler has an ID. SubsMap (subscriber map) is a MultiMap which maps handler-IDs with server-IDs and thus allows the eventbus to determine where to send messages.
getConfig | `open fun getConfig(): Config` Get the Hazelcast config.
getCounter | `open fun getCounter(name: String, resultHandler: Handler<AsyncResult<Counter>>): Unit`
getHazelcastInstance | `open fun getHazelcastInstance(): HazelcastInstance`
getLockWithTimeout | `open fun getLockWithTimeout(name: String, timeout: Long, resultHandler: Handler<AsyncResult<Lock>>): Unit`
getNodeID | `open fun getNodeID(): String`
getNodes | `open fun getNodes(): MutableList<String>`
getSyncMap | `open fun <K : Any, V : Any> getSyncMap(name: String): MutableMap<K, V>`
isActive | `open fun isActive(): Boolean`
join | `open fun join(resultHandler: Handler<AsyncResult<Void>>): Unit`
leave | `open fun leave(resultHandler: Handler<AsyncResult<Void>>): Unit`
loadConfig | `open fun loadConfig(): Config` Load Hazelcast config XML and transform it into a Config object. The content is read from: the location denoted by the `vertx.hazelcast.config` sysprop, if present, or the `cluster.xml` file on the classpath, if present, or the default config file The cluster manager uses this method to load the config when the node joins the cluster, if no config was provided upon creation. You may use this method to get a base config and customize it before the node joins the cluster. In this case, don't forget to invoke `#setConfig(Config)` after you applied your changes.
memberAdded | `open fun memberAdded(membershipEvent: MembershipEvent): Unit`
memberAttributeChanged | `open fun memberAttributeChanged(memberAttributeEvent: MemberAttributeEvent): Unit`
memberRemoved | `open fun memberRemoved(membershipEvent: MembershipEvent): Unit`
nodeListener | `open fun nodeListener(listener: NodeListener): Unit`
setConfig | `open fun setConfig(config: Config): Unit` Set the Hazelcast config.
setVertx | `open fun setVertx(vertx: Vertx): Unit`
stateChanged | `open fun stateChanged(lifecycleEvent: LifecycleEvent): Unit`