Skip to content

Instantly share code, notes, and snippets.

@HeartSaVioR
Last active August 29, 2015 13:56
Show Gist options
  • Save HeartSaVioR/9035347 to your computer and use it in GitHub Desktop.
Save HeartSaVioR/9035347 to your computer and use it in GitHub Desktop.
Jedis pipelined transaction sync() errors workaround
Jedis j = new Jedis(HOSTNAME, PORT);
j.set("foo", "314");
Pipeline p = j.pipelined();
p.multi();
Response<String> r = p.get("foo");
Response<String> multiResp = p.exec();
p.sync();
multiResp.get(); // to achieve r.get()
System.out.println(r.get());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment