Class IpdMeter.NoopMeter

java.lang.Object
com.atlassian.diagnostics.ipd.api.meters.AbstractIpdMeter
com.atlassian.diagnostics.ipd.api.meters.IpdMeter.NoopMeter
All Implemented Interfaces:
IpdMeter
Direct Known Subclasses:
CounterMeter.Noop, CustomMeter.Noop, JmxCopyMeter.Noop, StatsMeter.Noop, ValueMeter.Noop
Enclosing interface:
IpdMeter

public abstract static class IpdMeter.NoopMeter extends AbstractIpdMeter
Noop implementation of IpdMeter. Does nothing. Meter is won't be visible in JMX.
  • Constructor Details

    • NoopMeter

      protected NoopMeter(MeterConfig meterConfig)
  • Method Details

    • registerMBean

      protected void registerMBean()
      Description copied from class: AbstractIpdMeter
      Registers the MBean in the MBeanServer.
      Method will be called when the meter is enabled and is visible in JMX.
      Specified by:
      registerMBean in class AbstractIpdMeter
    • unregisterMBean

      protected void unregisterMBean()
      Description copied from class: AbstractIpdMeter
      Unregisters the MBean from the MBeanServer.
      Method will be called when the meter is closed or is hidden from JMX.
      Specified by:
      unregisterMBean in class AbstractIpdMeter
    • isVisible

      public boolean isVisible()
      Description copied from interface: IpdMeter
      Meter might be enabled, but temporarily hidden in JMX. This might happen when meter value was not set yet or method IpdMeter.hideUntilUpdate() was called.
      Returns:
      true if the meter is visible in JMX, false otherwise
    • getAttributes

      public Map<String,Object> getAttributes(boolean extraAttributes)
      Description copied from interface: IpdMeter
      Returns the attributes of the meter.
      Parameters:
      extraAttributes - if true, all attributes visible in JMX will be returned, otherwise only the most important ones
      Returns:
      Map of meter attributes, will return empty map if attributes can't be retrieved