Class JedisPoolConfig
- java.lang.Object
-
- org.apache.storm.redis.common.config.JedisPoolConfig
-
- All Implemented Interfaces:
Serializable
public class JedisPoolConfig extends Object implements Serializable
Configuration for JedisPool.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JedisPoolConfig.Builder
Builder for initializing JedisPoolConfig.
-
Constructor Summary
Constructors Constructor Description JedisPoolConfig()
JedisPoolConfig(String host, int port, int timeout, String password, int database)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDatabase()
Returns database index.String
getHost()
Returns host.String
getPassword()
Returns password.int
getPort()
Returns port.int
getTimeout()
Returns timeout.String
toString()
-
-
-
Constructor Detail
-
JedisPoolConfig
public JedisPoolConfig()
-
JedisPoolConfig
public JedisPoolConfig(String host, int port, int timeout, String password, int database)
Constructor. You can use JedisPoolConfig.Builder() for leaving some fields to apply default value.- Parameters:
host
- hostname or IPport
- porttimeout
- socket / connection timeoutdatabase
- database indexpassword
- password, if any
-
-
Method Detail
-
getHost
public String getHost()
Returns host.- Returns:
- hostname or IP
-
getPort
public int getPort()
Returns port.- Returns:
- port
-
getTimeout
public int getTimeout()
Returns timeout.- Returns:
- socket / connection timeout
-
getDatabase
public int getDatabase()
Returns database index.- Returns:
- database index
-
getPassword
public String getPassword()
Returns password.- Returns:
- password
-
-