|
|
@ -24,14 +24,18 @@ public abstract class RedisListener {
|
|
|
|
* Creates a new RedisListener and initialises the Redis connection
|
|
|
|
* Creates a new RedisListener and initialises the Redis connection
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public RedisListener() {
|
|
|
|
public RedisListener() {
|
|
|
|
|
|
|
|
JedisPoolConfig config = new JedisPoolConfig();
|
|
|
|
|
|
|
|
config.setMaxIdle(0);
|
|
|
|
|
|
|
|
config.setTestOnBorrow(true);
|
|
|
|
|
|
|
|
config.setTestOnReturn(true);
|
|
|
|
if (Settings.redisPassword.isEmpty()) {
|
|
|
|
if (Settings.redisPassword.isEmpty()) {
|
|
|
|
jedisPool = new JedisPool(new JedisPoolConfig(),
|
|
|
|
jedisPool = new JedisPool(config,
|
|
|
|
Settings.redisHost,
|
|
|
|
Settings.redisHost,
|
|
|
|
Settings.redisPort,
|
|
|
|
Settings.redisPort,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
Settings.redisSSL);
|
|
|
|
Settings.redisSSL);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
jedisPool = new JedisPool(new JedisPoolConfig(),
|
|
|
|
jedisPool = new JedisPool(config,
|
|
|
|
Settings.redisHost,
|
|
|
|
Settings.redisHost,
|
|
|
|
Settings.redisPort,
|
|
|
|
Settings.redisPort,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|