public interface ClusterManager
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Returns the cluster address.
|
ClusterManager |
deployNetwork(org.vertx.java.core.json.JsonObject network)
Deploys a json network to the cluster.
|
ClusterManager |
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.
|
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 |
deployNetwork(String name)
Deploys a bare network to the cluster.
|
ClusterManager |
deployNetwork(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<ActiveNetwork>> doneHandler)
Deploys a bare 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 |
getNetworks(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Collection<ActiveNetwork>>> resultHandler)
Gets a list of networks deployed in the cluster.
|
ClusterManager |
isDeployed(String name,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Boolean>> resultHandler)
Checks whether a network is deployed in the cluster.
|
ClusterManager |
undeployNetwork(org.vertx.java.core.json.JsonObject network)
Undeploys a network from json.
|
ClusterManager |
undeployNetwork(org.vertx.java.core.json.JsonObject network,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Undeploys a network from json.
|
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.
|
String address()
ClusterManager 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
ActiveNetwork instances, each representing a network running in
the cluster.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 isDeployed(String name, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Boolean>> resultHandler)
In order to check whether a network is deployed, 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(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.ClusterManager 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.ClusterManager 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.ClusterManager 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. Once the network
has been deployed an ActiveNetwork will be provided which can be used to
add and remove components and connections from the network.
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.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(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.ClusterManager 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.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 configuration is undeployed.Copyright © 2013-2014. All Rights Reserved.