Interface LoadBalancerAlgorithm

All Superinterfaces:
org.springframework.core.Ordered
All Known Implementing Classes:
DefaultLoadBalancerAlgorithm

public interface LoadBalancerAlgorithm extends org.springframework.core.Ordered
Load Balancer algorithm interface. When expanding the load balancing algorithm, implement this interface and register it as a bean.
Author:
zhangbinhub
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    default service id.

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.cloud.client.ServiceInstance
    getInstance(org.springframework.cloud.client.loadbalancer.Request<?> request, List<org.springframework.cloud.client.ServiceInstance> serviceInstances)
     
     

    Methods inherited from interface org.springframework.core.Ordered

    getOrder
  • Field Details

  • Method Details

    • getServiceId

      String getServiceId()
    • getInstance

      org.springframework.cloud.client.ServiceInstance getInstance(org.springframework.cloud.client.loadbalancer.Request<?> request, List<org.springframework.cloud.client.ServiceInstance> serviceInstances)