xetorthio/jedis — pull request #669 by HeartSaVioR (2014-07-02 15:00:18+00:00)
Title: JedisCluster : Renew whole slots info when MOVED has occurred

At first, this PR is based on #667, so we should merge both of two PRs or discard this PR.

Recently, Redis 3.0 beta 7 introduces CLUSTER SLOTS, and update cluster specification to suggest renew slot information when MOVED response is received.

http://redis.io/topics/cluster-spec
````
Clients usually need to fetch a complete list of slots and mapped node addresses in two different moments:
At startup in order to populate the initial slots configuration.
When a MOVED redirection is received.
Note that a client may handle the MOVED redirection updating just the moved slot in its table, however this is usually not efficient since often the configuration of multiple slots is modified at once (for example if a slave is promoted to master, all the slots served by the old master will be remapped). It is much simpler to react to a MOVED redirection fetching the full map of slots - nodes from scratch.
In order to retrieve the slots configuration Redis Cluster offers (starting with 3.0.0 beta-7) an alternative to the CLUSTER NODES command that does not require parsing, and only provides the information strictly needed to clients.
````

This PR applies his suggestion to JedisCluster.

Please review and comment! Thanks!