public class ZookeepersAsConfigSource extends Object implements ConfigurationSource
| Constructor and Description |
|---|
ZookeepersAsConfigSource()
Construct a new ZookeepersAsConfigSource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(org.apache.commons.configuration.Configuration configuration)
This class required two parameters to be set in the configuration object passed:
quorum
Comma-separated list of addresses for the Zookeeper quorum.
|
void |
listen(HierarchicalConfigurationDeserializer deserializer,
ConfigChangeListener listener)
When this method is called, it connects to the Zookeeper quorum, and maintains a watch on the
configuration node.
|
void |
load(HierarchicalConfigurationDeserializer deserializer,
ConfigChangeListener listener)
For the initial loading of the configuration, this class connects to the Zookeeper quorum,
waits for a successful connection, and then loads the configuration once.
|
String |
name() |
List<String> |
systemProperties() |
public ZookeepersAsConfigSource()
public String name()
name in interface ConfigurationSourcepublic List<String> systemProperties()
systemProperties in interface ConfigurationSourcepublic void configure(org.apache.commons.configuration.Configuration configuration)
throws ConfigurationException
configure in interface ConfigurationSourceConfigurationExceptionpublic void listen(HierarchicalConfigurationDeserializer deserializer, ConfigChangeListener listener)
listen in interface ConfigurationSourcepublic void load(HierarchicalConfigurationDeserializer deserializer, ConfigChangeListener listener) throws ConfigurationException
load in interface ConfigurationSourceConfigurationExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2015 Lable. All rights reserved.