类 Balancer
java.lang.Object
com.alibaba.nacos.client.naming.core.Balancer
Balancer.
- 作者:
- xuanyin
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected static com.alibaba.nacos.api.naming.pojo.InstancegetHostByRandomWeight(List<com.alibaba.nacos.api.naming.pojo.Instance> hosts) Return one host from the host list by random-weight.
-
构造器详细资料
-
Balancer
public Balancer()
-
-
方法详细资料
-
getHostByRandomWeight
protected static com.alibaba.nacos.api.naming.pojo.Instance getHostByRandomWeight(List<com.alibaba.nacos.api.naming.pojo.Instance> hosts) Return one host from the host list by random-weight.- 参数:
hosts- The list of the host.- 返回:
- The random-weight result of the host
-