Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing JedisPool to be created with abandon config #2054

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/main/java/redis/clients/jedis/JedisPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocketFactory;

import org.apache.commons.pool2.impl.AbandonedConfig;
import org.apache.commons.pool2.impl.GenericObjectPool;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

Expand Down Expand Up @@ -52,6 +53,15 @@ public JedisPool(final String host, final SSLSocketFactory sslSocketFactory,
}
}

public JedisPool(final GenericObjectPoolConfig poolConfig, final String host, final int port,
final int connectionTimeout, final int soTimeout, final String password, final int database,
final String clientName, final boolean ssl, AbandonedConfig abandonedConfig) {
this.internalPool = new GenericObjectPool<Jedis>(
new JedisFactory(host, port, connectionTimeout, soTimeout,
password, database, clientName, ssl, null, null, null),
poolConfig, abandonedConfig);
}

public JedisPool(final URI uri) {
this(new GenericObjectPoolConfig(), uri);
}
Expand Down