public class ClusterTopologyRefresh extends Object
Partitions
.Constructor and Description |
---|
ClusterTopologyRefresh(NodeConnectionFactory nodeConnectionFactory,
ClientResources clientResources) |
Modifier and Type | Method and Description |
---|---|
RedisURI |
getViewedBy(Map<RedisURI,Partitions> map,
Partitions partitions)
Resolve a
RedisURI from a map of cluster views by Partitions as key |
Map<RedisURI,Partitions> |
loadViews(Iterable<RedisURI> seed,
boolean discovery)
|
public ClusterTopologyRefresh(NodeConnectionFactory nodeConnectionFactory, ClientResources clientResources)
public Map<RedisURI,Partitions> loadViews(Iterable<RedisURI> seed, boolean discovery)
RedisURI
s and return the view per RedisURI
. Partitions contain
an ordered list of RedisClusterNode
s. The sort key is latency. Nodes with lower latency come first.seed
- collection of RedisURI
sdiscovery
- true to discover additional nodesRedisURI
and Partitions
public RedisURI getViewedBy(Map<RedisURI,Partitions> map, Partitions partitions)
RedisURI
from a map of cluster views by Partitions
as keymap
- the mappartitions
- the keyRedisURI
or nullCopyright © 2018 lettuce.io. All rights reserved.