public class JedisFactory
extends java.lang.Object
JedisPool instances.
Configuration Parameters
| Name | Default Value | Description |
|---|---|---|
| endpoint | [required] |
The redis server's host and port, i.e. localhost:6379.
If no port is given, the default redis port 6379 is assumed.
|
| password | null |
password: [null] - Auth password for redis server connection; Default is null. |
| minIdle | 0 |
The minimum number of idle connections to maintain in the connection pool. |
| maxIdle | 0 |
The maximum number of idle connections to maintain in the connection pool. |
| maxTotal | |
The maximum number of connections allowed in the connection pool. |
| timeout | 2000 |
The configured timeout (in milliseconds) for redis connections in the connection pool. |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_TOTAL |
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
JedisFactory() |
| Modifier and Type | Method and Description |
|---|---|
redis.clients.jedis.JedisPool |
build(io.dropwizard.setup.Environment environment) |
com.google.common.net.HostAndPort |
getEndpoint() |
java.lang.String |
getHost() |
int |
getMaxIdle() |
int |
getMaxTotal() |
int |
getMinIdle() |
java.lang.String |
getPassword() |
int |
getPort() |
boolean |
getSsl() |
int |
getTimeout() |
void |
setEndpoint(com.google.common.net.HostAndPort endpoint) |
void |
setMaxIdle(int maxIdle) |
void |
setMaxTotal(int maxTotal) |
void |
setMinIdle(int minIdle) |
void |
setPassword(java.lang.String password) |
void |
setSsl(boolean ssl) |
void |
setTimeout(int timeout) |
void |
setUrl(java.net.URI uri) |
public static final int DEFAULT_PORT
public static final int DEFAULT_MAX_TOTAL
public void setUrl(java.net.URI uri)
public com.google.common.net.HostAndPort getEndpoint()
public void setEndpoint(com.google.common.net.HostAndPort endpoint)
public java.lang.String getHost()
public int getPort()
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public int getMinIdle()
public void setMinIdle(int minIdle)
public int getMaxIdle()
public void setMaxIdle(int maxIdle)
public int getMaxTotal()
public void setMaxTotal(int maxTotal)
public boolean getSsl()
public void setSsl(boolean ssl)
public int getTimeout()
public void setTimeout(int timeout)
public redis.clients.jedis.JedisPool build(io.dropwizard.setup.Environment environment)