org.apache.logging.log4j.core.jmx
Class RingBufferAdmin

java.lang.Object
  extended by org.apache.logging.log4j.core.jmx.RingBufferAdmin
All Implemented Interfaces:
RingBufferAdminMBean

public class RingBufferAdmin
extends Object
implements 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
protected RingBufferAdmin(com.lmax.disruptor.RingBuffer<?> ringBuffer, String mbeanName)
           
 
Method Summary
static RingBufferAdmin forAsyncLogger(com.lmax.disruptor.RingBuffer<?> ringBuffer, String contextName)
           
static RingBufferAdmin forAsyncLoggerConfig(com.lmax.disruptor.RingBuffer<?> ringBuffer, String contextName, String configName)
           
 long getBufferSize()
          Returns the number of slots that the ring buffer was configured with.
 ObjectName getObjectName()
          Returns the ObjectName of this mbean.
 long getRemainingCapacity()
          Returns the number of available slots in the ring buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RingBufferAdmin

protected RingBufferAdmin(com.lmax.disruptor.RingBuffer<?> ringBuffer,
                          String mbeanName)
Method Detail

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 interface RingBufferAdminMBean
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 interface RingBufferAdminMBean
Returns:
the number of available slots in the ring buffer

getObjectName

public ObjectName getObjectName()
Returns the ObjectName of this mbean.

Returns:
the ObjectName
See Also:
RingBufferAdminMBean.PATTERN_ASYNC_LOGGER, RingBufferAdminMBean.PATTERN_ASYNC_LOGGER_CONFIG


Copyright © 1999-2014 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.