|
|||||||||
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. |
|
JredisConnectionFactory(Pool<org.jredis.JRedis> pool)
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
RedisConnection |
getConnection()
Provides a suitable connection for interacting with Redis. |
boolean |
getConvertPipelineAndTxResults()
JredisConnection does not support pipeline or transactions |
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 |
getPort()
Returns the Redis port. |
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 |
setPort(int port)
Sets the Redis port. |
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.public JredisConnectionFactory(Pool<org.jredis.JRedis> pool)
Method Detail |
---|
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public RedisConnection getConnection()
RedisConnectionFactory
getConnection
in interface RedisConnectionFactory
protected RedisConnection postProcessConnection(JredisConnection connection)
connection
-
public DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible
in interface PersistenceExceptionTranslator
public 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 int getDatabase()
public void setDatabase(int index)
index
- database indexpublic boolean getConvertPipelineAndTxResults()
JredisConnection
does not support pipeline or transactions
getConvertPipelineAndTxResults
in interface RedisConnectionFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |