|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.keyvalue.redis.connection.jedis.JedisConnectionFactory
public class JedisConnectionFactory
Connection factory using creating Jedis based connections.
Constructor Summary | |
---|---|
JedisConnectionFactory()
Constructs a new JedisConnectionFactory instance
with default settings (default connection pooling, no shard information). |
|
JedisConnectionFactory(redis.clients.jedis.JedisPoolConfig poolConfig)
Constructs a new JedisConnectionFactory instance using
the given pool configuration. |
|
JedisConnectionFactory(redis.clients.jedis.JedisShardInfo shardInfo)
Constructs a new JedisConnectionFactory instance. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
protected redis.clients.jedis.Jedis |
fetchJedisConnector()
Returns a Jedis instance to be used as a Redis connection. |
JedisConnection |
getConnection()
Provides a suitable connection for interacting with Redis. |
String |
getHostName()
Returns the Redis hostName. |
String |
getPassword()
Returns the password used for authenticating with the Redis server. |
redis.clients.jedis.JedisPoolConfig |
getPoolConfig()
Returns the poolConfig. |
int |
getPort()
Returns the port used to connect to the Redis instance. |
redis.clients.jedis.JedisShardInfo |
getShardInfo()
Returns the shardInfo. |
int |
getTimeout()
Returns the timeout. |
boolean |
getUsePool()
Indicates the use of a connection pool. |
void |
setHostName(String hostName)
Sets the Redis hostName. |
void |
setPassword(String password)
Sets the password used for authenticating with the Redis server. |
void |
setPoolConfig(redis.clients.jedis.JedisPoolConfig poolConfig)
Sets the pool configuration for this factory. |
void |
setPort(int port)
Sets the port used to connect to the Redis instance. |
void |
setShardInfo(redis.clients.jedis.JedisShardInfo shardInfo)
Sets the shard info for this factory. |
void |
setTimeout(int timeout)
|
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 JedisConnectionFactory()
JedisConnectionFactory
instance
with default settings (default connection pooling, no shard information).
public JedisConnectionFactory(redis.clients.jedis.JedisShardInfo shardInfo)
JedisConnectionFactory
instance.
Will override the other connection parameters passed to the factory.
shardInfo
- shard informationpublic JedisConnectionFactory(redis.clients.jedis.JedisPoolConfig poolConfig)
JedisConnectionFactory
instance using
the given pool configuration.
poolConfig
- pool configurationMethod Detail |
---|
protected redis.clients.jedis.Jedis fetchJedisConnector()
RedisConnection
.public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public void destroy()
destroy
in interface DisposableBean
public JedisConnection getConnection()
RedisConnectionFactory
getConnection
in interface RedisConnectionFactory
public DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible
in interface PersistenceExceptionTranslator
public String getHostName()
public void setHostName(String hostName)
hostName
- The hostName to set.public String getPassword()
public void setPassword(String password)
password
- the password to setpublic int getPort()
public void setPort(int port)
port
- Redis portpublic redis.clients.jedis.JedisShardInfo getShardInfo()
public void setShardInfo(redis.clients.jedis.JedisShardInfo shardInfo)
shardInfo
- The shardInfo to set.public int getTimeout()
public void setTimeout(int timeout)
timeout
- The timeout to set.public boolean getUsePool()
public void setUsePool(boolean usePool)
usePool
- The usePool to set.public redis.clients.jedis.JedisPoolConfig getPoolConfig()
public void setPoolConfig(redis.clients.jedis.JedisPoolConfig poolConfig)
poolConfig
- The poolConfig to set.
|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |