Package io.lettuce.core.cluster.api
Interface NodeSelectionSupport<API,CMD>
-
- Type Parameters:
API
- API type.CMD
- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<RedisClusterNode,API>
asMap()
CMD
commands()
API
commands(int index)
Obtain the connection/commands to a particular node.RedisClusterNode
node(int index)
Get theRedisClusterNode
.int
size()
-
-
-
Method Detail
-
size
int size()
- Returns:
- number of nodes.
-
commands
CMD commands()
- Returns:
- commands API to run on this node selection.
-
commands
API commands(int index)
Obtain the connection/commands to a particular node.- Parameters:
index
- index of the node- Returns:
- the connection/commands object
-
node
RedisClusterNode node(int index)
Get theRedisClusterNode
.- Parameters:
index
- index of the cluster node- Returns:
- the cluster node
-
asMap
Map<RedisClusterNode,API> asMap()
- Returns:
- map of
RedisClusterNode
and the connection/commands objects
-
-