类 Balancer
- java.lang.Object
-
- com.alibaba.nacos.client.naming.core.Balancer
-
public class Balancer extends java.lang.ObjectBalancer.- 作者:
- xuanyin
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classBalancer.RandomByWeight
-
构造器概要
构造器 构造器 说明 Balancer()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 protected static com.alibaba.nacos.api.naming.pojo.InstancegetHostByRandomWeight(java.util.List<com.alibaba.nacos.api.naming.pojo.Instance> hosts)Return one host from the host list by random-weight.
-
-
-
方法详细资料
-
getHostByRandomWeight
protected static com.alibaba.nacos.api.naming.pojo.Instance getHostByRandomWeight(java.util.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
-
-