类 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.Instance
    getHostByRandomWeight2(List<com.alibaba.nacos.api.naming.pojo.Instance> instances)
    Choose instance by weight.
    static org.springframework.cloud.client.ServiceInstance
    getHostByRandomWeight3(List<org.springframework.cloud.client.ServiceInstance> serviceInstances)
    Spring Cloud LoadBalancer Choose instance by weight.

    从类继承的方法 com.alibaba.nacos.client.naming.core.Balancer

    getHostByRandomWeight

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • 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