public class JGroupsClusterManager extends Object implements ClusterManager
| Modifier and Type | Field and Description |
|---|---|
static String |
CLUSTER_NAME |
static String |
CONFIG_FILE |
static String |
DEFAULT_CONFIG_FILE |
| Constructor and Description |
|---|
JGroupsClusterManager() |
JGroupsClusterManager(JChannel channel) |
| 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
|
static InputStream |
getConfigStream() |
void |
getCounter(String name,
Handler<AsyncResult<Counter>> handler) |
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
|
Logger |
log() |
void |
nodeListener(NodeListener listener)
Set a listener that will be called when a node joins or leaves the cluster.
|
void |
setVertx(Vertx vertx) |
public static final String DEFAULT_CONFIG_FILE
public static final String CONFIG_FILE
public static final String CLUSTER_NAME
public JGroupsClusterManager()
public JGroupsClusterManager(JChannel channel)
public void setVertx(Vertx vertx)
setVertx in interface ClusterManagerpublic <K,V> void getAsyncMultiMap(String name, Handler<AsyncResult<AsyncMultiMap<K,V>>> handler)
ClusterManagergetAsyncMultiMap in interface ClusterManagerpublic <K,V> void getAsyncMap(String name, Handler<AsyncResult<AsyncMap<K,V>>> handler)
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>> handler)
getLockWithTimeout in interface ClusterManagerpublic void getCounter(String name, Handler<AsyncResult<Counter>> handler)
getCounter in interface ClusterManagerpublic String getNodeID()
ClusterManagergetNodeID in interface ClusterManagerpublic List<String> getNodes()
ClusterManagergetNodes in interface ClusterManagerpublic void nodeListener(NodeListener listener)
ClusterManagernodeListener in interface ClusterManagerpublic void join(Handler<AsyncResult<Void>> handler)
ClusterManagerjoin in interface ClusterManagerpublic void leave(Handler<AsyncResult<Void>> handler)
ClusterManagerleave in interface ClusterManagerpublic boolean isActive()
ClusterManagerisActive in interface ClusterManagerpublic Logger log()
public static InputStream getConfigStream()
Copyright © 2016. All rights reserved.