Package org.lable.oss.uniqueid.etcd
Class EtcdHelper
- java.lang.Object
-
- org.lable.oss.uniqueid.etcd.EtcdHelper
-
public class EtcdHelper extends Object
Utility methods that make working with jetcd a little less verbose.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEtcdHelper.OnRelease
-
Constructor Summary
Constructors Constructor Description EtcdHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddelete(io.etcd.jetcd.Client etcd, String key)static Optional<String>get(io.etcd.jetcd.Client etcd, String key)static Optional<Integer>getInt(io.etcd.jetcd.Client etcd, String key)static io.etcd.jetcd.support.CloseableClientkeepLeaseAlive(io.etcd.jetcd.Client etcd, Long leaseId, EtcdHelper.OnRelease onRelease)static voidput(io.etcd.jetcd.Client etcd, String key)static voidput(io.etcd.jetcd.Client etcd, String key, int value)
-
-
-
Method Detail
-
getInt
public static Optional<Integer> getInt(io.etcd.jetcd.Client etcd, String key) throws ExecutionException, InterruptedException
-
get
public static Optional<String> get(io.etcd.jetcd.Client etcd, String key) throws ExecutionException, InterruptedException
-
put
public static void put(io.etcd.jetcd.Client etcd, String key, int value) throws ExecutionException, InterruptedException
-
put
public static void put(io.etcd.jetcd.Client etcd, String key) throws ExecutionException, InterruptedException
-
delete
public static void delete(io.etcd.jetcd.Client etcd, String key) throws ExecutionException, InterruptedException
-
keepLeaseAlive
public static io.etcd.jetcd.support.CloseableClient keepLeaseAlive(io.etcd.jetcd.Client etcd, Long leaseId, EtcdHelper.OnRelease onRelease)
-
-