All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.ConnectionPoolConfig Maven / Gradle / Ivy

The newest version!
package redis.clients.jedis;

import java.time.Duration;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class ConnectionPoolConfig extends GenericObjectPoolConfig {

  public ConnectionPoolConfig() {
    // 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