public interface MemoryPoolMXBean extends MemoryPoolMXBean
MemoryPoolMXBean
.
You can revert to the earlier implementation of MemoryPoolMXBean
by setting the
-XX:+HeapManagementMXBeanCompatibility Java command line option.
ManagementFactory.getMemoryPoolMXBeans()
If you set the -XX:+HeapManagementMXBeanCompatibility option to turn on compatibility with earlier versions of the VM,
information about heap memory pools is reported in the older format.
The following name is reported for the heap memory pool for all garbage collection policies in the old format:
MemoryPoolMXBean.getUsage()
or MemoryPoolMXBean.getCollectionUsage()
.
In some cases the total sum of memory usage of all heap memory pools is more than the maximum heap size.
This irregularity can be caused if data for each pool is collected between garbage collection cycles,
where objects have been moved or reclaimed.
If you want to collect memory usage data that is synchronized across the memory pools, use the
GarbageCollectionNotificationInfo
or GarbageCollectorMXBean.getLastGcInfo()
extensions.
MemoryPoolMXBean.getUsageThreshold()
, MemoryPoolMXBean.setUsageThreshold(long)
, MemoryPoolMXBean.isUsageThresholdExceeded()
)MemoryPoolMXBean.isUsageThresholdSupported()
method to determine
if this functionality is supported by the memory pool to avoid an unexpected UnsupportedOperationException
.
MemoryPoolMXBean.getCollectionUsageThreshold()
, MemoryPoolMXBean.setCollectionUsageThreshold(long)
, MemoryPoolMXBean.isCollectionUsageThresholdExceeded()
)MemoryPoolMXBean.isCollectionUsageThresholdSupported()
method to determine
if this functionality is supported by the memory pool to avoid an unexpected UnsupportedOperationException
.
Modifier and Type | Method and Description |
---|---|
MemoryUsage |
getPreCollectionUsage()
If supported by the virtual machine, returns a
MemoryUsage which
encapsulates this memory pool's memory usage before the most
recent run of the garbage collector. |
getCollectionUsage, getCollectionUsageThreshold, getCollectionUsageThresholdCount, getMemoryManagerNames, getName, getPeakUsage, getType, getUsage, getUsageThreshold, getUsageThresholdCount, isCollectionUsageThresholdExceeded, isCollectionUsageThresholdSupported, isUsageThresholdExceeded, isUsageThresholdSupported, isValid, resetPeakUsage, setCollectionUsageThreshold, setUsageThreshold
getObjectName
MemoryUsage getPreCollectionUsage()
MemoryUsage
which
encapsulates this memory pool's memory usage before the most
recent run of the garbage collector. No garbage collection will be
actually occur as a result of this method getting called.
The method will return a null
if the virtual machine does
not support this type of functionality.
CompositeData
with attributes as
specified in MemoryUsage
.MemoryUsage
containing the usage details for the memory
pool just before the most recent collection occurred.Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2001, 2024 IBM Corp. and others.