final class DisruptorUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static boolean |
ASYNC_CONFIG_SYNCHRONIZE_ENQUEUE_WHEN_QUEUE_FULL |
(package private) static boolean |
ASYNC_LOGGER_SYNCHRONIZE_ENQUEUE_WHEN_QUEUE_FULL
LOG4J2-2606: Users encountered excessive CPU utilization with Disruptor v3.4.2 when the application
was logging more than the underlying appender could keep up with and the ringbuffer became full,
especially when the number of application threads vastly outnumbered the number of cores.
|
private static Logger |
LOGGER |
private static int |
RINGBUFFER_DEFAULT_SIZE |
private static int |
RINGBUFFER_MIN_SIZE |
private static int |
RINGBUFFER_NO_GC_DEFAULT_SIZE |
Modifier | Constructor and Description |
---|---|
private |
DisruptorUtil() |
Modifier and Type | Method and Description |
---|---|
(package private) static int |
calculateRingBufferSize(java.lang.String propertyName) |
(package private) static com.lmax.disruptor.WaitStrategy |
createWaitStrategy(java.lang.String propertyName) |
(package private) static com.lmax.disruptor.WaitStrategy |
createWaitStrategy(java.lang.String propertyName,
long timeoutMillis) |
(package private) static com.lmax.disruptor.ExceptionHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper> |
getAsyncLoggerConfigExceptionHandler() |
(package private) static com.lmax.disruptor.ExceptionHandler<RingBufferLogEvent> |
getAsyncLoggerExceptionHandler() |
static long |
getExecutorThreadId(java.util.concurrent.ExecutorService executor)
Returns the thread ID of the background appender thread.
|
(package private) static long |
getTimeout(java.lang.String propertyName,
long defaultTimeout) |
private static final Logger LOGGER
private static final int RINGBUFFER_MIN_SIZE
private static final int RINGBUFFER_DEFAULT_SIZE
private static final int RINGBUFFER_NO_GC_DEFAULT_SIZE
static final boolean ASYNC_LOGGER_SYNCHRONIZE_ENQUEUE_WHEN_QUEUE_FULL
static final boolean ASYNC_CONFIG_SYNCHRONIZE_ENQUEUE_WHEN_QUEUE_FULL
static long getTimeout(java.lang.String propertyName, long defaultTimeout)
static com.lmax.disruptor.WaitStrategy createWaitStrategy(java.lang.String propertyName)
static com.lmax.disruptor.WaitStrategy createWaitStrategy(java.lang.String propertyName, long timeoutMillis)
static int calculateRingBufferSize(java.lang.String propertyName)
static com.lmax.disruptor.ExceptionHandler<RingBufferLogEvent> getAsyncLoggerExceptionHandler()
static com.lmax.disruptor.ExceptionHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper> getAsyncLoggerConfigExceptionHandler()
public static long getExecutorThreadId(java.util.concurrent.ExecutorService executor)
executor
- runs the appender thread