|
Monitoring and Management Interface for the Java Platform | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.management.GcInfo
public class GcInfo
Garbage collection information. It contains the following information for one garbage collection as well as GC-specific attributes:
- Start time
- End time
- Duration
- Memory usage before the collection starts
- Memory usage after the collection ends
GcInfo is a CompositeData
The GC-specific attributes can be obtained via the CompositeData
interface. This is a historical relic, and other classes should
not copy this pattern. Use CompositeDataView instead.
CompositeData
with attributes as specified in the from method.
| Method Summary | |
|---|---|
boolean |
containsKey(String key)
|
boolean |
containsValue(Object value)
|
boolean |
equals(Object obj)
|
static GcInfo |
from(CompositeData cd)
Returns a GcInfo object represented by the given CompositeData. |
Object |
get(String key)
|
Object[] |
getAll(String[] keys)
|
CompositeType |
getCompositeType()
|
long |
getDuration()
Returns the elapsed time of this GC in milliseconds. |
long |
getEndTime()
Returns the end time of this GC in milliseconds since the Java virtual machine was started. |
long |
getId()
Returns the identifier of this garbage collection which is the number of collections that this collector has done. |
Map<String,MemoryUsage> |
getMemoryUsageAfterGc()
Returns the memory usage of all memory pools at the end of this GC. |
Map<String,MemoryUsage> |
getMemoryUsageBeforeGc()
Returns the memory usage of all memory pools at the beginning of this GC. |
long |
getStartTime()
Returns the start time of this GC in milliseconds since the Java virtual machine was started. |
int |
hashCode()
|
CompositeData |
toCompositeData(CompositeType ct)
Return the CompositeData representation of this
GcInfo, including any GC-specific attributes. |
String |
toString()
|
Collection |
values()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public long getId()
public long getStartTime()
public long getEndTime()
public long getDuration()
public Map<String,MemoryUsage> getMemoryUsageBeforeGc()
public Map<String,MemoryUsage> getMemoryUsageAfterGc()
public static GcInfo from(CompositeData cd)
Attribute Name Type index java.lang.Long startTime java.lang.Long endTime java.lang.Long memoryUsageBeforeGc javax.management.openmbean.TabularData memoryUsageAfterGc javax.management.openmbean.TabularData
IllegalArgumentException - if cd does not
represent a GcInfo object with the attributes
described above.public boolean containsKey(String key)
containsKey in interface CompositeDatapublic boolean containsValue(Object value)
containsValue in interface CompositeDatapublic boolean equals(Object obj)
equals in interface CompositeDataequals in class Objectpublic Object get(String key)
get in interface CompositeDatapublic Object[] getAll(String[] keys)
getAll in interface CompositeDatapublic CompositeType getCompositeType()
getCompositeType in interface CompositeDatapublic int hashCode()
hashCode in interface CompositeDatahashCode in class Objectpublic String toString()
toString in interface CompositeDatatoString in class Objectpublic Collection values()
values in interface CompositeDatapublic CompositeData toCompositeData(CompositeType ct)
Return the CompositeData representation of this
GcInfo, including any GC-specific attributes. The
returned value will have at least all the attributes described
in the from method, plus optionally
other attributes.
toCompositeData in interface CompositeDataViewct - the CompositeType that the caller expects.
This parameter is ignored and can be null.
CompositeData representation.
|
Monitoring and Management Interface for the Java Platform | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||