Interface ValkeySentinelCommands
- All Known Subinterfaces:
ValkeySentinelConnection
- All Known Implementing Classes:
JedisSentinelConnection,LettuceSentinelConnection
public interface ValkeySentinelCommands
Valkey 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(ValkeyServer master) Tell sentinel to start monitoring a new master with the specifiedValkeyNode.getName(),ValkeyNode.getHost(),ValkeyNode.getPort(), andValkeyServer.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<ValkeyServer> masters()Get aCollectionof monitored masters and their state.- Returns:
- Collection of
ValkeyServers. Never null.
-
replicas
Show list of replicas for given master.- Parameters:
master- must not be null.- Returns:
- Collection of
ValkeyServers. 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 specifiedValkeyNode.getName(),ValkeyNode.getHost(),ValkeyNode.getPort(), andValkeyServer.getQuorum().- Parameters:
master- must not be null.
-