Package org.jmxtrans.embedded.config
Class EtcdKVStore
java.lang.Object
org.jmxtrans.embedded.config.EtcdKVStore
- All Implemented Interfaces:
KVStore
public class EtcdKVStore extends Object implements KVStore
This is an etcd based KVStore implementation. The connection to etcd is estabilished and closed
every time a key is read. This is by design since we don't need to read a lot of keys and we do
it at relativly long interval times
- Author:
- Simone Zorzetti
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEtcdKVStore.EtcdNodeBean for a simplified etcd nodestatic classEtcdKVStore.EtcdResultBean for a simplified etcd answer (just for GET) -
Constructor Summary
Constructors Constructor Description EtcdKVStore() -
Method Summary
Modifier and Type Method Description KeyValuegetKeyValue(String KeyURI)Get a key value from etcd.
-
Constructor Details
-
EtcdKVStore
public EtcdKVStore()
-
-
Method Details
-
getKeyValue
Get a key value from etcd. Returns the key value and the etcd modification index as version- Specified by:
getKeyValuein interfaceKVStore- Parameters:
KeyURI- URI of the key in the form etcd://ipaddr:port/path for an etcd cluster you can use etcd://[ipaddr1:port1, ipaddr:port2,...]:/path- Returns:
- a KeyValue object
- Throws:
EmbeddedJmxTransException- See Also:
KVStore.getKeyValue(java.lang.String)
-