Interface RedisSentinelCommands
- All Known Subinterfaces:
RedisSentinelConnection
- All Known Implementing Classes:
JedisSentinelConnection, LettuceSentinelConnection
@NullUnmarked
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.Collection<@NonNull RedisServer> masters()Get aCollectionof monitored masters and their state.voidmonitor(@NonNull RedisServer master) Tell sentinel to start monitoring a new master with the specifiedRedisNode.getName(),RedisNode.getHost(),RedisNode.getPort(), andRedisServer.getQuorum().voidRemoves given master.Collection<@NonNull RedisServer> 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<@NonNull 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
-
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.
-