Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 305
نمايش فراداده

GarbageCollectorMXBeanjava.lang.management

Java 5.0

This MXBean interface allows monitoring of the number of garbage collections that have occurred and the approximate time they consumed in milliseconds. The methods return -1 to indicate that the garbage collector does not maintain those statistics. Note that VM implementations commonly have more than one garbage collector and use different collection strategies for new objects and old objects. Note also that this is a subinterface of MemoryManagerMXBean.

Figure 10-85. java.lang.management.GarbageCollectorMXBean

public interface

GarbageCollectorMXBean extends MemoryManagerMXBean { // Public Instance Methods long

getCollectionCount ( ); long

getCollectionTime ( ); }