Add JedisPool constructor that takes only host string

This commit is contained in:
Kevin Sawicki
2011-06-24 16:44:12 -07:00
parent 6c3ec9fc14
commit e9644a4529

View File

@@ -14,11 +14,15 @@ public class JedisPool extends Pool<Jedis> {
null);
}
public JedisPool(String host, int port) {
public JedisPool(final String host, final int port) {
super(new Config(), new JedisFactory(host, port,
Protocol.DEFAULT_TIMEOUT, null));
}
public JedisPool(final String host) {
this(host, Protocol.DEFAULT_PORT);
}
public JedisPool(final Config poolConfig, final String host, int port,
int timeout, final String password) {
super(poolConfig, new JedisFactory(host, port, timeout, password));