|
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.Object com.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 CompositeData
public boolean containsValue(Object value)
containsValue
in interface CompositeData
public boolean equals(Object obj)
equals
in interface CompositeData
equals
in class Object
public Object get(String key)
get
in interface CompositeData
public Object[] getAll(String[] keys)
getAll
in interface CompositeData
public CompositeType getCompositeType()
getCompositeType
in interface CompositeData
public int hashCode()
hashCode
in interface CompositeData
hashCode
in class Object
public String toString()
toString
in interface CompositeData
toString
in class Object
public Collection values()
values
in interface CompositeData
public 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 CompositeDataView
ct
- 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 |