com.jrockit.memleak.value
Class HeapInfo
java.lang.Object
com.jrockit.memleak.value.HeapInfo
- All Implemented Interfaces:
- IHeapInfo
- Direct Known Subclasses:
- HeapHistogram, JoinedTypeHeapInfo, TypeHeapInfo
public abstract class HeapInfo
- extends java.lang.Object
- implements IHeapInfo
Represents heap usage for a single type, including growth rate. This only
includes memory used by the instances themselves. That is, objects referenced
by instance fields are not included, nor are class objects and static fields.
Constructor Summary |
protected |
HeapInfo(int numInstances,
long size,
float growthRate,
long creationMillis)
Full state constructor. |
|
HeapInfo(long creationMillis)
Minimal constructor for aggregating subclasses. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
numInstances
protected int numInstances
size
protected long size
growthRate
protected float growthRate
HeapInfo
protected HeapInfo(int numInstances,
long size,
float growthRate,
long creationMillis)
- Full state constructor.
- Parameters:
numInstances
- the total number of instances of this typesize
- the total amount of heap memory used by all instances of this
type, in bytesgrowthRate
- the rate at which heap usage of this type increases, in bytes
per secondcreationMillis
- timestamp for when this IHeapInfo
was calculated
HeapInfo
public HeapInfo(long creationMillis)
- Minimal constructor for aggregating subclasses.
- Parameters:
creationMillis
- timestamp for when this IHeapInfo
was calculated
getGrowthRate
public float getGrowthRate()
- Specified by:
getGrowthRate
in interface IHeapInfo
- Returns:
- the growth rate in bytes per second.
getNumberOfInstances
public int getNumberOfInstances()
- Specified by:
getNumberOfInstances
in interface IHeapInfo
- Returns:
- the number of live instances that this
IHeapInfo
represents.
getSizeOfInstances
public long getSizeOfInstances()
- Specified by:
getSizeOfInstances
in interface IHeapInfo
- Returns:
- the total size in bytes that this
IHeapInfo
represents.
getTime
public long getTime()
- Specified by:
getTime
in interface IHeapInfo
- Returns:
- the timestamp in milliseconds for when this
IHeapInfo
was
created.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public abstract int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
equals
protected boolean equals(HeapInfo other)
- Parameters:
other
- an HeapInfo
- Returns:
- true iff
other
represent a HeapInfo
with the
same growth rate, number of instances and size of instances. - See Also:
Object.equals(Object)
Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.