类 NacosBalancer
java.lang.Object
com.alibaba.nacos.client.naming.core.Balancer
com.alibaba.cloud.nacos.balancer.NacosBalancer
public class NacosBalancer
extends com.alibaba.nacos.client.naming.core.Balancer
- 从以下版本开始:
- 2021.1
- 作者:
- itmuch.com XuDaojie
-
嵌套类概要
从类继承的嵌套类/接口 com.alibaba.nacos.client.naming.core.Balancer
com.alibaba.nacos.client.naming.core.Balancer.RandomByWeight -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static com.alibaba.nacos.api.naming.pojo.InstancegetHostByRandomWeight2(List<com.alibaba.nacos.api.naming.pojo.Instance> instances) Choose instance by weight.static org.springframework.cloud.client.ServiceInstancegetHostByRandomWeight3(List<org.springframework.cloud.client.ServiceInstance> serviceInstances) Spring Cloud LoadBalancer Choose instance by weight.从类继承的方法 com.alibaba.nacos.client.naming.core.Balancer
getHostByRandomWeight
-
构造器详细资料
-
NacosBalancer
public NacosBalancer()
-
-
方法详细资料
-
getHostByRandomWeight2
public static com.alibaba.nacos.api.naming.pojo.Instance getHostByRandomWeight2(List<com.alibaba.nacos.api.naming.pojo.Instance> instances) Choose instance by weight.- 参数:
instances- Instance List- 返回:
- the chosen instance
-
getHostByRandomWeight3
public static org.springframework.cloud.client.ServiceInstance getHostByRandomWeight3(List<org.springframework.cloud.client.ServiceInstance> serviceInstances) Spring Cloud LoadBalancer Choose instance by weight.- 参数:
serviceInstances- Instance List- 返回:
- the chosen instance
-