Browse Source

redis集群问题

pull/2/head
richie 4 years ago
parent
commit
a2b55fc862
  1. 3
      plugin.xml
  2. 5
      src/main/java/com/fr/plugin/db/redis/core/accessor/category/ClusterRedisClient.java

3
plugin.xml

@ -3,12 +3,13 @@
<id>com.fr.solution.plugin.db.redis.v10</id>
<name><![CDATA[Redis数据集]]></name>
<active>yes</active>
<version>7.2</version>
<version>7.3</version>
<env-version>10.0</env-version>
<jartime>2019-03-29</jartime>
<vendor>richie</vendor>
<description><![CDATA[可以连接Redis数据库,支持哈希表、列表、集合以及有序集合]]></description>
<change-notes><![CDATA[
[2020-04-21]修复redis集群下的一个问题。<br/>
[2019-10-30]适配新服务器数据集接口,在决策平台可以直接定义<br/>
[2019-09-29]修复无法兼容老版本的问题。<br/>
[2019-09-18]支持手动选择不同JavaScript脚本引擎。<br/>

5
src/main/java/com/fr/plugin/db/redis/core/accessor/category/ClusterRedisClient.java

@ -91,7 +91,10 @@ public class ClusterRedisClient implements EmbedRedis {
@Override
public void select(int index) {
jedisCluster.select(index);
Map<String, JedisPool> clusterNodes = jedisCluster.getClusterNodes();
for (Map.Entry<String, JedisPool> entry : clusterNodes.entrySet()) {
entry.getValue().getResource().select(index);
}
}
@Override

Loading…
Cancel
Save