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 TypeMethodDescriptionvoidForce a failover as if the master was not reachable.masters()Get aCollectionof monitored masters and their state.voidmonitor(RedisServer master) Tell sentinel to start monitoring a new master with the specifiedRedisNode.getName(),RedisNode.getHost(),RedisNode.getPort(), andRedisServer.getQuorum().voidRemoves 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 aCollectionof monitored masters and their state.- Returns:
- Collection of
RedisServers. Never null.
-
replicas
Show list of replicas for given master.- Parameters:
master- must not be null.- Returns:
- Collection of
RedisServers. 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.
-