我们可以在 jedis 4.0.1 中为 JedisExhaustedPoolException 使用什么,因为它已被弃用
what we can use for JedisExhaustedPoolException in jedis 4.0.1 since its deprecated
我使用的是 3.8.0 Jedis 版本,我正在使用其中一个例外
import redis.clients.jedis.exceptions.JedisExhaustedPoolException;
public Jedis getJedisObj() {
try {
return jedisPool.getResource();
} catch (JedisConnectionException npe) {
LOGGER.error("Not able to get redis connection {}", npe);
} catch (JedisExhaustedPoolException npe) {
LOGGER.error("Not able to get redis connection, because of pool exhausted {}", npe);
}
return null;
}
我想升级到 jedis 4.0.1。因为这个 redis.clients.jedis.exceptions.JedisExhaustedPoolException 在 4.0.1 中被弃用了,我可以用什么来代替它
redis.clients.jedis.exceptions.JedisException
.
JedisExhaustedPoolException
has been removed. A JedisException
with a similar message is thrown instead.
我使用的是 3.8.0 Jedis 版本,我正在使用其中一个例外
import redis.clients.jedis.exceptions.JedisExhaustedPoolException;
public Jedis getJedisObj() {
try {
return jedisPool.getResource();
} catch (JedisConnectionException npe) {
LOGGER.error("Not able to get redis connection {}", npe);
} catch (JedisExhaustedPoolException npe) {
LOGGER.error("Not able to get redis connection, because of pool exhausted {}", npe);
}
return null;
}
我想升级到 jedis 4.0.1。因为这个 redis.clients.jedis.exceptions.JedisExhaustedPoolException 在 4.0.1 中被弃用了,我可以用什么来代替它
redis.clients.jedis.exceptions.JedisException
.
JedisExhaustedPoolException
has been removed. AJedisException
with a similar message is thrown instead.