redis.clients.jedis.JedisPoolConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis Show documentation
Show all versions of jedis Show documentation
Jedis is a blazingly small and sane Redis java client.
package redis.clients.jedis;
import java.time.Duration;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
public class JedisPoolConfig extends GenericObjectPoolConfig {
public JedisPoolConfig() {
// defaults to make your life with connection pool easier :)
setTestWhileIdle(true);
setMinEvictableIdleTime(Duration.ofMillis(60000));
setTimeBetweenEvictionRuns(Duration.ofMillis(30000));
setNumTestsPerEvictionRun(-1);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy