Interface GCData
- All Superinterfaces:
HealthCenterData,NotificationBroadcaster,NotificationEmitter
- All Known Implementing Classes:
GCDataImpl
This class provides information about the garbage collection behaviour in the
monitored Java application.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe different types of garbage collection mode. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringUsed to get only Heap Size Data when comparing againstNotificationListener.getUserData()static final StringUsed to get only Pause Time Data when comparing againstNotificationListener.getUserData()static final StringUsed to get only Used Heap Data when comparing againstNotificationListener.getUserData() -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGCListener(GCEventListener listener) Add a listener for notification of when GC events occurvoidAdd a listener for notification of when ObjectAllocation events occurdoubleGets average interval, in milliseconds, between garbage collections.doubleGets the average garbage collection pause time, in milliseconds.intGets the average number of global mark phase collections per cycle.intGets the concurrent collection countintGets the number of garbage collections.Gets the garbage collection mode that is used by the monitored application.Gets the data associated with garbage collection pause times.doubleGets the average interval, in milliseconds, between global garbage collections.doubleGets the average global garbage collection pause time, in milliseconds.intGets the number of global garbage collections.intGets the global mark phase cycle count.HeapData[]Gets the data that is associated with heap size.longGets the largest memory request (in bytes) made by the application.longGets the maximum heap size.longGets the maximum pause time.longGets the maximum used heap.doubleGets the mean heap size.doubleGets the mean pause time.doubleGets the mean used heap.longGets the minimum heap size.longGets the minimum pause time.longGets the minimum used heap.intGets the number of garbage collections triggered by allocation failure.intGets the number of system (forced) garbage collections.doubleGets the average interval, in milliseconds, between nursery garbage collections.doubleGets the average nursery garbage collection pause time, in milliseconds.intGets the number of nursery garbage collections.longGets the total amount flipped for nursery garbage collections.Gets an array of the object allocation events.Gets an array of the out-of-line allocation events.Gets a GCPreferences object on which preferences can be set.doubleGets the proportion of time spent in garbage collection pauses.doubleGets the proportion of time spent unpaused (not in a garbage collection).intGets the total number of quantum collections.doubleGets the rate of garbage collection in MB/minute.intGets the total number of synchronous garbage collections.HeapData[]Gets the data that is associated with used heap after a garbage collection.voidremoveGCListener(GCEventListener listener) Remove one of registered listeners.voidRemove one of registered listeners.Methods inherited from interface com.ibm.java.diagnostics.healthcenter.api.HealthCenterData
getAllRecommendations, getCriticalRecommendations, getHealthyRecommendations, getInformationalRecommendations, getWarningRecommendations, startNotifying, startNotifyingMethods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListenerMethods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
-
Field Details
-
HEAPSIZEDATA
Used to get only Heap Size Data when comparing againstNotificationListener.getUserData()- See Also:
-
USEDHEAPDATA
Used to get only Used Heap Data when comparing againstNotificationListener.getUserData()- See Also:
-
PAUSETIMEDATA
Used to get only Pause Time Data when comparing againstNotificationListener.getUserData()- See Also:
-
-
Method Details
-
getHeapSizeData
HeapData[] getHeapSizeData()Gets the data that is associated with heap size. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur- Returns:
- an array of HeapData objects.
-
getUsedHeapData
HeapData[] getUsedHeapData()Gets the data that is associated with used heap after a garbage collection. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur- Returns:
- An array of HeapData objects.
-
getGCPauseTimeData
PauseData[] getGCPauseTimeData()Gets the data associated with garbage collection pause times. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur- Returns:
- an array of PauseData objects.
-
getConcurrentCollectionCount
int getConcurrentCollectionCount()Gets the concurrent collection count- Returns:
- the number of concurrent collections or -1 if there aren't any concurrent collections.
-
getGCMode
Enum<GCData.GCmodes> getGCMode()Gets the garbage collection mode that is used by the monitored application.- Returns:
- the garbage collection mode.
-
getGlobalAverageGCPauseTime
double getGlobalAverageGCPauseTime()Gets the average global garbage collection pause time, in milliseconds.- Returns:
- the average global garbage collection pause time or -1 if there aren't any global collections.
-
getAverageGCPauseTime
double getAverageGCPauseTime()Gets the average garbage collection pause time, in milliseconds.- Returns:
- the average garbage collection pause time or -1 if there aren't any collections.
-
getGlobalAverageCollectionInterval
double getGlobalAverageCollectionInterval()Gets the average interval, in milliseconds, between global garbage collections.- Returns:
- the average global collection interval or -1 if there aren't any global collections
-
getAverageCollectionInterval
double getAverageCollectionInterval()Gets average interval, in milliseconds, between garbage collections.- Returns:
- the average collection interval or -1 if there aren't any collections.
-
getGlobalGCCount
int getGlobalGCCount()Gets the number of global garbage collections.- Returns:
- the number of global garbage collections or -1 if there aren't any global collections.
-
getGCCount
int getGCCount()Gets the number of garbage collections.- Returns:
- the total number of garbage collections or -1 if there aren't any collections.
-
getLargestMemoryRequest
long getLargestMemoryRequest()Gets the largest memory request (in bytes) made by the application.- Returns:
- the largest memory request that triggered a garbage collection or -1 if there aren't any.
-
getNurseryAverageGCPauseTime
double getNurseryAverageGCPauseTime()Gets the average nursery garbage collection pause time, in milliseconds.- Returns:
- the average nursery garbage collection pause times or -1 if there aren't any nursery collections.
-
getNurseryAverageCollectionInterval
double getNurseryAverageCollectionInterval()Gets the average interval, in milliseconds, between nursery garbage collections.- Returns:
- the average nursery garbage collection interval time or -1 if there aren't any nursery collections.
-
getNurseryGCCount
int getNurseryGCCount()Gets the number of nursery garbage collections.- Returns:
- the number of nursery garbage collections or -1 if there aren't s any nursery collections.
-
getNurseryTotalAmountFlipped
long getNurseryTotalAmountFlipped()Gets the total amount flipped for nursery garbage collections.- Returns:
- The total amount flipped in nursery collections in bytes or -1 if there aren't any.
-
getGMPCycleCount
int getGMPCycleCount()Gets the global mark phase cycle count.- Returns:
- the count of the number of global mark phases or -1 if there aren't any.
-
getAverageGMPCollections
int getAverageGMPCollections()Gets the average number of global mark phase collections per cycle.- Returns:
- the average number of global mark phase collections or -1 if there aren't any.
-
getQuantumCollectionCount
int getQuantumCollectionCount()Gets the total number of quantum collections. This applies only to IBM WebSphere Real Time.- Returns:
- the number of quantum collections or -1 if there aren't any quantum collections.
-
getSynchGCCount
int getSynchGCCount()Gets the total number of synchronous garbage collections.- Returns:
- the number of synchronous garbage collections or -1 if there aren't any synchronous collections.
-
getNumberOfAllocationFailures
int getNumberOfAllocationFailures()Gets the number of garbage collections triggered by allocation failure.- Returns:
- the number of allocation failures or -1 if there aren't any.
-
getProportionTimeSpentInGCPause
double getProportionTimeSpentInGCPause()Gets the proportion of time spent in garbage collection pauses. Returned as a percentage.- Returns:
- the percentage of time spent in garbage collections pauses or -1 if there aren't any collections.
-
getProportionTimeSpentUnpaused
double getProportionTimeSpentUnpaused()Gets the proportion of time spent unpaused (not in a garbage collection). Returned as a percentage.- Returns:
- the percentage of time spent unpaused or -1 if there aren't any collections.
-
getRateOfGarbageCollection
double getRateOfGarbageCollection()Gets the rate of garbage collection in MB/minute.- Returns:
- the rate of garbage collection or -1 if there aren't any collections.
-
getNumberSystemGC
int getNumberSystemGC()Gets the number of system (forced) garbage collections.- Returns:
- the number of system garbage collections or -1 if there aren't any.
-
getPreferences
GCPreferences getPreferences()Gets a GCPreferences object on which preferences can be set.- Returns:
- the GCPreferences object for this GCData object.
-
getObjectAllocationEvents
ObjectAllocationEvent[] getObjectAllocationEvents()Gets an array of the object allocation events.- Returns:
- an array of ObjectAllocation objects.
-
getOutOfLineAllocationEvents
OutOfLineAllocationEvent[] getOutOfLineAllocationEvents()Gets an array of the out-of-line allocation events.- Returns:
- an array of OutOfLineAllocationEvent objects.
-
getMinHeapSize
long getMinHeapSize()Gets the minimum heap size.- Returns:
- minimum heap size in bytes
-
getMaxHeapSize
long getMaxHeapSize()Gets the maximum heap size.- Returns:
- maximum heap size in bytes
-
getMeanHeapSize
double getMeanHeapSize()Gets the mean heap size.- Returns:
- mean heap size in bytes
-
getMinUsedHeap
long getMinUsedHeap()Gets the minimum used heap.- Returns:
- minimum used heap in bytes
-
getMaxUsedHeap
long getMaxUsedHeap()Gets the maximum used heap.- Returns:
- maximum used heap in bytes
-
getMeanUsedHeap
double getMeanUsedHeap()Gets the mean used heap.- Returns:
- mean used heap in bytes
-
getMinPauseTime
long getMinPauseTime()Gets the minimum pause time.- Returns:
- minimum pause time in ms
-
getMaxPauseTime
long getMaxPauseTime()Gets the maximum pause time.- Returns:
- maximum pause time in ms
-
getMeanPauseTime
double getMeanPauseTime()Gets the mean pause time.- Returns:
- mean pause time in ms
-
addGCListener
Add a listener for notification of when GC events occur- Parameters:
implementation- of the GCEventListener class
-
removeGCListener
Remove one of registered listeners.- Parameters:
implementation- of the GCEventListener class
-
addObjectAllocationListener
Add a listener for notification of when ObjectAllocation events occur- Parameters:
implementation- of the ObjectAllocationEventListener class
-
removeObjectAllocationListener
Remove one of registered listeners.- Parameters:
implementation- of the ObjectAllocationEventListener class
-