adohe-zz / etcd4j

A more powerful and stable etcd java client.
MIT License
36 stars 18 forks source link

Is there returnValue underlying one atomic operation? #8

Closed ghost closed 8 years ago

ghost commented 9 years ago

I see one API in 1.2

public void set(String key, String value, Integer ttl, Boolean prevExist) throws EtcdClientException

But it is not with returnValue. I except that some clients concurrently access the proxy under that only one can get the lock ( set key-value is OK).

adohe-zz commented 9 years ago

@fjjiaboming Ok, I will look into.

ghost commented 9 years ago

So now I get key and judge the value after having setted key , that I can regard as one atomic operation judge.

adohe-zz commented 9 years ago

@fjjiaboming So if you have better solution you may open a PR.

ghost commented 9 years ago

OK. I need some time to know the ETCD.

adohe-zz commented 9 years ago

@fjjiaboming Ok, you can visit this link: https://github.com/coreos/etcd/blob/master/Documentation/api.md for more references.

ghost commented 9 years ago

@AdoHe ok