Enum Class IdleStrategyKind
- All Implemented Interfaces:
Serializable, Comparable<IdleStrategyKind>, Constable
Выбор 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic IdleStrategyKindReturns the enum constant of this class with the specified name.static IdleStrategyKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BUSY_SPIN
Постоянный busy-spin без yield и park.Continuous busy spin without yield or park.
-
YIELDING
ВызываетThread.yield()во время простоя без park.Uses
Thread.yield()while idle and avoids parking. -
BACKOFF
Backoff-стратегия Agrona: spin, затем yield, затем park.Agrona backoff strategy: spin, then yield, then park.
-
-
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
-