Skip to content

Commit

Permalink
Replace deprecated interface with new interface of JedisPoolConfig (#…
Browse files Browse the repository at this point in the history
…2749)

* Replace old interface with new interface of JedisPoolConfig

* Replace old interface with new interface of ConnectionPoolConfig

* reorder import

* reorder import

Co-authored-by: M Sazzadul Hoque <[email protected]>
  • Loading branch information
zeekling and sazzad16 authored Dec 19, 2021
1 parent 4a84ee2 commit c404a85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main/java/redis/clients/jedis/ConnectionPoolConfig.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package redis.clients.jedis;

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

public class ConnectionPoolConfig extends GenericObjectPoolConfig<Connection> {

public ConnectionPoolConfig() {
// defaults to make your life with connection pool easier :)
setTestWhileIdle(true);
setMinEvictableIdleTimeMillis(60000);
setTimeBetweenEvictionRunsMillis(30000);
setMinEvictableIdleTime(Duration.ofMillis(60000));
setTimeBetweenEvictionRuns(Duration.ofMillis(30000));
setNumTestsPerEvictionRun(-1);
}
}
5 changes: 3 additions & 2 deletions src/main/java/redis/clients/jedis/JedisPoolConfig.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package redis.clients.jedis;

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

public class JedisPoolConfig extends GenericObjectPoolConfig<Jedis> {

public JedisPoolConfig() {
// defaults to make your life with connection pool easier :)
setTestWhileIdle(true);
setMinEvictableIdleTimeMillis(60000);
setTimeBetweenEvictionRunsMillis(30000);
setMinEvictableIdleTime(Duration.ofMillis(60000));
setTimeBetweenEvictionRuns(Duration.ofMillis(30000));
setNumTestsPerEvictionRun(-1);
}
}

0 comments on commit c404a85

Please sign in to comment.