public class DefaultCluster extends Object implements Cluster
| Constructor and Description |
|---|
DefaultCluster(String address,
org.vertx.java.core.Vertx vertx,
org.vertx.java.platform.Container container) |
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Returns the cluster address.
|
Cluster |
deployModule(String moduleName)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
int instances)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
org.vertx.java.core.json.JsonObject config)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
org.vertx.java.core.json.JsonObject config,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
org.vertx.java.core.json.JsonObject config,
int instances)
Deploys a module to the cluster.
|
Cluster |
deployModule(String moduleName,
org.vertx.java.core.json.JsonObject config,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a module to the cluster.
|
Cluster |
deployNetwork(org.vertx.java.core.json.JsonObject network)
Deploys a JSON network to the cluster.
|
Cluster |
deployNetwork(org.vertx.java.core.json.JsonObject network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Deploys a JSON network to the cluster.
|
Cluster |
deployNetwork(NetworkConfig network)
Deploys a network to the cluster.
|
Cluster |
deployNetwork(NetworkConfig network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Deploys a network to the cluster.
|
Cluster |
deployNetwork(String name)
Deploys a bare network to the cluster.
|
Cluster |
deployNetwork(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Deploys a bare network to the cluster.
|
Cluster |
deployVerticle(String main)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
int instances)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
org.vertx.java.core.json.JsonObject config)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
org.vertx.java.core.json.JsonObject config,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
org.vertx.java.core.json.JsonObject config,
int instances)
Deploys a verticle to the cluster.
|
Cluster |
deployVerticle(String main,
org.vertx.java.core.json.JsonObject config,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
int instances)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
org.vertx.java.core.json.JsonObject config)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
org.vertx.java.core.json.JsonObject config,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
org.vertx.java.core.json.JsonObject config,
int instances,
boolean multiThreaded)
Deploys a worker verticle to the cluster.
|
Cluster |
deployWorkerVerticle(String main,
org.vertx.java.core.json.JsonObject config,
int instances,
boolean multiThreaded,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a worker verticle to the cluster.
|
boolean |
equals(Object object) |
AsyncCounter |
getCounter(String name)
Gets an asynchronous counter from the cluster.
|
Cluster |
getGroup(String group,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
Gets a group in the cluster.
|
Cluster |
getGroups(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Group>>> resultHandler)
Gets a collection of groups in the cluster.
|
<T> AsyncList<T> |
getList(String name)
Gets an asynchronous list from the cluster.
|
<K,V> AsyncMap<K,V> |
getMap(String name)
Gets an asynchronous map from the cluster.
|
<K,V> AsyncMultiMap<K,V> |
getMultiMap(String name)
Gets an asynchronous multi-map from the cluster.
|
Cluster |
getNetwork(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> resultHandler)
Loads a network from the cluster.
|
Cluster |
getNetworks(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<ActiveNetwork>>> resultHandler)
Gets a list of deployed networks from the cluster.
|
Cluster |
getNode(String node,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
Gets a node in the cluster.
|
Cluster |
getNodes(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Node>>> resultHandler)
Gets a collection of nodes in the cluster.
|
<T> AsyncQueue<T> |
getQueue(String name)
Gets an asynchronous queue from the cluster.
|
<T> AsyncSet<T> |
getSet(String name)
Gets an asynchronous set from the cluster.
|
Cluster |
installModule(String moduleName)
Installs a local module to all nodes the cluster.
|
Cluster |
installModule(String moduleName,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Installs a local module to all nodes in the cluster.
|
Cluster |
ping(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Cluster>> resultHandler)
Pings the cluster.
|
Cluster |
registerJoinHandler(org.vertx.java.core.Handler<Node> handler)
Registers a handler to be called when a node joins the cluster.
|
Cluster |
registerJoinHandler(org.vertx.java.core.Handler<Node> handler,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Registers a handler to be called when a node joins the cluster.
|
Cluster |
registerLeaveHandler(org.vertx.java.core.Handler<Node> handler)
Registers a handler to be called when a node leaves the cluster.
|
Cluster |
registerLeaveHandler(org.vertx.java.core.Handler<Node> handler,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Registers a handler to be called when a node leaves the cluster.
|
Cluster |
selectGroup(Object key,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
Selects a group in the cluster according to the given key.
|
Cluster |
selectNode(Object key,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
Selects a node in the cluster according to the given key.
|
String |
toString() |
Cluster |
undeployModule(String deploymentID)
Undeploys a module from the cluster.
|
Cluster |
undeployModule(String deploymentID,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a module from the cluster.
|
Cluster |
undeployNetwork(org.vertx.java.core.json.JsonObject network)
Undeploys a network from the cluster from a json configuration.
|
Cluster |
undeployNetwork(org.vertx.java.core.json.JsonObject network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a network from the cluster from a json configuration.
|
Cluster |
undeployNetwork(NetworkConfig network)
Undeploys a network from the cluster.
|
Cluster |
undeployNetwork(NetworkConfig network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a network from the cluster.
|
Cluster |
undeployNetwork(String name)
Undeploys a complete network from the cluster.
|
Cluster |
undeployNetwork(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a complete network from the cluster.
|
Cluster |
undeployVerticle(String deploymentID)
Undeploys a verticle from the cluster.
|
Cluster |
undeployVerticle(String deploymentID,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a verticle from the cluster.
|
Cluster |
uninstallModule(String moduleName)
Uninstalls a module from all nodes in the cluster.
|
Cluster |
uninstallModule(String moduleName,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Uninstalls a module from all nodes in the cluster.
|
Cluster |
unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler)
Unregisters a node join handler.
|
Cluster |
unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Unregisters a node join handler.
|
Cluster |
unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler)
Unregisters a node leave handler.
|
Cluster |
unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Unregisters a node leave handler.
|
public DefaultCluster(String address, org.vertx.java.core.Vertx vertx, org.vertx.java.platform.Container container)
public String address()
Clusterpublic Cluster registerJoinHandler(org.vertx.java.core.Handler<Node> handler)
Cluster
You can also register an event bus handler to listen for nodes joining
the cluster by registering a handler at {cluster}.join.
The handler will receive a String message containing the
absolute event bus address of the node that joined the cluster.
registerJoinHandler in interface Clusterhandler - A handler to be called when the node joins the cluster.public Cluster registerJoinHandler(org.vertx.java.core.Handler<Node> handler, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Cluster
You can also register an event bus handler to listen for nodes joining
the cluster by registering a handler at {cluster}.join.
The handler will receive a String message containing the
absolute event bus address of the node that joined the cluster.
registerJoinHandler in interface Clusterhandler - A handler to be called when the node joins the cluster.doneHandler - A handler to be called once the handler has been registered.public Cluster unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler)
ClusterunregisterJoinHandler in interface Clusterhandler - The handler to unregister.public Cluster unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
ClusterunregisterJoinHandler in interface Clusterhandler - The handler to unregister.doneHandler - A handler to be called once the handle has been unregistered.public Cluster registerLeaveHandler(org.vertx.java.core.Handler<Node> handler)
Cluster
You can also register an event bus handler to listen for nodes leaving
the cluster by registering a handler at {cluster}.leave.
The handler will receive a String message containing the
absolute event bus address of the node that left the cluster.
registerLeaveHandler in interface Clusterhandler - A handler to be called when the node leaves the cluster.public Cluster registerLeaveHandler(org.vertx.java.core.Handler<Node> handler, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Cluster
You can also register an event bus handler to listen for nodes leaving
the cluster by registering a handler at {cluster}.leave.
The handler will receive a String message containing the
absolute event bus address of the node that left the cluster.
registerLeaveHandler in interface Clusterhandler - A handler to be called when the node leaves the cluster.doneHandler - A handler to be called once the handler has been registered.public Cluster unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler)
ClusterunregisterLeaveHandler in interface Clusterhandler - The handler to unregister.public Cluster unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
ClusterunregisterLeaveHandler in interface Clusterhandler - The handler to unregister.doneHandler - A handler to be called once the handle has been unregistered.public Cluster ping(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Cluster>> resultHandler)
Clusterpublic Cluster getGroup(String group, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
ClustergetGroup in interface Clustergroup - The address of the group.resultHandler - A handler to be called with the result. If the group
does not exist then a ClusterException will occur.public Cluster getGroups(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Group>>> resultHandler)
Clusterpublic Cluster selectGroup(Object key, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
ClusterThe cluster guarantees that the same group will always be selected given the same key so long as the group exists in the cluster. Once the group leaves the cluster a new group will be selected.
selectGroup in interface Clusterkey - The key from which to select the group.resultHandler - A handler to be called once complete.public Cluster getNode(String node, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
ClustergetNode in interface Clusternode - The address of the node.resultHandler - A handler to be called with the result. If the node
does not exist then a ClusterException will occur.public Cluster getNodes(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Node>>> resultHandler)
Clusterpublic Cluster selectNode(Object key, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
ClusterThe cluster guarantees that the same node will always be selected given the same key so long as the node exists in the cluster. Once the node leaves the cluster a new node will be selected.
selectNode in interface Clusterkey - The key from which to select the group.resultHandler - A handler to be called once complete.public Cluster installModule(String moduleName)
Cluster
The module being installed must be available on the local classpath in
the normal Vert.x mods directory. If the module is already
installed on a given node then the node will be skipped, otherwise the
local module will be zipped, uploaded, and installed to the node.
installModule in interface ClustermoduleName - The name of the module to install.public Cluster installModule(String moduleName, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Cluster
The module being installed must be available on the local classpath in
the normal Vert.x mods directory. If the module is already
installed on a given node then the node will be skipped, otherwise the
local module will be zipped, uploaded, and installed to the node.
installModule in interface ClustermoduleName - The name of the module to install.doneHandler - A handler to be called once the module has been installed.public Cluster uninstallModule(String moduleName)
ClusterWhen the module is uninstalled, it will be removed from the classpath of the remote node. This means you should not uninstall modules that were originally installed on any given node.
uninstallModule in interface ClustermoduleName - The name of the module to uninstall.public Cluster uninstallModule(String moduleName, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
ClusterWhen the module is uninstalled, it will be removed from the classpath of the remote node. This means you should not uninstall modules that were originally installed on any given node.
uninstallModule in interface ClustermoduleName - The name of the module to uninstall.doneHandler - A handler to be called once the module has been uninstalled.public Cluster deployModule(String moduleName)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.public Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.config - The module configuration.public Cluster deployModule(String moduleName, int instances)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.instances - The number of instances to deploy.public Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config, int instances)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.config - The module configuration.instances - The number of instances to deploy.public Cluster deployModule(String moduleName, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.doneHandler - A handler to be called once the module has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.config - The module configuration.doneHandler - A handler to be called once the module has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployModule(String moduleName, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.instances - The number of instances to deploy.doneHandler - A handler to be called once the module has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
ClusterThe module must be available on whichever node receives the deploy message. This means ideally the module should be installed on all nodes in the cluster. You can also select a node using the helper methods provided.
deployModule in interface ClustermoduleName - The name of the module to deploy.config - The module configuration.instances - The number of instances to deploy.doneHandler - A handler to be called once the module has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployVerticle(String main)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.public Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.config - The verticle configuration.public Cluster deployVerticle(String main, int instances)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.instances - The number of instances to deploy.public Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config, int instances)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.config - The verticle configuration.instances - The number of instances to deploy.public Cluster deployVerticle(String main, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.config - The verticle configuration.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployVerticle(String main, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.instances - The number of instances to deploy.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployVerticle in interface Clustermain - The verticle main.config - The verticle configuration.instances - The number of instances to deploy.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployWorkerVerticle(String main)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.public Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.config - The verticle configuration.public Cluster deployWorkerVerticle(String main, int instances)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.instances - The number of instances to deploy.public Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config, int instances, boolean multiThreaded)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.config - The verticle configuration.instances - The number of instances to deploy.multiThreaded - Indicates whether the worker should be multi-threaded.public Cluster deployWorkerVerticle(String main, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.config - The verticle configuration.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployWorkerVerticle(String main, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.instances - The number of instances to deploy.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config, int instances, boolean multiThreaded, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Cluster
The verticle must be available on whichever node receives the deploy message.
If the verticle is not available on the classpath, a ClusterException
will occur. You can deploy a verticle to a specific node by using the node
selection API, or by wrapping a verticle in a module Vertigo can upload and
deploy the module to a specific node.
deployWorkerVerticle in interface Clustermain - The verticle main.config - The verticle configuration.instances - The number of instances to deploy.multiThreaded - Indicates whether the worker should be multi-threaded.doneHandler - A handler to be called once the verticle has been deployed.
The handler will be called with the unique deployment ID if successful.public Cluster undeployModule(String deploymentID)
ClusterGiven the unique module deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
undeployModule in interface ClusterdeploymentID - The deployment ID of the module to undeploy.public Cluster undeployModule(String deploymentID, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
ClusterGiven the unique module deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
undeployModule in interface ClusterdeploymentID - The deployment ID of the module to undeploy.doneHandler - A handler to be called once complete.public Cluster undeployVerticle(String deploymentID)
ClusterGiven the unique verticle deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
undeployVerticle in interface ClusterdeploymentID - The deployment ID of the verticle to undeploy.public Cluster undeployVerticle(String deploymentID, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
ClusterGiven the unique verticle deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
undeployVerticle in interface ClusterdeploymentID - The deployment ID of the verticle to undeploy.doneHandler - A handler to be called once complete.public Cluster getNetworks(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<ActiveNetwork>>> resultHandler)
ClustergetNetworks in interface ClusterresultHandler - An asynchronous handler to be called with a collection of
active networks currently deployed in the cluster.public Cluster getNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> resultHandler)
ClustergetNetwork in interface Clustername - The name of the network to load.resultHandler - An asynchronous handler to be called with the active network.
If the network is not running in the cluster then a ClusterException
will occur.public Cluster deployNetwork(String name)
Cluster
The network will be deployed with no components and no connections. You
can add components and connections to the network with an ActiveNetwork
instance.
deployNetwork in interface Clustername - The name of the network to deploy.public Cluster deployNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Cluster
The network will be deployed with no components and no connections. You
can add components and connections to the network with an ActiveNetwork
instance.
deployNetwork in interface Clustername - The name of the network to deploy.doneHandler - An asynchronous handler to be called once the network has
completed deployment. The handler will be called with an ActiveNetwork
instance which can be used to add or remove components and connections from
the network.public Cluster deployNetwork(org.vertx.java.core.json.JsonObject network)
Cluster
The JSON network configuration will be converted to a NetworkConfig before
being deployed to the cluster. The conversion is done synchronously, so if the
configuration is invalid then this method may throw an exception.
deployNetwork in interface Clusternetwork - The JSON network configuration. For the configuration format see
the project documentation.public Cluster deployNetwork(org.vertx.java.core.json.JsonObject network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Cluster
The JSON network configuration will be converted to a NetworkConfig before
being deployed to the cluster. The conversion is done synchronously, so if the
configuration is invalid then this method may throw an exception.
deployNetwork in interface Clusternetwork - The JSON network configuration. For the configuration format see
the project documentation.doneHandler - An asynchronous handler to be called once the network has
completed deployment. The handler will be called with an ActiveNetwork
instance which can be used to add or remove components and connections from
the network.public Cluster deployNetwork(NetworkConfig network)
ClusterIf the given network configuration's name matches the name of a network that is already running in the cluster then the given configuration will be merged with the running network's configuration. This allows networks to be dynamically updated with partial configurations. If the configuration matches the already running configuration then no changes will occur, so it's not necessary to check whether a network is already running if the configuration has not been altered.
deployNetwork in interface Clusternetwork - The configuration of the network to deploy.public Cluster deployNetwork(NetworkConfig network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
ClusterIf the given network configuration's name matches the name of a network that is already running in the cluster then the given configuration will be merged with the running network's configuration. This allows networks to be dynamically updated with partial configurations. If the configuration matches the already running configuration then no changes will occur, so it's not necessary to check whether a network is already running if the configuration has not been altered.
deployNetwork in interface Clusternetwork - The configuration of the network to deploy.doneHandler - An asynchronous handler to be called once the network has
completed deployment. The handler will be called with an ActiveNetwork
instance which can be used to add or remove components and connections from
the network.public Cluster undeployNetwork(String name)
ClusterThis method does not require a network configuration for undeployment. Vertigo will load the configuration from the fault-tolerant data store and undeploy components internally. This allows networks to be undeployed without the network configuration.
undeployNetwork in interface Clustername - The name of the network to undeploy.public Cluster undeployNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
ClusterThis method does not require a network configuration for undeployment. Vertigo will load the configuration from the fault-tolerant data store and undeploy components internally. This allows networks to be undeployed without the network configuration.
undeployNetwork in interface Clustername - The name of the network to undeploy.doneHandler - An asynchronous handler to be called once the network is undeployed.public Cluster undeployNetwork(org.vertx.java.core.json.JsonObject network)
Cluster
The JSON configuration will immediately be converted to a NetworkConfig prior
to undeploying the network. In order to undeploy the entire network, the configuration
should be the same as the deployed configuration. Vertigo will use configuration
components to determine whether two configurations are identical. If the given
configuration is not identical to the running configuration, any components or
connections in the json configuration that are present in the running network
will be closed and removed from the running network.
undeployNetwork in interface Clusternetwork - The JSON configuration to undeploy. For the configuration format see
the project documentation.public Cluster undeployNetwork(org.vertx.java.core.json.JsonObject network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Cluster
The JSON configuration will immediately be converted to a NetworkConfig prior
to undeploying the network. In order to undeploy the entire network, the configuration
should be the same as the deployed configuration. Vertigo will use configuration
components to determine whether two configurations are identical. If the given
configuration is not identical to the running configuration, any components or
connections in the json configuration that are present in the running network
will be closed and removed from the running network.
undeployNetwork in interface Clusternetwork - The JSON configuration to undeploy. For the configuration format see
the project documentation.doneHandler - An asynchronous handler to be called once the configuration is undeployed.public Cluster undeployNetwork(NetworkConfig network)
Cluster
This method supports both partial and complete undeployment of networks. When
undeploying networks by specifying a NetworkConfig, the network configuration
should contain all components and connections that are being undeployed. If the
configuration's components and connections match all deployed components and
connections then the entire network will be undeployed.
undeployNetwork in interface Clusternetwork - The network configuration to undeploy.public Cluster undeployNetwork(NetworkConfig network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Cluster
This method supports both partial and complete undeployment of networks. When
undeploying networks by specifying a NetworkConfig, the network configuration
should contain all components and connections that are being undeployed. If the
configuration's components and connections match all deployed components and
connections then the entire network will be undeployed.
undeployNetwork in interface Clusternetwork - The network configuration to undeploy.doneHandler - An asynchronous handler to be called once the configuration is undeployed.public <K,V> AsyncMap<K,V> getMap(String name)
Clusterpublic <K,V> AsyncMultiMap<K,V> getMultiMap(String name)
ClustergetMultiMap in interface Clustername - The name of the multi-map to get.public <T> AsyncSet<T> getSet(String name)
Clusterpublic <T> AsyncList<T> getList(String name)
Clusterpublic <T> AsyncQueue<T> getQueue(String name)
Clusterpublic AsyncCounter getCounter(String name)
ClustergetCounter in interface Clustername - The name of the counter to get.Copyright © 2013-2014. All Rights Reserved.