xetorthio/jedis — pull request #673 by HeartSaVioR (2014-07-09 04:15:28+00:00)
Title: Supports Multi Key commands to JedisCluster

Hello.

As supporting Redis Cluster work, I implemented Cluster multi key commands based on previous interfaces.

During implementing, I found that some commands are fine with Redis, but maybe some commands are not fine with Redis Cluster.
(Actually there're no documentation from Redis describing cluster-able commands.)

So I removed some suspicious commands from interface, and introduced new interfaces for Jedis Cluster.
(Please let me know when you think something is wrong.)

Below is the commands I removed from previous interfaces.

BinaryJedisClusterCommands (copied from BinaryCommands)

- List blpop(byte[] arg);
- List brpop(byte[] arg);
- Long move(byte[] key, int dbIndex);

MultiKeyBinaryJedisClusterCommands (copied from MultiKeyBinaryCommands)

- List blpop(byte[]... args);
- List brpop(byte[]... args);
- Set keys(byte[] pattern);
- String watch(byte[]... keys);
- String unwatch();
- byte[] randomBinaryKey();

JedisClusterCommands (copied from JedisCommands)

- List blpop(String arg);
- List brpop(String arg);
- Long move(String key, int dbIndex);
- ScanResult> hscan(final String key, int cursor);
- ScanResult sscan(final String key, int cursor);
- ScanResult zscan(final String key, int cursor);

MultiKeyJedisClusterCommands (copied from MultiKeyCommands)

- String watch(String... keys);
- String unwatch();
- String randomKey();
- ScanResult scan(int cursor);
- ScanResult scan(final String cursor);
- Set keys(String pattern);
- List blpop(String... args);
- List brpop(String... args);

And I introduce some utils and exception, you can find it from commit log.

Please review and comment so that this PR goes to cluster-revised.
Thanks!