标签:无法 lse zha 超时 jedis wait 参考 时报 false
jedis :
Jedis pool:
jedis:
Jedis jedis2 = new Jedis(R_HOST, R_PORT + 1); jedis2.append("username", "zhangsan");
Jedis Pool:
JedisShardInfo jedis = new JedisShardInfo(R_HOST, R_PORT + 1, false); JedisShardInfo jedisSlave = new JedisShardInfo(R_HOST, R_PORT, false); List<JedisShardInfo> jedisList = new ArrayList<JedisShardInfo>(); jedisList.add(jedisSlave); jedisList.add(jedis); JedisPoolConfig poolConfig = new JedisPoolConfig(); ShardedJedisPool pool = new ShardedJedisPool(poolConfig, jedisList, Hashing.MURMUR_HASH, Sharded.DEFAULT_KEY_TAG_PATTERN); ShardedJedis sharedJedis = pool.getResource();
注意poolConfig中的内容:
// poolConfig.get("testOnBorrow")
参考文章: https://blog.csdn.net/wangyangzhizhou/article/details/52209336
标签:无法 lse zha 超时 jedis wait 参考 时报 false
原文地址:https://www.cnblogs.com/DennyZhao/p/9373994.html