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.
-
-
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<Integer>getInt(io.etcd.jetcd.Client etcd, String key)static io.etcd.jetcd.CloseableClientkeepLeaseAlive(io.etcd.jetcd.Client etcd, Long leaseId, org.lable.oss.uniqueid.etcd.EtcdHelper.OnRelease onRelease)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
-
put
public static void put(io.etcd.jetcd.Client etcd, String key, int value) throws ExecutionException, InterruptedException
-
delete
public static void delete(io.etcd.jetcd.Client etcd, String key) throws ExecutionException, InterruptedException
-
keepLeaseAlive
public static io.etcd.jetcd.CloseableClient keepLeaseAlive(io.etcd.jetcd.Client etcd, Long leaseId, org.lable.oss.uniqueid.etcd.EtcdHelper.OnRelease onRelease)
-
-