Skip to content

Commit 9e28c79

Browse files
author
Vitalii Cherkashyn
committed
behavior of transaction
1 parent ac0c537 commit 9e28c79

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)