public interface EtcdClient
| Modifier and Type | Method and Description |
|---|---|
void |
compareAndSwap(java.lang.String key,
java.lang.String oldValue,
java.lang.String newValue)
Compare the value at a given key and swap with newValue if the oldValue
matches.
|
void |
delete(java.lang.String key)
Delete value for the given key.
|
java.lang.String |
get(java.lang.String key)
Retrieve the value of the given key, if set.
|
java.util.Map<java.lang.String,java.lang.String> |
list(java.lang.String path)
List directory at given path.
|
void |
set(java.lang.String key,
java.lang.String value)
Set value for the given key.
|
void |
set(java.lang.String key,
java.lang.String value,
int ttl)
Set value for the given key with given TTL.
|
java.lang.String |
version() |
java.lang.String version()
throws EtcdException
EtcdException - in case of an errorjava.lang.String get(java.lang.String key)
throws EtcdException
key - Key to look upEtcdException - in case of an error (e.g. key doesn't exist)void set(java.lang.String key,
java.lang.String value)
throws EtcdException
key - Key to set value forvalue - New value for the keyEtcdException - in case of an errorvoid set(java.lang.String key,
java.lang.String value,
int ttl)
throws EtcdException
key - Key to set value forvalue - New value for the keyttl - Key will expire after these many secondsEtcdException - in case of an errorvoid delete(java.lang.String key)
throws EtcdException
key - Key to delete value forEtcdException - in case of an errorjava.util.Map<java.lang.String,java.lang.String> list(java.lang.String path)
throws EtcdException
path - Given pathEtcdException - in case of an errorvoid compareAndSwap(java.lang.String key,
java.lang.String oldValue,
java.lang.String newValue)
throws EtcdException
key - Key to test/set value atoldValue - Old valuenewValue - New valueEtcdException - in case of an error