public interface Group
This client handles deployment of modules and verticles within a group of nodes in a Vertigo cluster.
A single Vertigo cluster can be split into deployment groups. Groups allow users to specify groups of nodes on which a given module or verticle can be deployed. This is an interface for operating on a single group within a specific cluster. Deployments made to the group are guaranteed to be deployed only on nodes within the group.
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Returns the group address.
|
Group |
deployModule(String moduleName)
Deploys a module to the group.
|
Group |
deployModule(String moduleName,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a module to the group.
|
Group |
deployModule(String moduleName,
int instances)
Deploys a module to the group.
|
Group |
deployModule(String moduleName,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a module to the group.
|
Group |
deployModule(String moduleName,
org.vertx.java.core.json.JsonObject config)
Deploys a module to the group.
|
Group |
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 group.
|
Group |
deployModule(String moduleName,
org.vertx.java.core.json.JsonObject config,
int instances)
Deploys a module to the group.
|
Group |
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 group.
|
Group |
deployVerticle(String main)
Deploys a verticle to the group.
|
Group |
deployVerticle(String main,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a verticle to the group.
|
Group |
deployVerticle(String main,
int instances)
Deploys a verticle to the group.
|
Group |
deployVerticle(String main,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a verticle to the group.
|
Group |
deployVerticle(String main,
org.vertx.java.core.json.JsonObject config)
Deploys a verticle to the group.
|
Group |
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 group.
|
Group |
deployVerticle(String main,
org.vertx.java.core.json.JsonObject config,
int instances)
Deploys a verticle to the group.
|
Group |
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 group.
|
Group |
deployWorkerVerticle(String main)
Deploys a worker verticle to the group.
|
Group |
deployWorkerVerticle(String main,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a worker verticle to the group.
|
Group |
deployWorkerVerticle(String main,
int instances)
Deploys a worker verticle to the group.
|
Group |
deployWorkerVerticle(String main,
int instances,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<String>> doneHandler)
Deploys a worker verticle to the group.
|
Group |
deployWorkerVerticle(String main,
org.vertx.java.core.json.JsonObject config)
Deploys a worker verticle to the group.
|
Group |
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 group.
|
Group |
deployWorkerVerticle(String main,
org.vertx.java.core.json.JsonObject config,
int instances,
boolean multiThreaded)
Deploys a worker verticle to the group.
|
Group |
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 group.
|
Group |
getNode(String address,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
Gets a node in the group.
|
Group |
getNodes(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<Node>>> resultHandler)
Gets a collection of nodes in the group.
|
Group |
installModule(String moduleName)
Installs a local module to all nodes in the group.
|
Group |
installModule(String moduleName,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Installs a local module to all nodes in the group.
|
Group |
ping(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
Pings the group.
|
Group |
registerJoinHandler(org.vertx.java.core.Handler<Node> handler)
Registers a handler to be called when a node joins the group.
|
Group |
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 group.
|
Group |
registerLeaveHandler(org.vertx.java.core.Handler<Node> handler)
Registers a handler to be called when a node leaves the group.
|
Group |
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 group.
|
Group |
selectNode(Object key,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
Selects a node in the group according to the given key.
|
Group |
undeployModule(String deploymentID)
Undeploys a module from the group.
|
Group |
undeployModule(String deploymentID,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a module from the group.
|
Group |
undeployVerticle(String deploymentID)
Undeploys a verticle from the group.
|
Group |
undeployVerticle(String deploymentID,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a verticle from the group.
|
Group |
uninstallModule(String moduleName)
Uninstalls a module from all nodes in the group.
|
Group |
uninstallModule(String moduleName,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Uninstalls a module from all nodes in the group.
|
Group |
unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler)
Unregisters a node join handler.
|
Group |
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.
|
Group |
unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler)
Unregisters a node leave handler.
|
Group |
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()
Group registerJoinHandler(org.vertx.java.core.Handler<Node> handler)
You can also register an event bus handler to listen for nodes joining
the group by registering a handler at {cluster}.{group}.join.
The handler will receive a String message containing the
absolute event bus address of the node that joined the group.
handler - A handler to be called when the node joins the group.Group 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 group by registering a handler at {cluster}.{group}.join.
The handler will receive a String message containing the
absolute event bus address of the node that joined the group.
handler - A handler to be called when the node joins the group.doneHandler - A handler to be called once the handler has been registered.Group unregisterJoinHandler(org.vertx.java.core.Handler<Node> handler)
handler - The handler to unregister.Group 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.Group registerLeaveHandler(org.vertx.java.core.Handler<Node> handler)
You can also register an event bus handler to listen for nodes leaving
the group by registering a handler at {cluster}.{group}.leave.
The handler will receive a String message containing the
absolute event bus address of the node that left the group.
handler - A handler to be called when the node leaves the group.Group 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 group by registering a handler at {cluster}.{group}.leave.
The handler will receive a String message containing the
absolute event bus address of the node that left the group.
handler - A handler to be called when the node leaves the group.doneHandler - A handler to be called once the handler has been registered.Group unregisterLeaveHandler(org.vertx.java.core.Handler<Node> handler)
handler - The handler to unregister.Group 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.Group ping(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Group>> resultHandler)
resultHandler - A handler to be called once the group responds.Group 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.Group 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.Group selectNode(Object key, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Node>> resultHandler)
The group guarantees that the same node will always be selected given the same key so long as the node exists in the group. Once the node leaves the group a new node will be selected.
key - The key from which to select the group.resultHandler - A handler to be called once complete.Group 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.Group 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.Group 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.Group 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.Group 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 group. You can also select a node using the helper methods provided.
moduleName - The name of the module to deploy.Group 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 group. You can also select a node using the helper methods provided.
moduleName - The name of the module to deploy.config - The module configuration.Group 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 group. 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.Group 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 group. 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.Group 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 group. 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.Group 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 group. 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.Group 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 group. 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.Group 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 group. 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group 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.Group undeployModule(String deploymentID)
Given the unique module deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the group.
deploymentID - The deployment ID of the module to undeploy.Group 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 group.
deploymentID - The deployment ID of the module to undeploy.doneHandler - A handler to be called once complete.Group undeployVerticle(String deploymentID)
Given the unique verticle deployment ID, Vertigo will ensure that the deployment is undeployed from the appropriate node in the group.
deploymentID - The deployment ID of the verticle to undeploy.Group 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 group.
deploymentID - The deployment ID of the verticle to undeploy.doneHandler - A handler to be called once complete.Copyright © 2013-2014. All Rights Reserved.