Class MemoryPoolMXBeanImpl
java.lang.Object
com.ibm.lang.management.internal.MemoryPoolMXBeanImpl
- All Implemented Interfaces:
 MemoryPoolMXBean, MemoryPoolMXBean, PlatformManagedObject
Implementation of the extended MemoryPoolMXBean.
- 
Method Summary
Modifier and TypeMethodDescriptionIf supported by the virtual machine, returns aMemoryUsagewhich encapsulates this memory pool's memory usage after the most recent run of the garbage collector.longReturns this memory pool's collection usage threshold.longReturns the number of times that the memory usage for this memory pool has grown to exceed the collection usage threshold.String[]Returns a string array containing the unique names of each memory manager that manages this memory pool.getName()Returns the name of this memory pool.Returns anObjectNameinstance representing the object name of this platform managed object.Returns information on the peak usage of the memory pool.To satisfy com.ibm.lang.management.MemoryPoolMXBean.getType()Returns the memory pool's type.getUsage()Returns the current memory usage of this memory pool as estimated by the virtual machine.longReturns this memory pool's usage threshold.longReturns the number of times that the memory usage for this memory pool has grown to exceed the current usage threshold.booleanReturns a boolean indication of whether or not this memory pool hit or exceeded the current value of the collection usage threshold after the latest garbage collection run.booleanReturns a boolean indication of whether or not this memory pool supports a collection usage threshold.booleanReturns a boolean indication of whether or not this memory pool has hit or has exceeded the current value of the usage threshold.booleanReturns a boolean indication of whether or not this memory pool supports a usage threshold.booleanisValid()Returns a boolean indication of whether or not this memory pool may still be considered valid.voidUpdates this memory pool's memory usage peak value to be whatever the value of the current memory usage is.voidsetCollectionUsageThreshold(long threshold) Updates this memory pool to have a new value for its collection usage threshold.voidsetUsageThreshold(long threshold) Updates this memory pool to have a new value for its usage threshold.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface MemoryPoolMXBean
getPreCollectionUsageMethods declared in interface MemoryPoolMXBean
getCollectionUsage, getCollectionUsageThreshold, getCollectionUsageThresholdCount, getMemoryManagerNames, getName, getPeakUsage, getType, getUsage, getUsageThreshold, getUsageThresholdCount, isCollectionUsageThresholdExceeded, isCollectionUsageThresholdSupported, isUsageThresholdExceeded, isUsageThresholdSupported, isValid, resetPeakUsage, setCollectionUsageThreshold, setUsageThresholdMethods declared in interface PlatformManagedObject
getObjectName 
- 
Method Details
- 
getCollectionUsage
If supported by the virtual machine, returns aMemoryUsagewhich encapsulates this memory pool's memory usage after the most recent run of the garbage collector. No garbage collection will be actually occur as a result of this method getting called.- Specified by:
 getCollectionUsagein interfaceMemoryPoolMXBean- Returns:
 - a 
MemoryUsageobject that may be interrogated by the caller to determine the details of the memory usage. Returnsnullif the virtual machine does not support this method. 
 - 
getPreCollectionUsage
To satisfy com.ibm.lang.management.MemoryPoolMXBean.- Returns:
 - a 
MemoryUsagecontaining the usage details for the memory pool just before the most recent collection occurred. Returnsnullif the virtual machine does not support this method. 
 - 
getCollectionUsageThreshold
public long getCollectionUsageThreshold()Returns this memory pool's collection usage threshold.- Specified by:
 getCollectionUsageThresholdin interfaceMemoryPoolMXBean- Returns:
 - the collection usage threshold in bytes. The default value as set by the virtual machine will be zero.
 - See Also:
 
 - 
getCollectionUsageThresholdCount
public long getCollectionUsageThresholdCount()Returns the number of times that the memory usage for this memory pool has grown to exceed the collection usage threshold.- Specified by:
 getCollectionUsageThresholdCountin interfaceMemoryPoolMXBean- Returns:
 - a count of the number of times that the collection usage threshold has been surpassed.
 - See Also:
 
 - 
getMemoryManagerNames
Returns a string array containing the unique names of each memory manager that manages this memory pool. A memory pool will always have at least one memory manager associated with it.- Specified by:
 getMemoryManagerNamesin interfaceMemoryPoolMXBean- Returns:
 - the names of all the memory managers for this memory pool.
 
 - 
getName
Returns the name of this memory pool.- Specified by:
 getNamein interfaceMemoryPoolMXBean- Returns:
 - the name of this memory pool.
 
 - 
getPeakUsage
Returns information on the peak usage of the memory pool. The scope of this covers all elapsed time since either the start of the virtual machine or the peak usage was reset.- Specified by:
 getPeakUsagein interfaceMemoryPoolMXBean- Returns:
 - a 
MemoryUsagewhich can be interrogated by the caller to determine details of the peak memory usage. Anullvalue will be returned if the memory pool no longer exists (and the pool is therefore considered to be invalid). - See Also:
 
 - 
getType
Returns the memory pool's type.- Specified by:
 getTypein interfaceMemoryPoolMXBean- Returns:
 - a 
MemoryTypevalue indicating the type of the memory pool (heap or non-heap). 
 - 
getUsage
Returns the current memory usage of this memory pool as estimated by the virtual machine.- Specified by:
 getUsagein interfaceMemoryPoolMXBean- Returns:
 - an instance of 
MemoryUsagethat can be interrogated by the caller to determine details on the pool's current memory usage. Anullvalue will be returned if the memory pool no longer exists (in which case it is considered to be invalid). - See Also:
 
 - 
getUsageThreshold
public long getUsageThreshold()Returns this memory pool's usage threshold.- Specified by:
 getUsageThresholdin interfaceMemoryPoolMXBean- Returns:
 - the usage threshold in bytes. The default value as set by the virtual machine depends on the platform the virtual machine is running on. will be zero.
 - See Also:
 
 - 
getUsageThresholdCount
public long getUsageThresholdCount()Returns the number of times that the memory usage for this memory pool has grown to exceed the current usage threshold.- Specified by:
 getUsageThresholdCountin interfaceMemoryPoolMXBean- Returns:
 - a count of the number of times that the usage threshold has been surpassed.
 - See Also:
 
 - 
isCollectionUsageThresholdExceeded
public boolean isCollectionUsageThresholdExceeded()Returns a boolean indication of whether or not this memory pool hit or exceeded the current value of the collection usage threshold after the latest garbage collection run.- Specified by:
 isCollectionUsageThresholdExceededin interfaceMemoryPoolMXBean- Returns:
 trueif the collection usage threshold was surpassed after the latest garbage collection run, otherwisefalse.- See Also:
 
 - 
isCollectionUsageThresholdSupported
public boolean isCollectionUsageThresholdSupported()Returns a boolean indication of whether or not this memory pool supports a collection usage threshold.- Specified by:
 isCollectionUsageThresholdSupportedin interfaceMemoryPoolMXBean- Returns:
 trueif supported,falseotherwise.
 - 
isUsageThresholdExceeded
public boolean isUsageThresholdExceeded()Returns a boolean indication of whether or not this memory pool has hit or has exceeded the current value of the usage threshold.- Specified by:
 isUsageThresholdExceededin interfaceMemoryPoolMXBean- Returns:
 trueif the usage threshold has been surpassed, otherwisefalse.- See Also:
 
 - 
isUsageThresholdSupported
public boolean isUsageThresholdSupported()Returns a boolean indication of whether or not this memory pool supports a usage threshold.- Specified by:
 isUsageThresholdSupportedin interfaceMemoryPoolMXBean- Returns:
 trueif supported,falseotherwise.
 - 
isValid
public boolean isValid()Returns a boolean indication of whether or not this memory pool may still be considered valid. A memory pool becomes invalid once it has been removed by the virtual machine.- Specified by:
 isValidin interfaceMemoryPoolMXBean- Returns:
 trueif the memory pool has not been removed by the virtual machine,falseotherwise.
 - 
resetPeakUsage
public void resetPeakUsage()Updates this memory pool's memory usage peak value to be whatever the value of the current memory usage is.- Specified by:
 resetPeakUsagein interfaceMemoryPoolMXBean
 - 
setCollectionUsageThreshold
public void setCollectionUsageThreshold(long threshold) Updates this memory pool to have a new value for its collection usage threshold. Only values of zero or greater should be supplied. A zero value effectively turns off any further checking of collection memory usage by the virtual machine. A value greater than zero establishes the new threshold which the virtual machine will check against after each run of the garbage collector in the memory pool.- Specified by:
 setCollectionUsageThresholdin interfaceMemoryPoolMXBean- Parameters:
 threshold- the size of the new collection usage threshold expressed in bytes.
 - 
setUsageThreshold
public void setUsageThreshold(long threshold) Updates this memory pool to have a new value for its usage threshold. Only values of zero or greater should be supplied. A zero value effectively turns off any further checking of memory usage by the virtual machine. A value greater than zero establishes the new threshold which the virtual machine will check against.- Specified by:
 setUsageThresholdin interfaceMemoryPoolMXBean- Parameters:
 threshold- the size of the new usage threshold expressed in bytes.
 - 
getObjectName
Returns anObjectNameinstance representing the object name of this platform managed object.- Specified by:
 getObjectNamein interfacePlatformManagedObject- Returns:
 - an 
ObjectNameinstance representing the object name of this platform managed object. 
 
 -