There was an error while loading. Please reload this page.
1 parent ac0c537 commit 9e28c79Copy full SHA for 9e28c79
redis/transaction-exception.java.snippet
@@ -0,0 +1,14 @@
1
+ jedis.set("a", "foo");
2
+ jedis.set("b", "bar");
3
+ jedis.set("c", "baz");
4
+ Transaction t = jedis.multi();
5
+
6
+ Response<String> r1 = t.set("b", "1");
7
+ Response<Long> r2 = t.incr("a");
8
+ Response<String> r3 = t.set("c", "100");
9
10
+ t.exec();
11
+ r1.get(); // OK
12
+ r2.get(); // throw exception JedisDataException
13
+ r3.get(); // OK
14
0 commit comments