jedis
jedis copied to clipboard
Introduce a way to easily check cluster status
Expected behavior
There should be a easy to check if the cluster is initialized properly. I.e. if there is a pool initialized for each hash slot.
For example, if we add a isInitialized()
, users would at least be able to do
JedisCluster cluster = new JedisCluster(...);
if (!cluster.isInitialized()) {
...
}
Actual behavior
Currently it can be done by getClusterNodes()
, may be combining with a command, like PING. But we should introduce a easier way.
Ref #2275: I don't completely support throwing exception because we don't do that even from Jedis class. Throwing exception from JedisCluster constructor seems contradictory to me.
This issue is marked stale. It will be closed in 30 days if it is not updated.