public class RedisConnectionPool extends Object implements ConnectionPool<redis.clients.jedis.Jedis>
Title: RedisConnectionPool
Description: Redis连接池
ConnectionPool
,
序列化表格限定符和类型 | 字段和说明 |
---|---|
private redis.clients.jedis.JedisPool |
pool |
构造器和说明 |
---|
RedisConnectionPool(PoolConfig poolConfig,
Properties properties)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(PoolConfig poolConfig,
String host,
int port)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(PoolConfig poolConfig,
String host,
int port,
int connectionTimeout,
int soTimeout,
String password,
int database,
String clientName)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(PoolConfig poolConfig,
String host,
int port,
int timeout,
String password,
int database,
String clientName)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(PoolConfig poolConfig,
String host,
int port,
String password)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(PoolConfig poolConfig,
String host,
int port,
String password,
int timeout)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(Properties properties)
Instantiates a new Redis connection pool.
|
RedisConnectionPool(String host,
int port)
Instantiates a new Redis connection pool.
|
限定符和类型 | 方法和说明 |
---|---|
void |
close()
Close.
|
redis.clients.jedis.Jedis |
getConnection()
Title: getConnection
Description: 获取连接
|
void |
invalidateConnection(redis.clients.jedis.Jedis conn)
Title: invalidateConnection
Description: 废弃连接
|
void |
returnConnection(redis.clients.jedis.Jedis conn)
Title: returnConnection
Description: 返回连接
|
public RedisConnectionPool(String host, int port)
host
- the hostport
- the portpublic RedisConnectionPool(PoolConfig poolConfig, String host, int port)
poolConfig
- the pool confighost
- the hostport
- the portpublic RedisConnectionPool(PoolConfig poolConfig, String host, int port, String password)
poolConfig
- the pool confighost
- the hostport
- the portpassword
- the passwordpublic RedisConnectionPool(PoolConfig poolConfig, String host, int port, String password, int timeout)
poolConfig
- the pool confighost
- the hostport
- the portpassword
- the passwordtimeout
- the timeoutpublic RedisConnectionPool(Properties properties)
properties
- the propertiespublic RedisConnectionPool(PoolConfig poolConfig, Properties properties)
poolConfig
- the pool configproperties
- the propertiespublic RedisConnectionPool(PoolConfig poolConfig, String host, int port, int timeout, String password, int database, String clientName)
poolConfig
- the pool confighost
- the hostport
- the porttimeout
- the timeoutpassword
- the passworddatabase
- the databaseclientName
- the client namepublic RedisConnectionPool(PoolConfig poolConfig, String host, int port, int connectionTimeout, int soTimeout, String password, int database, String clientName)
poolConfig
- the pool confighost
- the hostport
- the portconnectionTimeout
- the connection timeoutsoTimeout
- the so timeoutpassword
- the passworddatabase
- the databaseclientName
- the client namepublic redis.clients.jedis.Jedis getConnection()
ConnectionPool
Title: getConnection
Description: 获取连接
getConnection
在接口中 ConnectionPool<redis.clients.jedis.Jedis>
public void returnConnection(redis.clients.jedis.Jedis conn)
ConnectionPool
Title: returnConnection
Description: 返回连接
returnConnection
在接口中 ConnectionPool<redis.clients.jedis.Jedis>
conn
- 连接public void invalidateConnection(redis.clients.jedis.Jedis conn)
ConnectionPool
Title: invalidateConnection
Description: 废弃连接
invalidateConnection
在接口中 ConnectionPool<redis.clients.jedis.Jedis>
conn
- 连接public void close()
Copyright © 2015-2018 Dark Phoenixs. All Rights Reserved.