--
You received this message because you are subscribed to a topic in the Google Groups "Jedis" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jedis_redis/prOU6Y_OX7o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jedis_redis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Jedis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jedis_redis...@googlegroups.com.
JedisPoolConfig poolConfig=new JedisPoolConfig();
poolConfig.setMaxTotal(500);
pool = new JedisPool(poolConfig, host , port);
@Override
public void set(String key, String value) {
Jedis jedis = pool.getResource();
jedis.set(key,value);
pool.returnResource(jedis);
}
JedisPoolConfig poolConfig=new JedisPoolConfig();
// defaults to make your life with connection pool easier :)
poolConfig.setTestWhileIdle(false);
poolConfig.setTestOnBorrow(false);
poolConfig.setTestOnReturn(false);
poolConfig.setMinEvictableIdleTimeMillis(60000);
poolConfig.setTimeBetweenEvictionRunsMillis(30000);
poolConfig.setNumTestsPerEvictionRun(-1);
poolConfig.setMaxTotal(500);
pool = new JedisPool(poolConfig, host , port);