@EnumDescription(value="Strategy employed for making Disruptor Executor wait on a cursor.") public enum DisruptorWaitStrategyType extends Enum<DisruptorWaitStrategyType>
| Enum Constant and Description |
|---|
BLOCKING_WAIT
The BlockingWaitStrategy is the slowest of the available wait strategies, but is the most conservative with the respect to CPU usage
and will give the most consistent behaviour across the widest variety of deployment options.
|
BUSY_SPIN_WAIT
The `BusySpinWaitStrategy` is the highest performing WaitStrategy.
|
SLEEPING_WAIT
Like the `BlockingWaitStrategy` the `SleepingWaitStrategy` it attempts to be conservative with CPU usage by using a simple busy wait loop.
|
YIELDING_WAIT
The `YieldingWaitStrategy` is one of two WaitStrategies that can be used in low-latency systems.
|
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getNames() |
static DisruptorWaitStrategyType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DisruptorWaitStrategyType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@EnumFieldDescription(value="The slowest of the available wait strategies. However, it is the most conservative with the respect to CPU usage and will give the most consistent behaviour across the widest variety of deployment options.") public static final DisruptorWaitStrategyType BLOCKING_WAIT
@EnumFieldDescription(value="Like the `BLOCKING_WAIT` strategy, it attempts to be conservative with CPU usage by using a simple busy wait loop. The difference is that the `SLEEPING_WAIT` strategy uses a call to `LockSupport.parkNanos(1)` in the middle of the loop. On a typical Linux system this will pause the thread for around 60\u00b5s.") public static final DisruptorWaitStrategyType SLEEPING_WAIT
@EnumFieldDescription(value="The `YIELDING_WAIT` strategy is one of two wait strategy that can be used in low-latency systems. It is designed for cases where there is an opportunity to burn CPU cycles with the goal of improving latency. The `YIELDING_WAIT` strategy will busy spin, waiting for the sequence to increment to the appropriate value. Inside the body of the loop `Thread#yield()` will be called allowing other queued threads to run. This is the recommended wait strategy when you need very high performance, and the number of `EventHandler` threads is lower than the total number of logical cores, such as when hyper-threading is enabled.") public static final DisruptorWaitStrategyType YIELDING_WAIT
@EnumFieldDescription(value="The `BUSY_SPIN_WAIT` strategy is the highest performing wait strategy. Like the `YIELDING_WAIT` strategy, it can be used in low-latency systems, but puts the highest constraints on the deployment environment.") public static final DisruptorWaitStrategyType BUSY_SPIN_WAIT
public static DisruptorWaitStrategyType[] values()
for (DisruptorWaitStrategyType c : DisruptorWaitStrategyType.values()) System.out.println(c);
public static DisruptorWaitStrategyType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2024 The Apache Software Foundation. All rights reserved.