Interface WeightFunction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface WeightFunction
Represents a function that calculate the weight of the given service instance.

This is a functional interface whose functional method is apply(ServiceInstance).

Author:
Zhuozhi Ji
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    apply(org.springframework.cloud.client.ServiceInstance instance)
    Applies this function to the given service instance.
  • Method Details

    • apply

      int apply(org.springframework.cloud.client.ServiceInstance instance)
      Applies this function to the given service instance.
      Parameters:
      instance - the service instance
      Returns:
      the weight of service instance