public class WaitStrategyFactory extends Object
WaitStrategy objects from strings.| Constructor and Description |
|---|
WaitStrategyFactory() |
| Modifier and Type | Method and Description |
|---|---|
static com.lmax.disruptor.WaitStrategy |
createWaitStrategyFromString(String waitStrategyType)
Creates a
WaitStrategy from a string. |
public static com.lmax.disruptor.WaitStrategy createWaitStrategyFromString(String waitStrategyType)
WaitStrategy from a string.
The following strategies are supported:
BlockingWaitStrategyBusySpinWaitStrategyLiteBlockingWaitStrategySleepingWaitStrategyYieldingWaitStrategyPhasedBackoffWaitStrategy
- spinTimeout and yieldTimeout are long values.
timeUnit is a string name of one of the TimeUnit values.
fallbackStrategy is a wait strategy string (e.g. blocking).
TimeoutBlockingWaitStrategy
- timeout is a long value.
timeUnit is a string name of one of the TimeUnit values.
IllegalArgumentException - if an unknown wait strategy type is given, or the parameters are unable to be parsed.Copyright © 2016. All Rights Reserved.