Enum Class ClientConfiguration.ServerQoS
- All Implemented Interfaces:
Serializable, Comparable<ClientConfiguration.ServerQoS>, Constable
- Enclosing interface:
ClientConfiguration
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault.Propagate QosException.Throttle and QosException.Unavailable (429/503) to the caller. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static ClientConfiguration.ServerQoS[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTOMATIC_RETRY
Default. -
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
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
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 nameNullPointerException- if the argument is null
-