Enum Class ClientConfiguration.ServerQoS

java.lang.Object
java.lang.Enum<ClientConfiguration.ServerQoS>
com.palantir.conjure.java.client.config.ClientConfiguration.ServerQoS
All Implemented Interfaces:
Serializable, Comparable<ClientConfiguration.ServerQoS>, Constable
Enclosing interface:
ClientConfiguration

public static enum ClientConfiguration.ServerQoS extends Enum<ClientConfiguration.ServerQoS>
  • Enum Constant Details

    • AUTOMATIC_RETRY

      public static final ClientConfiguration.ServerQoS AUTOMATIC_RETRY
      Default.
    • PROPAGATE_429_and_503_TO_CALLER

      public static final ClientConfiguration.ServerQoS PROPAGATE_429_and_503_TO_CALLER
      Propagate QosException.Throttle and QosException.Unavailable (429/503) to the caller. Consumers should use this when an upstream service has better context on how to handle the QoS error. This delegates the responsibility to the upstream service, which should use an appropriate conjure client to handle the response.

      For example, let us imagine a proxy server that serves both interactive and long-running background requests by dispatching requests to some backend. Interactive requests should be retried relatively few times in comparison to background jobs which run for minutes our even hours. The proxy server should use a backend client that propagates the QoS responses instead of retrying so the proxy client can handle them appropriately. There is no risk of retry storms because the retries are isolated to one layer, the proxy client.

      Note that QosException.RetryOther (308) is not propagated. If the proxy server is exposed on the front door but the backend is not, it makes no sense to redirect the caller to a new backend. The client will still follow redirects.

  • Method Details

    • values

      public static ClientConfiguration.ServerQoS[] 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 ClientConfiguration.ServerQoS 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