Enum Class IdleStrategyKind

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

public enum IdleStrategyKind extends Enum<IdleStrategyKind>
Выбор idle-стратегии для receive и вспомогательных polling loops.

Стратегия определяет, как поток ведет себя во время простоя: крутится, уступает квант планировщику или уходит в backoff с park. От этого зависит баланс между latency и CPU usage.

Idle strategy selection for receive and helper polling loops. The choice determines whether a thread spins, yields, or backs off with parking while idle. That directly affects the latency-versus-CPU trade-off.

  • Enum Constant Details

    • BUSY_SPIN

      public static final IdleStrategyKind BUSY_SPIN
      Постоянный busy-spin без yield и park.

      Continuous busy spin without yield or park.

    • YIELDING

      public static final IdleStrategyKind YIELDING
      Вызывает Thread.yield() во время простоя без park.

      Uses Thread.yield() while idle and avoids parking.

    • BACKOFF

      public static final IdleStrategyKind BACKOFF
      Backoff-стратегия Agrona: spin, затем yield, затем park.

      Agrona backoff strategy: spin, then yield, then park.

  • Method Details

    • values

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