JedisPool / JedisSentinelPool resets returning object's state (watched,

multi)

* BinaryClient / BinaryJedis : added feature to reset its state
(watched, multi)
* JedisPool / JedisSentinelPool : calls new feature (reset state) when
Jedis object returns to pool
* Unit Test included
This commit is contained in:
Jungtaek Lim
2013-12-21 01:33:46 +09:00
parent 46734e646a
commit 3073f778b4
7 changed files with 116 additions and 1 deletions

View File

@@ -1709,6 +1709,11 @@ public class BinaryJedis implements BasicCommands, BinaryJedisCommands, MultiKey
public void disconnect() {
client.disconnect();
}
public void resetState() {
client.resetState();
client.getAll();
}
public String watch(final byte[]... keys) {
client.watch(keys);