Interface ReactiveClusterCommands
- All Known Subinterfaces:
 ReactiveRedisClusterConnection
public interface ReactiveClusterCommands
Interface for the cluster commands supported by Redis executed using reactive infrastructure. A
 
RedisClusterNode can be obtained from clusterGetNodes() or it can be constructed using either
 host and RedisNode.getPort() or the node Id.- Since:
 - 2.3.2
 - Author:
 - Mark Paluch, Christoph Strobl
 
- 
Nested Class Summary
Nested Classes - 
Method Summary
Modifier and TypeMethodDescriptionclusterAddSlots(RedisClusterNode node, int... slots) Assign slots to givenRedisClusterNode.clusterAddSlots(RedisClusterNode node, RedisClusterNode.SlotRange range) AssignRedisClusterNode.SlotRange.getSlotsArray()to givenRedisClusterNode.clusterCountKeysInSlot(int slot) Count the number of keys assigned to one slot.clusterDeleteSlots(RedisClusterNode node, int... slots) Remove slots fromRedisClusterNode.RemovesRedisClusterNode.SlotRange.getSlotsArray()from givenRedisClusterNode.Remove given node from cluster.Get cluster information.clusterGetKeysInSlot(int slot, int count) Get keys served by slot.Retrieve information about masters and their connected replicas.Find theRedisClusterNodeserving given key.clusterGetNodeForSlot(int slot) Find theRedisClusterNodeserving given slot.Retrieve cluster node information such as id, host, port and slots.clusterGetReplicas(RedisClusterNode master) Retrieve information about connected replicas for given master node.Find the slot for a givenkey.clusterMeet(RedisClusterNode node) Add given node to cluster.clusterReplicate(RedisClusterNode master, RedisClusterNode replica) Assign a replica to given master.clusterSetSlot(RedisClusterNode node, int slot, ReactiveClusterCommands.AddSlots mode)  
- 
Method Details
- 
clusterGetNodes
Flux<RedisClusterNode> clusterGetNodes()Retrieve cluster node information such as id, host, port and slots.- Returns:
 - a 
Fluxemittingcluster nodes, anempty oneif none found. - See Also:
 
 - 
clusterGetReplicas
Retrieve information about connected replicas for given master node.- Parameters:
 master- must not be null.- Returns:
 - a 
Fluxemittingcluster nodes, anempty oneif none found. - See Also:
 
 - 
clusterGetMasterReplicaMap
Mono<Map<RedisClusterNode,Collection<RedisClusterNode>>> clusterGetMasterReplicaMap()Retrieve information about masters and their connected replicas.- Returns:
 - never null.
 - See Also:
 
 - 
clusterGetSlotForKey
Find the slot for a givenkey.- Parameters:
 key- must not be null.- Returns:
 - a 
Monoemitting the calculated slog. - See Also:
 
 - 
clusterGetNodeForSlot
Find theRedisClusterNodeserving given slot.- Parameters:
 slot-- Returns:
 - a 
Monoemitting theRedisClusterNodehandling the given slot. 
 - 
clusterGetNodeForKey
Find theRedisClusterNodeserving given key.- Parameters:
 key- must not be null.- Returns:
 - a 
Monoemitting theRedisClusterNodehandling the slot for the given key. 
 - 
clusterGetClusterInfo
Mono<ClusterInfo> clusterGetClusterInfo()Get cluster information.- Returns:
 - never null.
 - See Also:
 
 - 
clusterAddSlots
Assign slots to givenRedisClusterNode.- Parameters:
 node- must not be null.slots- must not be empty.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterAddSlots
AssignRedisClusterNode.SlotRange.getSlotsArray()to givenRedisClusterNode.- Parameters:
 node- must not be null.range- must not be null.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterCountKeysInSlot
Count the number of keys assigned to one slot.- Parameters:
 slot-- Returns:
 - a 
Monoemitting the number of keys stored at the given slot. - See Also:
 
 - 
clusterDeleteSlots
Remove slots fromRedisClusterNode.- Parameters:
 node- must not be null.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterDeleteSlotsInRange
RemovesRedisClusterNode.SlotRange.getSlotsArray()from givenRedisClusterNode.- Parameters:
 node- must not be null.range- must not be null.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterForget
Remove given node from cluster.- Parameters:
 node- must not be null.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterMeet
Add given node to cluster.- Parameters:
 node- must containhostandRedisNode.getPort()and must not be null.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterSetSlot
- Parameters:
 node- must not be null.slot-mode- must not benull.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 - 
clusterGetKeysInSlot
Get keys served by slot.- Parameters:
 slot-count- must not be null.- Returns:
 - a 
Fluxemitting the number of requested keys in the given slot, or signalling completion if none found. - See Also:
 
 - 
clusterReplicate
Assign a replica to given master.- Parameters:
 master- must not be null.replica- must not be null.- Returns:
 - a 
Monosignaling completion. - See Also:
 
 
 -