|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory
public class LettuceConnectionFactory
Connection factory creating Lettuce-based connections.
Constructor Summary | |
---|---|
LettuceConnectionFactory()
Constructs a new LettuceConnectionFactory instance
with default settings. |
|
LettuceConnectionFactory(String host,
int port)
Constructs a new LettuceConnectionFactory instance
with default settings. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
RedisConnection |
getConnection()
Provides a suitable connection for interacting with Redis. |
String |
getHostName()
Returns the current host. |
int |
getPort()
Returns the current port. |
long |
getTimeout()
Returns the connection timeout (in milliseconds). |
void |
setHostName(String host)
Sets the host. |
void |
setPort(int port)
Sets the port. |
void |
setTimeout(long timeout)
Sets the connection timeout (in milliseconds). |
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 LettuceConnectionFactory()
LettuceConnectionFactory
instance
with default settings.
public LettuceConnectionFactory(String host, int port)
LettuceConnectionFactory
instance
with default settings.
Method Detail |
---|
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public void destroy()
destroy
in interface DisposableBean
public RedisConnection getConnection()
RedisConnectionFactory
getConnection
in interface RedisConnectionFactory
public DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible
in interface PersistenceExceptionTranslator
public String getHostName()
public void setHostName(String host)
host
- the host to setpublic int getPort()
public void setPort(int port)
port
- the port to setpublic long getTimeout()
public void setTimeout(long timeout)
timeout
- connection timeout
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |