This class is not part of the public API.

Class: sun.management.GarbageCollectorImpl

Implementation class for the garbage collector. Standard and committed hotspot-specific metrics if any. ManagementFactory.getGarbageCollectorMXBeans() returns a list of instances of this class.

Inheritance

Superclass tree: Implements:

Methods

  • GarbageCollectorImpltop

    GarbageCollectorImpl(String name)
    Google Code Search
    Stack Overflow
  • getAllPoolNamestop

    synchronized String[] getAllPoolNames()
    Google Code Search
    Stack Overflow
  • getCollectionCounttop

    public native long getCollectionCount()
    Returns the total number of collections that have occurred. This method returns -1 if the collection count is undefined for this collector.
    Return:
    @return the total number of collections that have occurred.
    Google Code Search
    Stack Overflow
  • getCollectionTimetop

    public native long getCollectionTime()
    Returns the approximate accumulated collection elapsed time in milliseconds. This method returns -1 if the collection elapsed time is undefined for this collector.

    The Java virtual machine implementation may use a high resolution timer to measure the elapsed time. This method may return the same value even if the collection count has been incremented if the collection elapsed time is very short.

    Return:
    @return the approximate accumulated collection elapsed time in milliseconds.
    Google Code Search
    Stack Overflow
  • getLastGcInfotop

    public GcInfo getLastGcInfo()
    Returns the GC information about the most recent GC. This method returns a com.sun.management.GcInfo. If no GC information is available, null is returned. The collector-specific attributes, if any, can be obtained via the CompositeData interface.

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

    Return:
    @return a GcInfo object representing the most GC information; or null if no GC information available.
    Google Code Search
    Stack Overflow

Fields