Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - justinsb/jetcd: Java binding for etcd
Java binding for etcd. Contribute to justinsb/jetcd development by creating an account on GitHub.
Visit SiteGitHub - justinsb/jetcd: Java binding for etcd
Java binding for etcd. Contribute to justinsb/jetcd development by creating an account on GitHub.
Powered by 0x5a.live 💗
jetcd: Java binding for etcd
CircleCI:
A simple Java client library for the awesome etcd
Uses the Apache HttpAsyncClient to implement watches without blocking a thread, and Google's Guava to give us the nice ListenableFuture interface.
Check out SmokeTest.java to see how this is used (and tested), but here's a quick code example:
EtcdClient client = new EtcdClient(URI.create("http://127.0.0.1:4001/"));
String key = "/watch";
EtcdResult result = this.client.set(key, "hello");
Assert.assertEquals("hello", result.value);
result = this.client.get(key);
Assert.assertEquals("hello", result.value);
ListenableFuture<EtcdResult> watchFuture = this.client.watch(key, result.index + 1);
Assert.assertFalse(watchFuture.isDone());
result = this.client.set(key, "world");
Assert.assertEquals("world", result.value);
EtcdResult watchResult = watchFuture.get(100, TimeUnit.MILLISECONDS);
Assert.assertNotNull(result);
Assert.assertEquals("world", result.value);
For a bit of background, check out the blog post
Java Resources
are all listed below.
GitHub - ben-manes/caffeine: A high performance caching library for Java
resource
~/github.com
resource
GitHub - wanglingsong/JsonSurfer: A streaming JsonPath processor in Java
resource
~/github.com
resource
GitHub - jaegertracing/jaeger-client-java: 🛑 This library is DEPRECATED!
resource
~/github.com
resource
GitHub - diffplug/selfie: Snapshot testing for Java, Kotlin, and the JVM
resource
~/github.com
resource
Made with ❤️
to provide different kinds of informations and resources.