Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.13.3
-
None
Description
I have realized that there is garbage generated from the following stack trace:
AbstractQueuedSynchronizer$Node java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter() long util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) long com.lmax.disruptor.TimeoutBlockingWaitStrategy.waitFor(long, Sequence, Sequence, SequenceBarrier) long com.lmax.disruptor.ProcessingSequenceBarrier.waitFor(long) void com.lmax.disruptor.BatchEventProcessor.processEvents() void com.lmax.disruptor.BatchEventProcessor.run() void java.lang.Thread.run()
Thus, I would like to use some other wait strategy. However there are only few possibilities. I would prefer to use SleepingWaitStrategy with custom parameters. But there is no such option:
case "SLEEP":
return new SleepingWaitStrategy();
case "YIELD":
return new YieldingWaitStrategy();
case "BLOCK":
return new BlockingWaitStrategy();
case "BUSYSPIN":
return new BusySpinWaitStrategy();
case "TIMEOUT":
return new TimeoutBlockingWaitStrategy(timeoutMillis, TimeUnit.MILLISECONDS);
default:
return new TimeoutBlockingWaitStrategy(timeoutMillis, TimeUnit.MILLISECONDS);
The key goal is to log messages with weak requirements on logging latency, BUT in the JVM with low-latency code.
Attachments
Issue Links
- is related to
-
LOG4J2-3472 Allow configuration of custom Disruptor WaitStrategy
- Closed