Redis客戶端開發包:Jedis學習-高級應用

事務 Jedis中事務的寫法是將redis操作寫在事物代碼塊中,如下所示,multi與exec之間爲具體的事務。 jedis.watch (key1, key2, ...); Transaction t = jedis.multi(); t.set("foo", "bar"); t.exec(); 另外,在事務內部,是不能通過Jedis對象去獲取值的,不過可以通過Transaction對象去獲取,
相關文章
相關標籤/搜索