类 Balancer


  • public class Balancer
    extends java.lang.Object
    Balancer.
    作者:
    xuanyin
    • 构造器概要

      构造器 
      构造器 说明
      Balancer()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      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.
      • 从类继承的方法 java.lang.Object

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

      • Balancer

        public Balancer()
    • 方法详细资料

      • 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