|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.redis.connection.jredis.JredisConnectionFactory
public class JredisConnectionFactory
Connection factory using creating JRedis based connections.
| Constructor Summary | |
|---|---|
JredisConnectionFactory()
Constructs a new JredisConnectionFactory instance. |
|
JredisConnectionFactory(org.jredis.connector.ConnectionSpec connectionSpec)
Constructs a new JredisConnectionFactory instance. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
RedisConnection |
getConnection()
Provides a suitable connection for interacting with Redis. |
int |
getDatabase()
Returns the index of the database. |
String |
getHostName()
Returns the Redis host name of this factory. |
String |
getPassword()
Returns the password used for authenticating with the Redis server. |
int |
getPoolSize()
Returns the pool size of this factory. |
int |
getPort()
Returns the Redis port. |
boolean |
getUsePool()
Indicates the use of a connection pool. |
protected RedisConnection |
postProcessConnection(JredisConnection connection)
Post process a newly retrieved connection. |
void |
setDatabase(int index)
Sets the index of the database used by this connection factory. |
void |
setHostName(String hostName)
Sets the Redis host name for this factory. |
void |
setPassword(String password)
Sets the password used for authenticating with the Redis server. |
void |
setPoolSize(int poolSize)
Sets the connection pool size of the underlying factory. |
void |
setPort(int port)
Sets the Redis port. |
void |
setUsePool(boolean usePool)
Turns on or off the use of connection pooling. |
DataAccessException |
translateExceptionIfPossible(RuntimeException ex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JredisConnectionFactory()
JredisConnectionFactory instance.
public JredisConnectionFactory(org.jredis.connector.ConnectionSpec connectionSpec)
JredisConnectionFactory instance.
Will override the other connection parameters passed to the factory.
connectionSpec - already configured connection.| Method Detail |
|---|
public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic void destroy()
destroy in interface DisposableBeanpublic RedisConnection getConnection()
RedisConnectionFactory
getConnection in interface RedisConnectionFactoryprotected RedisConnection postProcessConnection(JredisConnection connection)
connection -
public DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible in interface PersistenceExceptionTranslatorpublic String getHostName()
public void setHostName(String hostName)
hostName - The hostName to set.public int getPort()
public void setPort(int port)
port - The port to set.public String getPassword()
public void setPassword(String password)
password - the password to setpublic boolean getUsePool()
public void setUsePool(boolean usePool)
usePool - The usePool to set.public int getPoolSize()
public void setPoolSize(int poolSize)
poolSize - The poolSize to set.public int getDatabase()
public void setDatabase(int index)
index - database index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||