public class SentinelRedisNode extends Object implements RedisSentinel, RedisSentinelAsync
RedisNode.InfoSection
Constructor and Description |
---|
SentinelRedisNode(RedisClient client,
CommandAsyncService 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> |
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.
|
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) |
RFuture<Map<String,String>> |
infoAsync(RedisNode.InfoSection section) |
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.
|
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, CommandAsyncService commandAsyncService)
public RedisClient getClient()
public InetSocketAddress getAddr()
RedisNode
public RFuture<Boolean> pingAsync()
RedisNodeAsync
pingAsync
in interface RedisNodeAsync
true
if "PONG" reply received, false
otherwisepublic RFuture<Boolean> pingAsync(long timeout, TimeUnit timeUnit)
RedisNodeAsync
pingAsync
in interface RedisNodeAsync
timeout
- - ping timeouttimeUnit
- - timeout unittrue
if "PONG" reply received, false
otherwisepublic boolean ping()
RedisNode
public boolean ping(long timeout, TimeUnit timeUnit)
RedisNode
public RFuture<Time> timeAsync()
RedisNodeAsync
timeAsync
in interface RedisNodeAsync
public Time time()
RedisNode
public Map<String,String> info(RedisNode.InfoSection section)
public RFuture<Map<String,String>> infoAsync(RedisNode.InfoSection section)
infoAsync
in interface RedisNodeAsync
public InetSocketAddress getMasterAddr(String masterName)
RedisSentinel
getMasterAddr
in interface RedisSentinel
masterName
- - name of masterpublic List<Map<String,String>> getSentinels(String masterName)
RedisSentinel
getSentinels
in interface RedisSentinel
masterName
- - name of masterpublic List<Map<String,String>> getMasters()
RedisSentinel
getMasters
in interface RedisSentinel
public List<Map<String,String>> getSlaves(String masterName)
RedisSentinel
getSlaves
in interface RedisSentinel
masterName
- - name of masterpublic Map<String,String> getMaster(String masterName)
RedisSentinel
getMaster
in interface RedisSentinel
masterName
- - name of masterpublic void failover(String masterName)
RedisSentinel
failover
in interface RedisSentinel
masterName
- - name of masterpublic RFuture<InetSocketAddress> getMasterAddrAsync(String masterName)
RedisSentinelAsync
getMasterAddrAsync
in interface RedisSentinelAsync
masterName
- - name of masterpublic RFuture<List<Map<String,String>>> getSentinelsAsync(String masterName)
RedisSentinelAsync
getSentinelsAsync
in interface RedisSentinelAsync
masterName
- - name of masterpublic RFuture<List<Map<String,String>>> getMastersAsync()
RedisSentinelAsync
getMastersAsync
in interface RedisSentinelAsync
public RFuture<List<Map<String,String>>> getSlavesAsync(String masterName)
RedisSentinelAsync
getSlavesAsync
in interface RedisSentinelAsync
masterName
- - name of masterpublic RFuture<Map<String,String>> getMasterAsync(String masterName)
RedisSentinelAsync
getMasterAsync
in interface RedisSentinelAsync
masterName
- - name of masterpublic RFuture<Void> failoverAsync(String masterName)
RedisSentinelAsync
failoverAsync
in interface RedisSentinelAsync
masterName
- - name of masterCopyright © 2014–2020 Redisson. All rights reserved.