DATAREDIS-888 - Use Lettuce's read-only Partition view for node conversion.
We now use the read-only view of Lettuce's Partition object to convert Lettuce RedisClusterNode objects into Spring Data RedisClusterNode. The read-only view is atomic and does not require external synchronization. Original Pull Request: #384
This commit is contained in:
committed by
Christoph Strobl
parent
3816b41dc8
commit
22fdaba350
@@ -223,7 +223,7 @@ abstract public class LettuceConverters extends Converters {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<RedisClusterNode> nodes = new ArrayList<>();
|
||||
for (io.lettuce.core.cluster.models.partitions.RedisClusterNode node : source.getPartitions()) {
|
||||
for (io.lettuce.core.cluster.models.partitions.RedisClusterNode node : source) {
|
||||
nodes.add(CLUSTER_NODE_TO_CLUSTER_NODE_CONVERTER.convert(node));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user