Class RingBufferAdmin
java.lang.Object
org.apache.logging.log4j.core.jmx.RingBufferAdmin
- All Implemented Interfaces:
RingBufferAdminMBean
Instruments an LMAX Disruptor ring buffer.
-
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.jmx.RingBufferAdminMBean
PATTERN_ASYNC_LOGGER, PATTERN_ASYNC_LOGGER_CONFIG
-
Constructor Summary
ModifierConstructorDescriptionprotected
RingBufferAdmin
(com.lmax.disruptor.RingBuffer<?> ringBuffer, String mbeanName) -
Method Summary
Modifier and TypeMethodDescriptionstatic RingBufferAdmin
forAsyncLogger
(com.lmax.disruptor.RingBuffer<?> ringBuffer, String contextName) static RingBufferAdmin
forAsyncLoggerConfig
(com.lmax.disruptor.RingBuffer<?> ringBuffer, String contextName, String configName) long
Returns the number of slots that the ring buffer was configured with.Returns theObjectName
of this mbean.long
Returns the number of available slots in the ring buffer.
-
Constructor Details
-
RingBufferAdmin
-
-
Method Details
-
forAsyncLogger
public static RingBufferAdmin forAsyncLogger(com.lmax.disruptor.RingBuffer<?> ringBuffer, String contextName) -
forAsyncLoggerConfig
public static RingBufferAdmin forAsyncLoggerConfig(com.lmax.disruptor.RingBuffer<?> ringBuffer, String contextName, String configName) -
getBufferSize
public long getBufferSize()Description copied from interface:RingBufferAdminMBean
Returns the number of slots that the ring buffer was configured with. Disruptor ring buffers are bounded-size data structures, this number does not change during the life of the ring buffer.- Specified by:
getBufferSize
in interfaceRingBufferAdminMBean
- Returns:
- the number of slots that the ring buffer was configured with
-
getRemainingCapacity
public long getRemainingCapacity()Description copied from interface:RingBufferAdminMBean
Returns the number of available slots in the ring buffer. May vary wildly between invocations.- Specified by:
getRemainingCapacity
in interfaceRingBufferAdminMBean
- Returns:
- the number of available slots in the ring buffer
-
getObjectName
Returns theObjectName
of this mbean.- Returns:
- the
ObjectName
- See Also:
-