|
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.
CompositeData
with attributes as specified in the from method.
| Method Summary | |
|---|---|
boolean |
containsKey(java.lang.String key)
|
boolean |
containsValue(java.lang.Object value)
|
boolean |
equals(java.lang.Object obj)
|
static GcInfo |
from(javax.management.openmbean.CompositeData cd)
Returns a GcInfo object represented by the given CompositeData. |
java.lang.Object |
get(java.lang.String key)
|
java.lang.Object[] |
getAll(java.lang.String[] keys)
|
javax.management.openmbean.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. |
java.util.Map<java.lang.String,java.lang.management.MemoryUsage> |
getMemoryUsageAfterGc()
Returns the memory usage of all memory pools at the end of this GC. |
java.util.Map<java.lang.String,java.lang.management.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()
|
java.lang.String |
toString()
|
java.util.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 java.util.Map<java.lang.String,java.lang.management.MemoryUsage> getMemoryUsageBeforeGc()
public java.util.Map<java.lang.String,java.lang.management.MemoryUsage> getMemoryUsageAfterGc()
public static GcInfo from(javax.management.openmbean.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
java.lang.IllegalArgumentException - if cd does not
represent a GcInfo object with the attributes
described above.public boolean containsKey(java.lang.String key)
containsKey in interface javax.management.openmbean.CompositeDatapublic boolean containsValue(java.lang.Object value)
containsValue in interface javax.management.openmbean.CompositeDatapublic boolean equals(java.lang.Object obj)
equals in interface javax.management.openmbean.CompositeDataequals in class java.lang.Objectpublic java.lang.Object get(java.lang.String key)
get in interface javax.management.openmbean.CompositeDatapublic java.lang.Object[] getAll(java.lang.String[] keys)
getAll in interface javax.management.openmbean.CompositeDatapublic javax.management.openmbean.CompositeType getCompositeType()
getCompositeType in interface javax.management.openmbean.CompositeDatapublic int hashCode()
hashCode in interface javax.management.openmbean.CompositeDatahashCode in class java.lang.Objectpublic java.lang.String toString()
toString in interface javax.management.openmbean.CompositeDatatoString in class java.lang.Objectpublic java.util.Collection values()
values in interface javax.management.openmbean.CompositeData
|
Monitoring and Management Interface for the Java Platform | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||