平台特定的垃圾收集器管理接口,执行循环中的收集。
此平台扩展仅适用于支持此扩展的垃圾收集实现。
- 自 JDK 版本:
- 1.5
-
Method Summary
Methods declared in interface java.lang.management.GarbageCollectorMXBean
getCollectionCount, getCollectionTimeMethods declared in interface java.lang.management.MemoryManagerMXBean
getMemoryPoolNames, getName, isValidMethods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
Method Details
-
getLastGcInfo
GcInfo getLastGcInfo()返回关于最近一次 GC 的 GC 信息。此方法返回一个GcInfo。如果没有可用的 GC 信息,则返回null。如果有的话,可以通过CompositeData接口获取特定于收集器的属性。MBeanServer 访问:
GcInfo的映射类型是具有在GcInfo中指定的属性的CompositeData。- 返回:
-
代表最新 GC 信息的
GcInfo对象;如果没有可用的 GC 信息,则返回null。
-