public class SentinelRedisNode extends Object implements RedisSentinel, RedisSentinelAsync
RedisNode.InfoSection| Constructor and Description |
|---|
SentinelRedisNode(RedisClient client,
CommandAsyncExecutor commandAsyncService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
void |
failover(String masterName)
Starts failover process for defined Redis master
|
RFuture<Void> |
failoverAsync(String masterName)
Starts failover process for defined Redis master
|
InetSocketAddress |
getAddr()
Get Redis node address
|
RedisClient |
getClient() |
Map<String,String> |
getConfig(String parameter)
Get value of Redis configuration parameter.
|
RFuture<Map<String,String>> |
getConfigAsync(String parameter)
Get value of Redis configuration parameter.
|
Map<String,String> |
getMaster(String masterName)
Returns map containing info regarding defined Redis master.
|
InetSocketAddress |
getMasterAddr(String masterName)
Returns network address of defined Redis master.
|
RFuture<InetSocketAddress> |
getMasterAddrAsync(String masterName)
Returns network address of defined Redis master.
|
RFuture<Map<String,String>> |
getMasterAsync(String masterName)
Returns map containing info regarding defined Redis master.
|
List<Map<String,String>> |
getMasters()
Returns list of map containing info regarding Redis Master server
monitored by current Redis Sentinel server.
|
RFuture<List<Map<String,String>>> |
getMastersAsync()
Returns list of map containing info regarding Redis Master server
monitored by current Redis Sentinel server.
|
Map<String,String> |
getMemoryStatistics()
Returns Redis memory statistics
|
RFuture<Map<String,String>> |
getMemoryStatisticsAsync()
Returns Redis memory statistics
|
List<Map<String,String>> |
getSentinels(String masterName)
Returns list of map containing info regarding Redis Sentinel server
monitoring defined master.
|
RFuture<List<Map<String,String>>> |
getSentinelsAsync(String masterName)
Returns list of map containing info regarding Redis Sentinel server
monitoring defined master.
|
List<Map<String,String>> |
getSlaves(String masterName)
Returns list of map containing info regarding Redis Slave server
of defined master.
|
RFuture<List<Map<String,String>>> |
getSlavesAsync(String masterName)
Returns list of map containing info regarding Redis Slave server
of defined master.
|
int |
hashCode() |
Map<String,String> |
info(RedisNode.InfoSection section)
Returns information about Redis node.
|
RFuture<Map<String,String>> |
infoAsync(RedisNode.InfoSection section)
Returns information about Redis node.
|
boolean |
ping()
Ping Redis node.
|
boolean |
ping(long timeout,
TimeUnit timeUnit)
Ping Redis node with specified timeout.
|
RFuture<Boolean> |
pingAsync()
Ping Redis node.
|
RFuture<Boolean> |
pingAsync(long timeout,
TimeUnit timeUnit)
Ping Redis node with specified timeout.
|
void |
setConfig(String parameter,
String value)
Set value of Redis configuration parameter.
|
RFuture<Void> |
setConfigAsync(String parameter,
String value)
Set value of Redis configuration parameter.
|
Time |
time()
Returns current Redis server time in seconds
|
RFuture<Time> |
timeAsync()
Returns current Redis server time in seconds
|
String |
toString() |
public SentinelRedisNode(RedisClient client, CommandAsyncExecutor commandAsyncService)
public RedisClient getClient()
public InetSocketAddress getAddr()
RedisNodepublic Map<String,String> getMemoryStatistics()
RedisNodegetMemoryStatistics in interface RedisNodepublic RFuture<Map<String,String>> getMemoryStatisticsAsync()
RedisNodeAsyncgetMemoryStatisticsAsync in interface RedisNodeAsyncpublic RFuture<Boolean> pingAsync()
RedisNodeAsyncpingAsync in interface RedisNodeAsynctrue if "PONG" reply received, false otherwisepublic RFuture<Boolean> pingAsync(long timeout, TimeUnit timeUnit)
RedisNodeAsyncpingAsync in interface RedisNodeAsynctimeout - - ping timeouttimeUnit - - timeout unittrue if "PONG" reply received, false otherwisepublic boolean ping()
RedisNodepublic boolean ping(long timeout,
TimeUnit timeUnit)
RedisNodepublic RFuture<Time> timeAsync()
RedisNodeAsynctimeAsync in interface RedisNodeAsyncpublic Time time()
RedisNodepublic Map<String,String> info(RedisNode.InfoSection section)
RedisNodepublic RFuture<Map<String,String>> infoAsync(RedisNode.InfoSection section)
RedisNodeAsyncinfoAsync in interface RedisNodeAsyncsection - - section of informationpublic InetSocketAddress getMasterAddr(String masterName)
RedisSentinelgetMasterAddr in interface RedisSentinelmasterName - - name of masterpublic List<Map<String,String>> getSentinels(String masterName)
RedisSentinelgetSentinels in interface RedisSentinelmasterName - - name of masterpublic List<Map<String,String>> getMasters()
RedisSentinelgetMasters in interface RedisSentinelpublic List<Map<String,String>> getSlaves(String masterName)
RedisSentinelgetSlaves in interface RedisSentinelmasterName - - name of masterpublic Map<String,String> getMaster(String masterName)
RedisSentinelgetMaster in interface RedisSentinelmasterName - - name of masterpublic void failover(String masterName)
RedisSentinelfailover in interface RedisSentinelmasterName - - name of masterpublic RFuture<InetSocketAddress> getMasterAddrAsync(String masterName)
RedisSentinelAsyncgetMasterAddrAsync in interface RedisSentinelAsyncmasterName - - name of masterpublic RFuture<List<Map<String,String>>> getSentinelsAsync(String masterName)
RedisSentinelAsyncgetSentinelsAsync in interface RedisSentinelAsyncmasterName - - name of masterpublic RFuture<List<Map<String,String>>> getMastersAsync()
RedisSentinelAsyncgetMastersAsync in interface RedisSentinelAsyncpublic RFuture<List<Map<String,String>>> getSlavesAsync(String masterName)
RedisSentinelAsyncgetSlavesAsync in interface RedisSentinelAsyncmasterName - - name of masterpublic RFuture<Map<String,String>> getMasterAsync(String masterName)
RedisSentinelAsyncgetMasterAsync in interface RedisSentinelAsyncmasterName - - name of masterpublic RFuture<Void> failoverAsync(String masterName)
RedisSentinelAsyncfailoverAsync in interface RedisSentinelAsyncmasterName - - name of masterpublic Map<String,String> getConfig(String parameter)
RedisNodepublic void setConfig(String parameter, String value)
RedisNodepublic RFuture<Map<String,String>> getConfigAsync(String parameter)
RedisNodeAsyncgetConfigAsync in interface RedisNodeAsyncparameter - - name of parameterpublic RFuture<Void> setConfigAsync(String parameter, String value)
RedisNodeAsyncsetConfigAsync in interface RedisNodeAsyncparameter - - name of parametervalue - - value of parameterCopyright © 2014–2021 Redisson. All rights reserved.