Enum Class BackpressurePolicy

java.lang.Object
java.lang.Enum<BackpressurePolicy>
ru.pathcreator.pyc.rpc.core.BackpressurePolicy
All Implemented Interfaces:
Serializable, Comparable<BackpressurePolicy>, Constable

public enum BackpressurePolicy extends Enum<BackpressurePolicy>
Политика поведения, когда Aeron publication остается back-pressured дольше offerTimeout.

Policy describing what to do when an Aeron publication remains back-pressured longer than offerTimeout.

Политика intentionally сведена к двум значениям. Для request/response RPC варианты вроде silent drop обычно вредны: caller всё равно ждет ответ и в итоге получит timeout или ошибку, только менее понятным способом.

The policy is intentionally reduced to two values. For request/response RPC, silent-drop style behaviors are usually harmful: the caller still waits for a response and eventually ends up with a timeout or failure, just in a less explicit way.

  • Enum Constant Details

    • BLOCK

      public static final BackpressurePolicy BLOCK
      Ждать, пока publication снова сможет принять сообщение, или до истечения offerTimeout.

      Wait until the publication can accept the message again, or until offerTimeout expires.

    • FAIL_FAST

      public static final BackpressurePolicy FAIL_FAST
      Сразу завершиться ошибкой при первой же backpressure-неудаче.

      Fail immediately on the first backpressure result.

  • 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