public interface Cluster
This client is the primary API for communicating with a Vertigo cluster. Users can use the API to deploy modules, verticles, and networks or access cluster-wide shared data.
The Vertigo cluster is a collection of modules that coordinate and communicate to remotely deploy modules and verticles and provide access to cluster-wide shared data. The Vertigo cluster does not have any master. Users can communicate with a cluster using this API or by sending messages directly to the cluster over the event bus.
| 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.
|
AsyncCounter |
getCounter(String name)
Gets an asynchronous counter from the cluster.
|
Cluster |
getGroup(String address,
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 address,
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.
|
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.
|
String address()
Cluster registerJoinHandler(org.vertx.java.core.Handler<Node> handler)
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.
handler - A handler to be called when the 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)
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.
handler - A handler to be called when the node joins the cluster.doneHandler - A handler to be called once the handler has been registered.Cluster unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler)
handler - The handler to unregister.Cluster unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
handler - The handler to unregister.doneHandler - A handler to be called once the handle has been unregistered.Cluster registerLeaveHandler(org.vertx.java.core.Handler<Node> handler)
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.
handler - A handler to be called when the 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)
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.
handler - A handler to be called when the node leaves the cluster.doneHandler - A handler to be called once the handler has been registered.Cluster unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler)
handler - The handler to unregister.Cluster unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
handler - The handler to unregister.doneHandler - A handler to be called once the handle has been unregistered.Cluster ping(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Cluster>> resultHandler)
resultHandler - A handler to be called once the cluster responds.Cluster getGroup(String address, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
address - 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.Cluster getGroups(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Group>>> resultHandler)
resultHandler - A handler to be called once the groups are loaded.Cluster selectGroup(Object key, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
The 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.
key - The key from which to select the group.resultHandler - A handler to be called once complete.Cluster getNode(String address, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
address - 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.Cluster getNodes(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Node>>> resultHandler)
resultHandler - A handler to be called once the nodes are loaded.Cluster selectNode(Object key, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
The 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.
key - The key from which to select the group.resultHandler - A handler to be called once complete.Cluster installModule(String moduleName)
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.
moduleName - The name of the module to install.Cluster installModule(String moduleName, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
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.
moduleName - The name of the module to install.doneHandler - A handler to be called once the module has been installed.Cluster uninstallModule(String moduleName)
When 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.
moduleName - The name of the module to uninstall.Cluster uninstallModule(String moduleName, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
When 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.
moduleName - The name of the module to uninstall.doneHandler - A handler to be called once the module has been uninstalled.Cluster deployModule(String moduleName)
The 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.
moduleName - The name of the module to deploy.Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config)
The 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.
moduleName - The name of the module to deploy.config - The module configuration.Cluster deployModule(String moduleName, int instances)
The 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.
moduleName - The name of the module to deploy.instances - The number of instances to deploy.Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config, int instances)
The 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.
moduleName - The name of the module to deploy.config - The module configuration.instances - The number of instances to deploy.Cluster deployModule(String moduleName, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
The 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.
moduleName - 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.Cluster deployModule(String moduleName, org.vertx.java.core.json.JsonObject config, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
The 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.
moduleName - 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.Cluster deployModule(String moduleName, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
The 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.
moduleName - 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.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)
The 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.
moduleName - 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.Cluster deployVerticle(String main)
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.
main - The verticle main.Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config)
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.
main - The verticle main.config - The verticle configuration.Cluster deployVerticle(String main, int instances)
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.
main - The verticle main.instances - The number of instances to deploy.Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config, int instances)
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.
main - The verticle main.config - The verticle configuration.instances - The number of instances to deploy.Cluster deployVerticle(String main, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
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.
main - 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.Cluster deployVerticle(String main, org.vertx.java.core.json.JsonObject config, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
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.
main - 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.Cluster deployVerticle(String main, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
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.
main - 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.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)
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.
main - 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.Cluster deployWorkerVerticle(String main)
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.
main - The verticle main.Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config)
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.
main - The verticle main.config - The verticle configuration.Cluster deployWorkerVerticle(String main, int instances)
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.
main - The verticle main.instances - The number of instances to deploy.Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config, int instances, boolean multiThreaded)
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.
main - The verticle main.config - The verticle configuration.instances - The number of instances to deploy.multiThreaded - Indicates whether the worker should be multi-threaded.Cluster deployWorkerVerticle(String main, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
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.
main - 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.Cluster deployWorkerVerticle(String main, org.vertx.java.core.json.JsonObject config, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
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.
main - 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.Cluster deployWorkerVerticle(String main, int instances, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
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.
main - 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.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)
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.
main - 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.Cluster undeployModule(String deploymentID)
Given the unique module deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
deploymentID - The deployment ID of the module to undeploy.Cluster undeployModule(String deploymentID, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Given the unique module deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
deploymentID - The deployment ID of the module to undeploy.doneHandler - A handler to be called once complete.Cluster undeployVerticle(String deploymentID)
Given the unique verticle deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
deploymentID - The deployment ID of the verticle to undeploy.Cluster undeployVerticle(String deploymentID, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Given the unique verticle deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the cluster.
deploymentID - The deployment ID of the verticle to undeploy.doneHandler - A handler to be called once complete.Cluster getNetworks(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<ActiveNetwork>>> resultHandler)
resultHandler - An asynchronous handler to be called with a collection of
active networks currently deployed in the cluster.Cluster getNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> resultHandler)
name - 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.Cluster deployNetwork(String name)
The network will be deployed with no components and no connections. You
can add components and connections to the network with an ActiveNetwork
instance.
name - The name of the network to deploy.Cluster deployNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
The network will be deployed with no components and no connections. You
can add components and connections to the network with an ActiveNetwork
instance.
name - 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.Cluster deployNetwork(org.vertx.java.core.json.JsonObject network)
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.
network - The JSON network configuration. For the configuration format see
the project documentation.Cluster deployNetwork(org.vertx.java.core.json.JsonObject network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
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.
network - 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.Cluster deployNetwork(NetworkConfig network)
If 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.
network - The configuration of the network to deploy.Cluster deployNetwork(NetworkConfig network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
If 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.
network - 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.Cluster undeployNetwork(String name)
This 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.
name - The name of the network to undeploy.Cluster undeployNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
This 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.
name - The name of the network to undeploy.doneHandler - An asynchronous handler to be called once the network is undeployed.Cluster undeployNetwork(org.vertx.java.core.json.JsonObject network)
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.
network - The JSON configuration to undeploy. For the configuration format see
the project documentation.Cluster undeployNetwork(org.vertx.java.core.json.JsonObject network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
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.
network - 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.Cluster undeployNetwork(NetworkConfig network)
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.
network - The network configuration to undeploy.Cluster undeployNetwork(NetworkConfig network, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
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.
network - The network configuration to undeploy.doneHandler - An asynchronous handler to be called once the configuration is undeployed.<K,V> AsyncMap<K,V> getMap(String name)
name - The name of the map to get.<K,V> AsyncMultiMap<K,V> getMultiMap(String name)
name - The name of the multi-map to get.<T> AsyncSet<T> getSet(String name)
name - The name of the set to get.<T> AsyncList<T> getList(String name)
name - The name of the list to get.<T> AsyncQueue<T> getQueue(String name)
name - The name of the queue to get.AsyncCounter getCounter(String name)
name - The name of the counter to get.Copyright © 2013-2014. All Rights Reserved.