public interface RingBufferAdminMBean
Modifier and Type | Field and Description |
---|---|
static String |
PATTERN_ASYNC_LOGGER
ObjectName pattern ("org.apache.logging.log4j2:type=%s,component=AsyncLoggerRingBuffer") for the RingBufferAdmin MBean that instruments
the global
AsyncLogger ring buffer. |
static String |
PATTERN_ASYNC_LOGGER_CONFIG
ObjectName pattern ("org.apache.logging.log4j2:type=%s,component=Loggers,name=%s,subtype=RingBuffer") for RingBufferAdmin MBeans that instrument
AsyncLoggerConfig ring buffers. |
Modifier and Type | Method and Description |
---|---|
long |
getBufferSize()
Returns the number of slots that the ring buffer was configured with.
|
long |
getRemainingCapacity()
Returns the number of available slots in the ring buffer.
|
static final String PATTERN_ASYNC_LOGGER
AsyncLogger
ring buffer.
This pattern contains one variable: the name of the context.
You can find the registered RingBufferAdmin MBean for the global AsyncLogger like this:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); String pattern = String.format(RingBufferAdminMBean.PATTERN_ASYNC_LOGGER, "*"); Set<ObjectName> asyncLoggerNames = mbs.queryNames(new ObjectName(pattern), null);
static final String PATTERN_ASYNC_LOGGER_CONFIG
AsyncLoggerConfig
ring buffers.
This pattern contains three variables, where the first is the name of the
context, the second and third are identical and the name of the instrumented logger config.
You can find all registered RingBufferAdmin MBeans like this:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); String pattern = String.format(RingBufferAdminMBean.PATTERN_ASYNC_LOGGER_CONFIG, "*", "*"); Set<ObjectName> asyncConfigNames = mbs.queryNames(new ObjectName(pattern), null);
long getBufferSize()
long getRemainingCapacity()
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.