Enum Class BackpressurePolicy
- All Implemented Interfaces:
Serializable, Comparable<BackpressurePolicy>, Constable
Backpressure behavior requested by the caller or selected by policy.
The enum is immutable and thread-safe. Retry-after metadata is advisory; callers remain responsible for retry budgeting and business consistency.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturn caller-managed retry-after metadata with the rejection.Wait only until the invocation deadline, then fail.Reject immediately when capacity is unavailable. -
Method Summary
Modifier and TypeMethodDescriptionstatic BackpressurePolicyReturns the enum constant of this class with the specified name.static BackpressurePolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REJECT_IMMEDIATELY
Reject immediately when capacity is unavailable. -
FAIL_AFTER_DEADLINE
Wait only until the invocation deadline, then fail. -
CALLER_MANAGED_RETRY_AFTER
Return caller-managed retry-after metadata with the rejection.
-
-
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
-