use of redis.clients.jedis.HostAndPort in project oxCore by GluuFederation.
the class RedisStandaloneProvider method create.
public void create() {
LOG.debug("Starting RedisStandaloneProvider ...");
try {
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(1000);
poolConfig.setMinIdle(2);
HostAndPort hostAndPort = RedisClusterProvider.hosts(redisConfiguration.getServers()).iterator().next();
pool = new JedisPool(poolConfig, hostAndPort.getHost(), hostAndPort.getPort());
testConnection();
LOG.debug("RedisStandaloneProvider started.");
} catch (Exception e) {
throw new IllegalStateException("Error starting RedisStandaloneProvider", e);
}
}
Aggregations