|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.redis.connection.lettuce.DefaultLettucePool
public class DefaultLettucePool
Default implementation of LettucePool
| Constructor Summary | |
|---|---|
DefaultLettucePool()
Constructs a new DefaultLettucePool instance with default settings. |
|
DefaultLettucePool(String hostName,
int port)
Uses the GenericObjectPool.Config and RedisClient defaults for configuring the connection pool |
|
DefaultLettucePool(String hostName,
int port,
org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
Uses the RedisClient defaults for configuring the connection pool |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
Destroys the pool |
com.lambdaworks.redis.RedisClient |
getClient()
|
int |
getDatabase()
Returns the index of the database. |
String |
getHostName()
Returns the current host. |
String |
getPassword()
Returns the password used for authenticating with the Redis server. |
org.apache.commons.pool.impl.GenericObjectPool.Config |
getPoolConfig()
|
int |
getPort()
Returns the current port. |
com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]> |
getResource()
|
long |
getTimeout()
Returns the connection timeout (in milliseconds). |
void |
returnBrokenResource(com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]> resource)
|
void |
returnResource(com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]> resource)
|
void |
setDatabase(int index)
Sets the index of the database used by this connection pool. |
void |
setHostName(String host)
Sets the host. |
void |
setPassword(String password)
Sets the password used for authenticating with the Redis server. |
void |
setPoolConfig(org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
|
void |
setPort(int port)
Sets the port. |
void |
setTimeout(long timeout)
Sets the connection timeout (in milliseconds). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLettucePool()
DefaultLettucePool instance with default settings.
public DefaultLettucePool(String hostName,
int port)
GenericObjectPool.Config and RedisClient defaults for configuring the connection pool
hostName - The Redis hostport - The Redis port
public DefaultLettucePool(String hostName,
int port,
org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
RedisClient defaults for configuring the connection pool
hostName - The Redis hostport - The Redis portpoolConfig - The pool GenericObjectPool.Config| Method Detail |
|---|
public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]> getResource()
getResource in interface Pool<com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]>>public void returnBrokenResource(com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]> resource)
returnBrokenResource in interface Pool<com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]>>resource - A broken resource that should be invalidatedpublic void returnResource(com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]> resource)
returnResource in interface Pool<com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]>>resource - A resource to return to the poolpublic void destroy()
Pool
destroy in interface Pool<com.lambdaworks.redis.RedisAsyncConnection<byte[],byte[]>>public com.lambdaworks.redis.RedisClient getClient()
getClient in interface LettucePoolRedisClient used to create pooled connectionspublic org.apache.commons.pool.impl.GenericObjectPool.Config getPoolConfig()
public void setPoolConfig(org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
poolConfig - The pool configuration to usepublic int getDatabase()
public void setDatabase(int index)
index - database indexpublic String getPassword()
public void setPassword(String password)
password - the password to setpublic 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 | ||||||||