public class JedisSentinelConnection extends AbstractJedisRedisConnection implements RedisSentinelConnection
pipeline, transaction
构造器和说明 |
---|
JedisSentinelConnection()
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
int connectTimeout,
int soTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
int sentinelConnectTimeout,
int sentinelSoTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
int infiniteSoTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
int connectTimeout,
int soTimeout,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
redis.clients.jedis.JedisSentinelPool pool,
SslConfiguration sslConfiguration)
构造函数
|
JedisSentinelConnection(JedisSentinelDataSource dataSource,
SslConfiguration sslConfiguration)
构造函数
|
限定符和类型 | 方法和说明 |
---|---|
void |
closePipeline()
关闭管道
|
protected redis.clients.jedis.Jedis |
createJedis(JedisSentinelDataSource dataSource) |
void |
discard()
取消事务
|
protected void |
doClose() |
protected void |
doConnect() |
protected void |
doDestroy() |
List<Object> |
exec()
执行所有事务块内的命令
|
void |
failover(RedisNamedNode namedNode)
failover
|
redis.clients.jedis.Jedis |
getJedis() |
int |
getSentinelConnectTimeout()
返回哨兵节点连接超时
|
int |
getSentinelSoTimeout()
返回哨兵节点读取超时
|
protected void |
internalInit() |
boolean |
isClosed()
检测连接是否关闭
|
boolean |
isConnect()
检测是否处于连接状态
|
protected boolean |
isUsePool() |
List<RedisServer> |
masters()
返回 Master 节点列表
|
void |
monitor(RedisSentinelNode server)
监控节点
|
Transaction |
multi()
标记事务开始
|
Pipeline |
openPipeline()
打开管道
|
void |
remove(RedisNamedNode master)
移除节点
|
void |
remove(String masterName)
移除节点
|
void |
setSentinelConnectTimeout(int sentinelConnectTimeout)
设置哨兵节点连接超时
|
void |
setSentinelSoTimeout(int sentinelSoTimeout)
设置哨兵节点读取超时
|
List<RedisServer> |
slaves(RedisNamedNode master)
返回 Slave 节点列表
|
List<RedisServer> |
slaves(String masterName)
返回 Slave 节点列表
|
createJedisClientConfigBuilder, isPipeline, isTransaction
close, connect, destroy, execute, getConnectTimeout, getDataSource, getInfiniteSoTimeout, getSoTimeout, getSslConfiguration, initialized, isUseSsl, setConnectTimeout, setDataSource, setInfiniteSoTimeout, setSoTimeout, setSslConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, execute, getConnectTimeout, getDataSource, getInfiniteSoTimeout, getSoTimeout, getSslConfiguration, isPipeline, isTransaction, isUseSsl, setConnectTimeout, setDataSource, setInfiniteSoTimeout, setSoTimeout, setSslConfiguration
destroy
public JedisSentinelConnection()
public JedisSentinelConnection(JedisSentinelDataSource dataSource)
dataSource
- Redis 数据源public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, int infiniteSoTimeout)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, int infiniteSoTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool)
dataSource
- Redis 数据源pool
- 连接池public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, int infiniteSoTimeout)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源pool
- 连接池sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, int infiniteSoTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, int sentinelConnectTimeout, int sentinelSoTimeout)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, int infiniteSoTimeout, int sentinelConnectTimeout, int sentinelSoTimeout)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, int sentinelConnectTimeout, int sentinelSoTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, int connectTimeout, int soTimeout, int infiniteSoTimeout, int sentinelConnectTimeout, int sentinelSoTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, int sentinelConnectTimeout, int sentinelSoTimeout)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, int infiniteSoTimeout, int sentinelConnectTimeout, int sentinelSoTimeout)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时(单位:毫秒)sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, int sentinelConnectTimeout, int sentinelSoTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)sslConfiguration
- SSL 配置public JedisSentinelConnection(JedisSentinelDataSource dataSource, redis.clients.jedis.JedisSentinelPool pool, int connectTimeout, int soTimeout, int infiniteSoTimeout, int sentinelConnectTimeout, int sentinelSoTimeout, SslConfiguration sslConfiguration)
dataSource
- Redis 数据源pool
- 连接池connectTimeout
- 连接超时(单位:毫秒)soTimeout
- 读取超时(单位:毫秒)infiniteSoTimeout
- Infinite 读取超时(单位:毫秒)sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)sslConfiguration
- SSL 配置public int getSentinelConnectTimeout()
public void setSentinelConnectTimeout(int sentinelConnectTimeout)
sentinelConnectTimeout
- 哨兵节点连接超时(单位:毫秒)public int getSentinelSoTimeout()
public void setSentinelSoTimeout(int sentinelSoTimeout)
sentinelSoTimeout
- 哨兵节点读取超时(单位:毫秒)public List<RedisServer> masters()
RedisSentinelConnection
masters
在接口中 RedisSentinelConnection
public List<RedisServer> slaves(RedisNamedNode master)
RedisSentinelConnection
slaves
在接口中 RedisSentinelConnection
master
- Master 节点public List<RedisServer> slaves(String masterName)
RedisSentinelConnection
slaves
在接口中 RedisSentinelConnection
masterName
- Master 节点名称public void failover(RedisNamedNode namedNode)
RedisSentinelConnection
failover
在接口中 RedisSentinelConnection
namedNode
- 节点public void monitor(RedisSentinelNode server)
RedisSentinelConnection
monitor
在接口中 RedisSentinelConnection
server
- 节点public redis.clients.jedis.Jedis getJedis()
public Pipeline openPipeline()
RedisConnection
openPipeline
在接口中 RedisConnection
public void closePipeline()
RedisConnection
closePipeline
在接口中 RedisConnection
public Transaction multi()
RedisConnection
multi
在接口中 RedisConnection
public List<Object> exec() throws RedisException
RedisConnection
exec
在接口中 RedisConnection
RedisException
- Redis Exceptionpublic void discard() throws RedisException
RedisConnection
discard
在接口中 RedisConnection
RedisException
- Redis Exceptionpublic void remove(RedisNamedNode master)
RedisSentinelConnection
remove
在接口中 RedisSentinelConnection
master
- 节点public void remove(String masterName)
RedisSentinelConnection
remove
在接口中 RedisSentinelConnection
masterName
- 节点名称public boolean isConnect()
RedisConnection
isConnect
在接口中 RedisConnection
public boolean isClosed()
RedisConnection
isClosed
在接口中 RedisConnection
protected void internalInit()
internalInit
在类中 AbstractRedisConnection
protected boolean isUsePool()
protected redis.clients.jedis.Jedis createJedis(JedisSentinelDataSource dataSource)
protected void doConnect() throws RedisConnectionFailureException
protected void doDestroy() throws IOException
doDestroy
在类中 AbstractJedisRedisConnection
IOException
protected void doClose() throws IOException
doClose
在类中 AbstractJedisRedisConnection
IOException
Copyright © 2023 buession.com Inc.. All rights reserved.