Class ClassLoaderHistogramRecord

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    XClassLoaderHistogramRecord

    public class ClassLoaderHistogramRecord
    extends HistogramRecord
    This class holds the histogram data on the objects found in the object set for which a histogram was computed (aggregated per class loader).
    See Also:
    Serialized Form
    • Constructor Detail

      • ClassLoaderHistogramRecord

        public ClassLoaderHistogramRecord​(java.lang.String label,
                                          int classLoaderId,
                                          java.util.ArrayList<ClassHistogramRecord> classHistogramRecords,
                                          long numberOfObjects,
                                          long usedHeapSize,
                                          long retainedHeapSize)
        Details of a class loader
        Parameters:
        label - the name of the loader
        classLoaderId - the id of the class loader object
        classHistogramRecords - the histogram details of all the classes loaded by this loader
        numberOfObjects -
        usedHeapSize -
        retainedHeapSize -
    • Method Detail

      • getClassLoaderId

        public int getClassLoaderId()
        Get id of the class loader this class loader histogram record stands for.
        Returns:
        id of the class loader this class loader histogram record stands for
      • getClassHistogramRecords

        public java.util.Collection<ClassHistogramRecord> getClassHistogramRecords()
        Get collection of the class histogram records this class loader histogram record stands for.
        Returns:
        collection of the class histogram records this class loader histogram record stands for
      • getObjectIds

        public int[] getObjectIds()
                           throws SnapshotException
        Get ids of the objects this class loader histogram record stands for.
        Returns:
        ids of the objects this class loader histogram record stands for
        Throws:
        SnapshotException
      • calculateRetainedSize

        public long calculateRetainedSize​(ISnapshot snapshot,
                                          boolean calculateIfNotAvailable,
                                          boolean approximation,
                                          IProgressListener listener)
                                   throws SnapshotException
        Find out the retained size
        Parameters:
        snapshot - the snapshot
        calculateIfNotAvailable - whether to calculate the size if not already available
        approximation - whether to use an approximation to the retained size (sum of the individual retained sizes)
        listener - to report progress and errors
        Returns:
        the retained size, negated if approximate, and 0 if unavailable
        Throws:
        SnapshotException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object