Enum Class HttpTrafficPolicy.LoadBalancingStrategy

java.lang.Object
java.lang.Enum<HttpTrafficPolicy.LoadBalancingStrategy>
io.inverno.mod.discovery.http.HttpTrafficPolicy.LoadBalancingStrategy
All Implemented Interfaces:
Serializable, Comparable<HttpTrafficPolicy.LoadBalancingStrategy>, Constable
Enclosing class:
HttpTrafficPolicy

public static enum HttpTrafficPolicy.LoadBalancingStrategy extends Enum<HttpTrafficPolicy.LoadBalancingStrategy>

Load balancing strategies supported in HTTP services.

Since:
1.12
Author:
Jeremy Kuhn
  • Enum Constant Details

  • Method Details

    • values

      public static HttpTrafficPolicy.LoadBalancingStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpTrafficPolicy.LoadBalancingStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDefaultLoadBalancerFactory

      public TrafficLoadBalancer.Factory<HttpServiceInstance,UnboundExchange<?>> getDefaultLoadBalancerFactory()

      Returns the default load balancer factory for the strategy.

      Returns:
      a load balancer factory or null
    • isSupportUnmanageable

      public boolean isSupportUnmanageable()

      Determines whether the strategy supports unmanageable destination services.

      A manageable destination service implements ManageableService and exposes its underlying service instances to an HTTP meta service which can then directly manage service instances from multiple destinations and load balance traffic among them within a route. An unmanageable destination service, on the other hand, is opaque and doesn't expose its service instances which limits the choice of load balancing strategies to those that don't require direct access to service instances (e.g. active requests, load factor...).

      Returns:
      true if unmanageable services are supported, false otherwise