com.ibm.lang.management

Class MemoryPoolMXBeanImpl

  1. java.lang.Object
  2. extended bycom.ibm.lang.management.DynamicMXBeanImpl
  3. extended bycom.ibm.lang.management.MemoryPoolMXBeanImpl
All implemented interfaces:
java.lang.management.MemoryPoolMXBean, javax.management.DynamicMBean

  1. public final class MemoryPoolMXBeanImpl
  2. extends DynamicMXBeanImpl
  3. implements MemoryPoolMXBean
Runtime type for MemoryPoolMXBean
Since:
1.5

Field Summary

Fields inherited from class com.ibm.lang.management.DynamicMXBeanImpl
info

Method Summary

Modifier and Type Method and Description
  1. java.lang.management.MemoryUsage
getCollectionUsage()
  1. long
getCollectionUsageThreshold()
  1. long
getCollectionUsageThresholdCount()
  1. java.lang.String[]
getMemoryManagerNames()
  1. java.lang.String
getName()
  1. java.lang.management.MemoryUsage
getPeakUsage()
  1. java.lang.management.MemoryUsage
getPreCollectionUsage()
  1. java.lang.management.MemoryType
getType()
  1. java.lang.management.MemoryUsage
getUsage()
  1. long
getUsageThreshold()
  1. long
getUsageThresholdCount()
  1. boolean
isCollectionUsageThresholdExceeded()
  1. boolean
isCollectionUsageThresholdSupported()
  1. boolean
isUsageThresholdExceeded()
  1. boolean
isUsageThresholdSupported()
  1. boolean
isValid()
  1. void
resetPeakUsage()
  1. void
setCollectionUsageThreshold(long threshold)
  1. void
setUsageThreshold(long threshold)
Methods inherited from class com.ibm.lang.management.DynamicMXBeanImpl
getAttribute, getAttributes, getMBeanInfo, getPresentAttribute, getPresentOperation, initMBeanInfo, invoke, setAttribute, setAttributes, setMBeanInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getCollectionUsage

  1. public java.lang.management.MemoryUsage getCollectionUsage( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

If supported by the virtual machine, returns a MemoryUsagewhich 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:
getCollectionUsage in interface java.lang.management.MemoryPoolMXBean
Returns:
a MemoryUsageobject that may be interrogated by the caller to determine the details of the memory usage. Returns null if the virtual machine does not support this method.

getPreCollectionUsage

  1. public java.lang.management.MemoryUsage getPreCollectionUsage( )

Description copied from interface: MemoryPoolMXBean

If supported by the virtual machine, returns a MemoryUsagewhich 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.

MBeanServer access:

The return value will be mapped to a CompositeData with attributes as specified in MemoryUsage.
Returns:
a MemoryUsage containing the usage details for the memory pool just before the most recent collection occurred.

getCollectionUsageThreshold

  1. public long getCollectionUsageThreshold( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns this memory pool's collection usage threshold.
Specified by:
getCollectionUsageThreshold in interface java.lang.management.MemoryPoolMXBean
Returns:
the collection usage threshold in bytes. The default value as set by the virtual machine will be zero.
See Also:
MemoryPoolMXBean.isCollectionUsageThresholdSupported()

getCollectionUsageThresholdCount

  1. public long getCollectionUsageThresholdCount( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns the number of times that the memory usage for this memory pool has grown to exceed the collection usage threshold.
Specified by:
getCollectionUsageThresholdCount in interface java.lang.management.MemoryPoolMXBean
Returns:
a count of the number of times that the collection usage threshold has been surpassed.
See Also:
MemoryPoolMXBean.isCollectionUsageThresholdSupported()

getMemoryManagerNames

  1. public java.lang.String[] getMemoryManagerNames( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
getMemoryManagerNames in interface java.lang.management.MemoryPoolMXBean
Returns:
the names of all the memory managers for this memory pool.

getName

  1. public java.lang.String getName( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns the name of this memory pool.
Specified by:
getName in interface java.lang.management.MemoryPoolMXBean
Returns:
the name of this memory pool.

getPeakUsage

  1. public java.lang.management.MemoryUsage getPeakUsage( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
getPeakUsage in interface java.lang.management.MemoryPoolMXBean
Returns:
a MemoryUsagewhich can be interrogated by the caller to determine details of the peak memory usage. A null value will be returned if the memory pool no longer exists (and the pool is therefore considered to be invalid).
See Also:
MemoryPoolMXBean.resetPeakUsage(), MemoryPoolMXBean.isValid()

getType

  1. public java.lang.management.MemoryType getType( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns the memory pool's type.
Specified by:
getType in interface java.lang.management.MemoryPoolMXBean
Returns:
a MemoryTypevalue indicating the type of the memory pool (heap or non-heap).

getUsage

  1. public java.lang.management.MemoryUsage getUsage( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns the current memory usage of this memory pool as estimated by the virtual machine.
Specified by:
getUsage in interface java.lang.management.MemoryPoolMXBean
Returns:
an instance of MemoryUsagethat can be interrogated by the caller to determine details on the pool's current memory usage. A null value will be returned if the memory pool no longer exists (in which case it is considered to be invalid).
See Also:
MemoryPoolMXBean.isValid()

getUsageThreshold

  1. public long getUsageThreshold()

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns this memory pool's usage threshold.
Specified by:
getUsageThreshold in interface java.lang.management.MemoryPoolMXBean
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:
MemoryPoolMXBean.isUsageThresholdSupported(), MemoryPoolMXBean.setUsageThreshold(long)

getUsageThresholdCount

  1. public long getUsageThresholdCount( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns the number of times that the memory usage for this memory pool has grown to exceed the current usage threshold.
Specified by:
getUsageThresholdCount in interface java.lang.management.MemoryPoolMXBean
Returns:
a count of the number of times that the usage threshold has been surpassed.
See Also:
MemoryPoolMXBean.isUsageThresholdSupported()

isCollectionUsageThresholdExceeded

  1. public boolean isCollectionUsageThresholdExceeded( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
isCollectionUsageThresholdExceeded in interface java.lang.management.MemoryPoolMXBean
Returns:
true if the collection usage threshold was surpassed after the latest garbage collection run, otherwise false.
See Also:
MemoryPoolMXBean.isCollectionUsageThresholdSupported()

isCollectionUsageThresholdSupported

  1. public boolean isCollectionUsageThresholdSupported( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns a boolean indication of whether or not this memory pool supports a collection usage threshold.
Specified by:
isCollectionUsageThresholdSupported in interface java.lang.management.MemoryPoolMXBean
Returns:
true if supported, false otherwise.

isUsageThresholdExceeded

  1. public boolean isUsageThresholdExceeded( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
isUsageThresholdExceeded in interface java.lang.management.MemoryPoolMXBean
Returns:
true if the usage threshold has been surpassed, otherwise false.
See Also:
MemoryPoolMXBean.isUsageThresholdSupported()

isUsageThresholdSupported

  1. public boolean isUsageThresholdSupported( )

Description copied from interface: java.lang.management.MemoryPoolMXBean

Returns a boolean indication of whether or not this memory pool supports a usage threshold.
Specified by:
isUsageThresholdSupported in interface java.lang.management.MemoryPoolMXBean
Returns:
true if supported, false otherwise.

isValid

  1. public boolean isValid()

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
isValid in interface java.lang.management.MemoryPoolMXBean
Returns:
true if the memory pool has not been removed by the virtual machine, false otherwise.

resetPeakUsage

  1. public void resetPeakUsage()

Description copied from interface: java.lang.management.MemoryPoolMXBean

Updates this memory pool's memory usage peak value to be whatever the value of the current memory usage is.
Specified by:
resetPeakUsage in interface java.lang.management.MemoryPoolMXBean
See Also:
ManagementPermission

setCollectionUsageThreshold

  1. public void setCollectionUsageThreshold( long threshold)

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
setCollectionUsageThreshold in interface java.lang.management.MemoryPoolMXBean
Parameters:
threshold - the size of the new collection usage threshold expressed in bytes.

setUsageThreshold

  1. public void setUsageThreshold(long threshold)

Description copied from interface: java.lang.management.MemoryPoolMXBean

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:
setUsageThreshold in interface java.lang.management.MemoryPoolMXBean
Parameters:
threshold - the size of the new usage threshold expressed in bytes.