private static WaitStrategy createWaitStrategy() {
final String strategy = System.getProperty("AsyncLoggerConfig.WaitStrategy");
LOGGER.debug("property AsyncLoggerConfig.WaitStrategy={}", strategy);
if ("Sleep".equals(strategy)) {
LOGGER.debug("disruptor event handler uses SleepingWaitStrategy");
return new SleepingWaitStrategy();
} else if ("Yield".equals(strategy)) {
LOGGER.debug("disruptor event handler uses YieldingWaitStrategy");
return new YieldingWaitStrategy();
} else if ("Block".equals(strategy)) {
LOGGER.debug("disruptor event handler uses BlockingWaitStrategy");
return new BlockingWaitStrategy();
}
LOGGER.debug("disruptor event handler uses SleepingWaitStrategy");
return new SleepingWaitStrategy();
}