- Type Parameters:
API- API type.CMD- Command command interface type to invoke multi-node operations.
- All Known Subinterfaces:
AsyncNodeSelection<K,V>,NodeSelection<K,V>,PubSubAsyncNodeSelection<K,V>,PubSubNodeSelection<K,V>,PubSubReactiveNodeSelection<K,V>
public interface NodeSelectionSupport<API,CMD>
A node selection represents a set of Redis Cluster nodes. Provides access to particular node connection APIs and allows the
execution of commands on the selected cluster nodes.
- Since:
- 4.0
- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description Map<RedisClusterNode,API>asMap()CMDcommands()APIcommands(int index)Obtain the connection/commands to a particular node.RedisClusterNodenode(int index)Get theRedisClusterNode.intsize()
-
Method Details
-
size
int size()- Returns:
- number of nodes.
-
commands
CMD commands()- Returns:
- commands API to run on this node selection.
-
commands
Obtain the connection/commands to a particular node.- Parameters:
index- index of the node- Returns:
- the connection/commands object
-
node
Get theRedisClusterNode.- Parameters:
index- index of the cluster node- Returns:
- the cluster node
-
asMap
Map<RedisClusterNode,API> asMap()- Returns:
- map of
RedisClusterNodeand the connection/commands objects
-