public interface ClusterManager
| Modifier and Type | Method and Description |
|---|---|
ClusterManager |
deployNetwork(NetworkConfig network)
Deploys a network to the cluster.
|
ClusterManager |
deployNetwork(NetworkConfig network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Deploys a network to the cluster.
|
ClusterManager |
getNetwork(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> resultHandler)
Gets a network reference for a deployed network.
|
ClusterManager |
isRunning(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Boolean>> resultHandler)
Checks whether a network is running in the cluster.
|
ClusterScope |
scope()
Returns the cluster manager scope.
|
ClusterManager |
undeployNetwork(NetworkConfig network)
Undeploys a network from the cluster.
|
ClusterManager |
undeployNetwork(NetworkConfig network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a network from the cluster.
|
ClusterManager |
undeployNetwork(String name)
Undeploys a complete network from the cluster.
|
ClusterManager |
undeployNetwork(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a complete network from the cluster.
|
ClusterScope scope()
ClusterManager getNetwork(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> resultHandler)
If the network is running in the cluster then an ActiveNetwork
instance will be returned to the asynchronous handler. The ActiveNetwork
can be used to arbitrarily and asynchronously alter the structure of the
running network.
name - The name of the network to get.resultHandler - An asynchronous handler to be called with the result. If the
network exists then an ActiveNetwork instance which references the
running network will be provided, otherwise, the result will be nullClusterManager isRunning(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Boolean>> resultHandler)
In order to check whether a network is running, the cluster manager attempts to load the network's configuration from the internal Vertigo coordination cluster. If the configuration exists then the cluster manager then checks to see if the network is actually running.
name - The name of the network to check.resultHandler - An asynchronous handler to be called with the result.ClusterManager 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.ClusterManager 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 deployment is complete.
The handler will be called with an ActiveNetwork instance that references
the running network. The ActiveNetwork can be used to arbitrarily
and asynchronously update the live network configuration.ClusterManager 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.ClusterManager 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.ClusterManager 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.ClusterManager 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 network is undeployed.Copyright © 2013-2014. All Rights Reserved.