public class HazelcastClusterManager extends java.lang.Object implements ClusterManager
Please be aware of the typical issues with singletons. E.g. all junit tests will share a single instance and the data (subsMap).
| Constructor and Description |
|---|
HazelcastClusterManager(VertxInternal vertx)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Because it implements a singleton, close() needs to be a noop
|
protected com.hazelcast.config.Config |
getConfig(java.lang.String configfile)
Get the Hazelcast config
|
com.hazelcast.core.HazelcastInstance |
getInstance()
Provide access to the singleton Hazelcast instance, e.g.
|
SubsMap |
getSubsMap(java.lang.String name)
Every eventbus handler has an ID.
|
public HazelcastClusterManager(VertxInternal vertx)
protected com.hazelcast.config.Config getConfig(java.lang.String configfile)
configfile - May be null in which case it gets the default (cluster.xml) will be used.public SubsMap getSubsMap(java.lang.String name)
getSubsMap in interface ClusterManagername - A unique name by which the the MultiMap can be identified within the cluster.
See the cluster config file (e.g. cluster.xml in case of HazelcastClusterManager) for
additional MultiMap config parameters.public void close()
close in interface ClusterManagerpublic com.hazelcast.core.HazelcastInstance getInstance()