Interface RedisSentinelCommands
- All Known Subinterfaces:
RedisSentinelConnection
- All Known Implementing Classes:
JedisSentinelConnection
,LettuceSentinelConnection
public interface RedisSentinelCommands
Redis Sentinel-specific commands.
- Since:
- 1.4
- Author:
- Christoph Strobl, Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Force a failover as if the master was not reachable.masters()
Get aCollection
of monitored masters and their state.void
monitor
(RedisServer master) Tell sentinel to start monitoring a new master with the specifiedRedisNode.getName()
,RedisNode.getHost()
,RedisNode.getPort()
, andRedisServer.getQuorum()
.void
Removes given master.Show list of replicas for given master.
-
Method Details
-
failover
Force a failover as if the master was not reachable.- Parameters:
master
- must not be null.
-
masters
Collection<RedisServer> masters()Get aCollection
of monitored masters and their state.- Returns:
- Collection of
RedisServer
s. Never null.
-
replicas
Show list of replicas for given master.- Parameters:
master
- must not be null.- Returns:
- Collection of
RedisServer
s. Never null.
-
remove
Removes given master. The server will no longer be monitored and will no longer be returned bymasters()
.- Parameters:
master
- must not be null.
-
monitor
Tell sentinel to start monitoring a new master with the specifiedRedisNode.getName()
,RedisNode.getHost()
,RedisNode.getPort()
, andRedisServer.getQuorum()
.- Parameters:
master
- must not be null.
-