Package io.airlift.stats
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 Summary
Constructors Constructor Description JmxGcMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeStatgetMajorGc()longgetMajorGcCount()io.airlift.units.DurationgetMajorGcTime()TimeStatgetMinorGc()voidstart()voidstop()
-
-
-
Method Detail
-
start
@PostConstruct public void start()
-
stop
@PreDestroy public void stop()
-
getMajorGcCount
public long getMajorGcCount()
- Specified by:
getMajorGcCountin interfaceGcMonitor
-
getMajorGcTime
public io.airlift.units.Duration getMajorGcTime()
- Specified by:
getMajorGcTimein interfaceGcMonitor
-
getMajorGc
public TimeStat getMajorGc()
-
getMinorGc
public TimeStat getMinorGc()
-
-