This class is not part of the public API.

Class: sun.management.MemoryPoolImpl

Implementation class for a memory pool. Standard and committed hotspot-specific metrics if any. ManagementFactory.getMemoryPoolMXBeans() returns a list of instances of this class.

Inheritance

Superclass tree: Implements:

Methods

  • MemoryPoolImpltop

    MemoryPoolImpl(String name, boolean isHeap, long usageThreshold, long gcThreshold)
    Google Code Search
    Stack Overflow
  • getCollectionUsagetop

    public MemoryUsage getCollectionUsage()
    Returns the memory usage after the Java virtual machine most recently expended effort in recycling unused objects in this memory pool. This method does not request the Java virtual machine to perform any garbage collection other than its normal automatic memory management. This method returns null if the Java virtual machine does not support this method.

    MBeanServer access:
    The mapped type of MemoryUsage is CompositeData with attributes as specified in MemoryUsage.

    Return:
    @return a java.lang.management.MemoryUsage representing the memory usage of this memory pool after the Java virtual machine most recently expended effort in recycling unused objects; null if this method is not supported.
    Google Code Search
    Stack Overflow
  • getCollectionUsage0top

    native private MemoryUsage getCollectionUsage0()
    Google Code Search
    Stack Overflow
  • getCollectionUsageThresholdtop

    public synchronized long getCollectionUsageThreshold()
    Returns the collection usage threshold value of this memory pool in bytes. The default value is zero. The collection usage threshold can be changed via the setCollectionUsageThreshold method.
    Return:
    @return the collection usage threshold of this memory pool in bytes.
    Google Code Search
    Stack Overflow
  • getCollectionUsageThresholdCounttop

    public long getCollectionUsageThresholdCount()
    Returns the number of times that the Java virtual machine has detected that the memory usage has reached or exceeded the collection usage threshold.
    Return:
    @return the number of times that the memory usage has reached or exceeded the collection usage threshold.
    Google Code Search
    Stack Overflow
  • getMemoryManagerNamestop

    public String[] getMemoryManagerNames()
    Returns the name of memory managers that manages this memory pool. Each memory pool will be managed by at least one memory manager.
    Return:
    @return an array of String objects, each is the name of a memory manager managing this memory pool.
    Google Code Search
    Stack Overflow
  • getMemoryManagerstop

    synchronized private MemoryManagerMXBean[] getMemoryManagers()
    Google Code Search
    Stack Overflow
  • getMemoryManagers0top

    native private MemoryManagerMXBean[] getMemoryManagers0()
    Google Code Search
    Stack Overflow
  • getNametop

    public String getName()
    Returns the name representing this memory pool.
    Return:
    @return the name of this memory pool.
    Specified by:
    getName from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • getPeakUsagetop

    public synchronized MemoryUsage getPeakUsage()
    Returns the peak memory usage of this memory pool since the Java virtual machine was started or since the peak was reset. This method returns null if this memory pool is not valid (i.e. no longer exists).

    MBeanServer access:
    The mapped type of MemoryUsage is CompositeData with attributes as specified in MemoryUsage.

    Return:
    @return a java.lang.management.MemoryUsage object representing the peak memory usage; or null if this pool is not valid.
    Specified by:
    getPeakUsage from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • getPeakUsage0top

    native private MemoryUsage getPeakUsage0()
    Google Code Search
    Stack Overflow
  • getTypetop

    public MemoryType getType()
    Returns the type of this memory pool.

    MBeanServer access:
    The mapped type of MemoryType is String and the value is the name of the MemoryType.

    Return:
    @return the type of this memory pool.
    Specified by:
    getType from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • getUsagetop

    public MemoryUsage getUsage()
    Returns an estimate of the memory usage of this memory pool. This method returns null if this memory pool is not valid (i.e. no longer exists).

    This method requests the Java virtual machine to make a best-effort estimate of the current memory usage of this memory pool. For some memory pools, this method may be an expensive operation that requires some computation to determine the estimate. An implementation should document when this is the case.

    This method is designed for use in monitoring system memory usage and detecting low memory condition.

    MBeanServer access:
    The mapped type of MemoryUsage is CompositeData with attributes as specified in MemoryUsage.

    Return:
    @return a java.lang.management.MemoryUsage object; or null if this pool not valid.
    Specified by:
    getUsage from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • getUsage0top

    native private MemoryUsage getUsage0()
    Google Code Search
    Stack Overflow
  • getUsageThresholdtop

    public synchronized long getUsageThreshold()
    Returns the usage threshold value of this memory pool in bytes. Each memory pool has a platform-dependent default threshold value. The current usage threshold can be changed via the setUsageThreshold method.
    Return:
    @return the usage threshold value of this memory pool in bytes.
    Specified by:
    getUsageThreshold from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • getUsageThresholdCounttop

    public long getUsageThresholdCount()
    Returns the number of times that the memory usage has crossed the usage threshold.
    Return:
    @return the number of times that the memory usage has crossed its usage threshold value.
    Google Code Search
    Stack Overflow
  • isCollectionUsageThresholdExceededtop

    public boolean isCollectionUsageThresholdExceeded()
    Tests if the memory usage of this memory pool after the most recent collection on which the Java virtual machine has expended effort has reached or exceeded its collection usage threshold. This method does not request the Java virtual machine to perform any garbage collection other than its normal automatic memory management.
    Return:
    @return true if the memory usage of this memory pool reaches or exceeds the collection usage threshold value in the most recent collection; false otherwise.
    Google Code Search
    Stack Overflow
  • isCollectionUsageThresholdSupportedtop

    public boolean isCollectionUsageThresholdSupported()
    Tests if this memory pool supports a collection usage threshold.
    Return:
    @return true if this memory pool supports the collection usage threshold; false otherwise.
    Google Code Search
    Stack Overflow
  • isUsageThresholdExceededtop

    public boolean isUsageThresholdExceeded()
    Tests if the memory usage of this memory pool reaches or exceeds its usage threshold value.
    Return:
    @return true if the memory usage of this memory pool reaches or exceeds the threshold value; false otherwise.
    Google Code Search
    Stack Overflow
  • isUsageThresholdSupportedtop

    public boolean isUsageThresholdSupported()
    Tests if this memory pool supports usage threshold.
    Return:
    @return true if this memory pool supports usage threshold; false otherwise.
    Google Code Search
    Stack Overflow
  • isValidtop

    public boolean isValid()
    Tests if this memory pool is valid in the Java virtual machine. A memory pool becomes invalid once the Java virtual machine removes it from the memory system.
    Return:
    @return true if the memory pool is valid in the running Java virtual machine; false otherwise.
    Specified by:
    isValid from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • resetPeakUsagetop

    public void resetPeakUsage()
    Resets the peak memory usage statistic of this memory pool to the current memory usage.
    Specified by:
    resetPeakUsage from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • resetPeakUsage0top

    native private void resetPeakUsage0()
    Google Code Search
    Stack Overflow
  • setCollectionThreshold0top

    native private void setCollectionThreshold0(long current, long newThreshold)
    Google Code Search
    Stack Overflow
  • setCollectionUsageThresholdtop

    public void setCollectionUsageThreshold(long newThreshold)
    Sets the collection usage threshold of this memory pool to the given threshold value. When this threshold is set to positive, the Java virtual machine will check the memory usage at its best appropriate time after it has expended effort in recycling unused objects in this memory pool.

    The collection usage threshold crossing checking is enabled in this memory pool if the threshold is set to a positive value. The collection usage threshold crossing checking is disabled if it is set to zero.

    Google Code Search
    Stack Overflow
  • setPoolCollectionSensortop

    native private void setPoolCollectionSensor(Sensor s)
    Google Code Search
    Stack Overflow
  • setPoolUsageSensortop

    native private void setPoolUsageSensor(Sensor s)
    Google Code Search
    Stack Overflow
  • setUsageThresholdtop

    public void setUsageThreshold(long newThreshold)
    Sets the threshold of this memory pool to the given threshold value if this memory pool supports the usage threshold. The usage threshold crossing checking is enabled in this memory pool if the threshold is set to a positive value. The usage threshold crossing checking is disabled if it is set to zero.
    Specified by:
    setUsageThreshold from MemoryPoolMXBean
    Google Code Search
    Stack Overflow
  • setUsageThreshold0top

    native private void setUsageThreshold0(long current, long newThreshold)
    Google Code Search
    Stack Overflow

Fields

  • collectionThreshold

    private long collectionThreshold
  • collectionThresholdSupported

    final private boolean collectionThresholdSupported
  • gcSensor

    private Sensor gcSensor
  • gcSensorRegistered

    private boolean gcSensorRegistered
  • isHeap

    final private boolean isHeap
  • isValid

    final private boolean isValid
  • managers

    private MemoryManagerMXBean[] managers
  • name

    final private String name
  • usageSensor

    private Sensor usageSensor
  • usageSensorRegistered

    private boolean usageSensorRegistered
  • usageThreshold

    private long usageThreshold
  • usageThresholdSupported

    final private boolean usageThresholdSupported