Class GarbageCollectionMonitor
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,NotificationBroadcaster,NotificationEmitter,BaseObjectNamed,GarbageCollectionMonitorMBean,SelfEmailingMBean
GarbageCollectionMonitorMBean.
This class is non-final so as to allow subclassing and overriding of getCurrentGCMillis().
Supported API: true
Extendable: true
-
Field Summary
Fields inherited from interface wt.jmx.core.mbeans.GarbageCollectionMonitorMBean
GC_THRESHOLD_EXCEEDED_INITIAL_NOTIF_TYPE, GC_THRESHOLD_EXCEEDED_NO_LONGER_NOTIF_TYPE, GC_THRESHOLD_EXCEEDED_STILL_NOTIF_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longMethod which determines a metric for the total number of milliseconds spent in GC since application startup.Methods inherited from class wt.jmx.core.SelfAwareMBean
deregister, destroy, getBaseObjectName, getObjectName, getObjectNameOnPreRegister, getOwnerMBean, getSelfAwareMBean, init, isInited, isRegistered, isStarted, onDestroy, onInit, postDeregister, postRegister, preDeregister, preRegister, register, register, register, resetObjectName, setOwnerMBean, start, stopMethods inherited from class wt.jmx.core.StandardMBean
cacheMBeanInfo, cacheMBeanInfoInInstance, emailThisMBean, getAttributes, getCachedInstanceMBeanInfo, getCachedMBeanInfo, getDescription, getDescription, getDescription, getDescription, getImpact, getMBeanInfo, getParameterName, setAttributesMethods inherited from class javax.management.StandardMBean
getAttribute, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, invoke, setAttribute, setImplementationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Constructor Details
-
GarbageCollectionMonitor
No arg constructor.
Supported API: true- Throws:
NotCompliantMBeanException
-
-
Method Details
-
getCurrentGCMillis
protected long getCurrentGCMillis()Method which determines a metric for the total number of milliseconds spent in GC since application startup.This method is left as protected and the overall class as non-final to allow this method to be overriden since there are different ways one might compute this result given the sparsity of information provided by the underlying
GarbageCollectorMXBeans and the goal of arriving at a metric which best gauges the impact garbage collection has on the application.This implementation considers only garbage collectors which operate upon the old or tenured generation as being significant -- as these garbage collectors generally pause other threads at times and generally present more of a bottleneck than other collectors which are often only a small drain on CPU time by comparison.
Supported API: true
-