2015-05-26 37 views
3

我是新來Jedis,發現hereJediscluster使用對象池

我要讓JedisCluster對象池,使用構造發現爲:

public JedisCluster(Set<HostAndPort> nodes, final GenericObjectPoolConfig poolConfig) { 
     this(nodes, DEFAULT_TIMEOUT, DEFAULT_MAX_REDIRECTIONS, poolConfig); 
} 

現在我的疑問是,這是實現將在內部處理池還是我必須使用Apache Commons Pool來處理JedisCluster的對象?

在此先感謝。

回答

4

JedisCluster在內部爲每個節點存儲池,poolConfig用於設置這些池。

希望這會有所幫助。

謝謝!