{
if (!StringUtils.isBlank(maxActivePerNode) && StringUtils.isNumeric(maxActivePerNode))
{
logger.info("configuring connection pool");
JedisPoolConfig poolConfig = new JedisPoolConfig();
if (maxActivePerNode != null && StringUtils.isNumeric(maxActivePerNode))
{
poolConfig.setMaxActive(Integer.valueOf(maxActivePerNode));
}
if (maxIdlePerNode != null && StringUtils.isNumeric(maxIdlePerNode))
{
poolConfig.setMaxIdle(Integer.valueOf(maxIdlePerNode));
}
if (minIdlePerNode != null && StringUtils.isNumeric(minIdlePerNode))
{
poolConfig.setMinIdle(Integer.parseInt(minIdlePerNode));
}
if (maxActivePerNode != null && StringUtils.isNumeric(maxActivePerNode))
{
poolConfig.setWhenExhaustedAction(WHEN_EXHAUSTED_FAIL);
}
return poolConfig;
}
return null;