public class GcEvent extends Object
| Modifier and Type | Field and Description |
|---|---|
static Comparator<GcEvent> |
REVERSE_TIME_ORDER
Order events from newest to oldest.
|
static Comparator<GcEvent> |
TIME_ORDER
Order events from oldest to newest.
|
| Constructor and Description |
|---|
GcEvent(com.sun.management.GarbageCollectionNotificationInfo info,
long startTime)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
com.sun.management.GarbageCollectionNotificationInfo |
getInfo()
Info object from the
GarbageCollectorMXBean notification
emitter. |
String |
getName()
Name of the collector for the event.
|
long |
getStartTime()
Start time in milliseconds since the epoch.
|
GcType |
getType()
Type of GC event that occurred.
|
String |
toString() |
public static final Comparator<GcEvent> TIME_ORDER
public static final Comparator<GcEvent> REVERSE_TIME_ORDER
public GcEvent(com.sun.management.GarbageCollectionNotificationInfo info,
long startTime)
info - The info object from the notification emitter on the
GarbageCollectorMXBean.startTime - Start time in milliseconds since the epoch. Note the info object has a start time relative
to the time the jvm process was started.public GcType getType()
public String getName()
public long getStartTime()
public com.sun.management.GarbageCollectionNotificationInfo getInfo()
GarbageCollectorMXBean notification
emitter.