public interface NetworkContext extends Context<NetworkContext>
Network contexts are immutable as they are constructed after a network is deployed.
| Modifier and Type | Method and Description |
|---|---|
<T extends ComponentContext<T>> |
component(String name)
Returns a component context by name.
|
List<ComponentContext<?>> |
components()
Returns a list of network component contexts.
|
NetworkConfig |
config()
Returns the network configuration from which the context was built.
|
boolean |
hasComponent(String name)
Returns a boolean indicating whether the component exists.
|
String |
name()
Returns the network name.
|
String |
status()
Returns the network status address.
|
String |
version()
Returns the network version.
|
notify, registerObserver, unregisterObserverString name()
The network name is unique to the network within a Vertigo cluster.
String version()
NetworkConfig config()
String status()
This is the address of a shared-data key that is monitored by all component instances in the cluster. When the key is set, components know that the network is considered stable. During a network configuration change, the network manager will unset the status address, notifying components that the network is no longer stable until the key is reset. This is the mechanism used by Vertigo to perform coordination between components.
List<ComponentContext<?>> components()
boolean hasComponent(String name)
name - The name of the component to check.<T extends ComponentContext<T>> T component(String name)
name - The component name.IllegalArgumentException - If a component does not exist at the given name.Copyright © 2013-2014. All Rights Reserved.