Class JmxGcMonitor

java.lang.Object
io.airlift.stats.JmxGcMonitor
All Implemented Interfaces:
GcMonitor

public class JmxGcMonitor extends Object implements GcMonitor
Monitor GC events via JMX. GC events are divided into major and minor using the OpenJDK naming convention for gcAction. Also, application time is calculated using the assumption that major collections stop the application.

Major and minor GCs are logged to standard logging system, which makes it easy to debug the full log stream. TimeStats are exported for major, minor, and application time.

  • Constructor Details

    • JmxGcMonitor

      public JmxGcMonitor()
  • Method Details

    • start

      @PostConstruct public void start()
    • stop

      @PreDestroy public void stop()
    • getMajorGcCount

      public long getMajorGcCount()
      Specified by:
      getMajorGcCount in interface GcMonitor
    • getMajorGcTime

      public io.airlift.units.Duration getMajorGcTime()
      Specified by:
      getMajorGcTime in interface GcMonitor
    • getMajorGc

      public TimeStat getMajorGc()
    • getMinorGc

      public TimeStat getMinorGc()