Package org.eclipse.mat.snapshot
Class ClassLoaderHistogramRecord
java.lang.Object
org.eclipse.mat.snapshot.HistogramRecord
org.eclipse.mat.snapshot.ClassLoaderHistogramRecord
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XClassLoaderHistogramRecord
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:
-
Field Summary
Fields inherited from class org.eclipse.mat.snapshot.HistogramRecord
COMPARATOR_FOR_LABEL, COMPARATOR_FOR_NUMBEROFOBJECTS, COMPARATOR_FOR_RETAINEDHEAPSIZE, COMPARATOR_FOR_USEDHEAPSIZE
-
Constructor Summary
ConstructorDescriptionClassLoaderHistogramRecord
(String label, int classLoaderId, ArrayList<ClassHistogramRecord> classHistogramRecords, long numberOfObjects, long usedHeapSize, long retainedHeapSize) Details of a class loader -
Method Summary
Modifier and TypeMethodDescriptionlong
calculateRetainedSize
(ISnapshot snapshot, boolean calculateIfNotAvailable, boolean approximation, IProgressListener listener) Find out the retained sizeGet collection of the class histogram records this class loader histogram record stands for.int
Get id of the class loader this class loader histogram record stands for.int[]
Get ids of the objects this class loader histogram record stands for.toString()
Methods inherited from class org.eclipse.mat.snapshot.HistogramRecord
getLabel, getNumberOfObjects, getRetainedHeapSize, getUsedHeapSize, incNumberOfObjects, incNumberOfObjects, incRetainedHeapSize, incUsedHeapSize, reverseComparator, setLabel, setNumberOfObjects, setRetainedHeapSize, setUsedHeapSize
-
Constructor Details
-
ClassLoaderHistogramRecord
public ClassLoaderHistogramRecord(String label, int classLoaderId, ArrayList<ClassHistogramRecord> classHistogramRecords, long numberOfObjects, long usedHeapSize, long retainedHeapSize) Details of a class loader- Parameters:
label
- the name of the loaderclassLoaderId
- the id of the class loader objectclassHistogramRecords
- the histogram details of all the classes loaded by this loadernumberOfObjects
-usedHeapSize
-retainedHeapSize
-
-
-
Method Details
-
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
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
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 snapshotcalculateIfNotAvailable
- whether to calculate the size if not already availableapproximation
- 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
-