public class InfinispanClusterManager extends Object implements ClusterManager
| Constructor and Description |
|---|
InfinispanClusterManager()
Creates a new cluster manager configured with
infinispan.xml and jgroups.xml files. |
InfinispanClusterManager(org.infinispan.manager.DefaultCacheManager cacheManager)
Creates a new cluster manager with an existing
DefaultCacheManager. |
| Modifier and Type | Method and Description |
|---|---|
<K,V> void |
getAsyncMap(String name,
Handler<AsyncResult<AsyncMap<K,V>>> resultHandler)
Return an async map for the given name
|
<K,V> void |
getAsyncMultiMap(String name,
Handler<AsyncResult<AsyncMultiMap<K,V>>> resultHandler)
Return an async multi-map for the given name
|
org.infinispan.commons.api.BasicCacheContainer |
getCacheContainer() |
void |
getCounter(String name,
Handler<AsyncResult<Counter>> resultHandler) |
void |
getLockWithTimeout(String name,
long timeout,
Handler<AsyncResult<Lock>> resultHandler) |
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>> resultHandler)
Join the cluster
|
void |
leave(Handler<AsyncResult<Void>> resultHandler)
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) |
public InfinispanClusterManager()
infinispan.xml and jgroups.xml files.public InfinispanClusterManager(org.infinispan.manager.DefaultCacheManager cacheManager)
DefaultCacheManager.
It is your responsibility to start/stop the cache manager when the Vert.x instance joins/leaves the cluster.cacheManager - the existing cache managerpublic void setVertx(Vertx vertx)
setVertx in interface ClusterManagerpublic org.infinispan.commons.api.BasicCacheContainer getCacheContainer()
public <K,V> void getAsyncMultiMap(String name, Handler<AsyncResult<AsyncMultiMap<K,V>>> resultHandler)
ClusterManagergetAsyncMultiMap in interface ClusterManagerpublic <K,V> void getAsyncMap(String name, Handler<AsyncResult<AsyncMap<K,V>>> resultHandler)
ClusterManagergetAsyncMap in interface ClusterManagerpublic <K,V> Map<K,V> getSyncMap(String name)
ClusterManagergetSyncMap in interface ClusterManagerpublic void getLockWithTimeout(String name, long timeout, Handler<AsyncResult<Lock>> resultHandler)
getLockWithTimeout in interface ClusterManagerpublic void getCounter(String name, Handler<AsyncResult<Counter>> resultHandler)
getCounter in interface ClusterManagerpublic String getNodeID()
ClusterManagergetNodeID in interface ClusterManagerpublic List<String> getNodes()
ClusterManagergetNodes in interface ClusterManagerpublic void nodeListener(NodeListener nodeListener)
ClusterManagernodeListener in interface ClusterManagerpublic void join(Handler<AsyncResult<Void>> resultHandler)
ClusterManagerjoin in interface ClusterManagerpublic void leave(Handler<AsyncResult<Void>> resultHandler)
ClusterManagerleave in interface ClusterManagerpublic boolean isActive()
ClusterManagerisActive in interface ClusterManagerCopyright © 2021 Eclipse. All rights reserved.