public class RedisClusterFactory extends Object implements RedisClientFactory<ClusterRedisClient>
| 构造器和说明 |
|---|
RedisClusterFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
build() |
void |
close()
Closes this stream and releases any system resources associated
with it.
|
RedisPoolConfig |
getPoolConfig() |
ClusterRedisClient |
getResource()
在 大并发情况下,实现类的getResource 方法,
务必 加上 synchronized 关键子,
保证 resource 的一致性
|
void |
returnResource(ClusterRedisClient client)
集群模式下 jedisCluster 不用手动返还 jedis client
jedisCluster 有自动返还client策略
|
void |
setMaxRedirections(int maxRedirections) |
void |
setPoolConfig(RedisPoolConfig poolConfig) |
public ClusterRedisClient getResource()
RedisClientFactorygetResource 在接口中 RedisClientFactory<ClusterRedisClient>public void returnResource(ClusterRedisClient client)
returnResource 在接口中 RedisClientFactory<ClusterRedisClient>client - public void build()
build 在接口中 RedisClientFactory<ClusterRedisClient>public void setMaxRedirections(int maxRedirections)
public void setPoolConfig(RedisPoolConfig poolConfig)
public RedisPoolConfig getPoolConfig()
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOException - if an I/O error occursCopyright © 2018. All rights reserved.