We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在RedisClient.java中,设置最大连接数、设置获取连接时的最大等待毫秒数有误,config调用的2个方法有错误。
错误代码如下: // 池基本配置 JedisPoolConfig config = new JedisPoolConfig(); // 设置最大连接数 config.setMaxActive(MAX_ACTIVE); // 设置获取连接时的最大等待毫秒数 config.setMaxWait(MAX_WAIT);
// 池基本配置 JedisPoolConfig config = new JedisPoolConfig(); // 设置最大连接数 config.setMaxActive(MAX_ACTIVE); // 设置获取连接时的最大等待毫秒数 config.setMaxWait(MAX_WAIT);
错误代码是否应该改成如下代码呢? // 池基本配置 JedisPoolConfig config = new JedisPoolConfig(); // 设置最大连接数 config.setMaxTotal(MAX_ACTIVE); // 设置获取连接时的最大等待毫秒数 config.setMaxWaitMillis(MAX_WAIT);
// 池基本配置 JedisPoolConfig config = new JedisPoolConfig(); // 设置最大连接数 config.setMaxTotal(MAX_ACTIVE); // 设置获取连接时的最大等待毫秒数 config.setMaxWaitMillis(MAX_WAIT);
关于设置最大连接数、设置获取连接时的最大等待毫秒数有误的地方在initialPool()函数、 initialShardedPool()函数中。
The text was updated successfully, but these errors were encountered:
哈哈,谢谢您的提醒。我觉得您使用的jedis版本可能比较高吧,我的是2.1,对于jedis包括2.4.1,2.5.1等高版本的JedisPoolConfig没有maxActive、maxWait方法,需要您根据自己使用的版本调用对应的方法即可。
Sorry, something went wrong.
No branches or pull requests
在RedisClient.java中,设置最大连接数、设置获取连接时的最大等待毫秒数有误,config调用的2个方法有错误。
错误代码如下:
// 池基本配置 JedisPoolConfig config = new JedisPoolConfig(); // 设置最大连接数 config.setMaxActive(MAX_ACTIVE); // 设置获取连接时的最大等待毫秒数 config.setMaxWait(MAX_WAIT);
错误代码是否应该改成如下代码呢?
// 池基本配置 JedisPoolConfig config = new JedisPoolConfig(); // 设置最大连接数 config.setMaxTotal(MAX_ACTIVE); // 设置获取连接时的最大等待毫秒数 config.setMaxWaitMillis(MAX_WAIT);
关于设置最大连接数、设置获取连接时的最大等待毫秒数有误的地方在initialPool()函数、 initialShardedPool()函数中。
The text was updated successfully, but these errors were encountered: