Enum Class BackpressurePolicy

java.lang.Object
java.lang.Enum<BackpressurePolicy>
org.j7m.middleware.api.reliability.BackpressurePolicy
All Implemented Interfaces:
Serializable, Comparable<BackpressurePolicy>, Constable

public enum BackpressurePolicy extends Enum<BackpressurePolicy>
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.

  • Enum Constant Details

    • REJECT_IMMEDIATELY

      public static final BackpressurePolicy REJECT_IMMEDIATELY
      Reject immediately when capacity is unavailable.
    • FAIL_AFTER_DEADLINE

      public static final BackpressurePolicy FAIL_AFTER_DEADLINE
      Wait only until the invocation deadline, then fail.
    • CALLER_MANAGED_RETRY_AFTER

      public static final BackpressurePolicy CALLER_MANAGED_RETRY_AFTER
      Return caller-managed retry-after metadata with the rejection.
  • Method Details

    • values

      public static BackpressurePolicy[] 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 BackpressurePolicy 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