Interface CompilationMXBean

All Superinterfaces:
PlatformManagedObject

public interface CompilationMXBean extends PlatformManagedObject
The management and monitoring interface for the virtual machine's compilation functionality.

If the virtual machine has a compilation system enabled, precisely one instance of this interface will be made available to management clients. Otherwise, there will be no instances of this MXBean available.

Accessing this MXBean can be done in one of three ways.

  1. Invoking the static ManagementFactory.getCompilationMXBean() method.
  2. Using a javax.management.MBeanServerConnection.
  3. Obtaining a proxy MXBean from the static ManagementFactory.newPlatformMXBeanProxy(javax.management.MBeanServerConnection, java.lang.String, java.lang.Class<T>) method, passing in the string "java.lang:type=Compilation" for the value of the second parameter.
  • Method Details

    • getName

      String getName()
      Returns the name of the virtual machine's Just In Time (JIT) compiler.
      Returns:
      the name of the JIT compiler
    • getTotalCompilationTime

      long getTotalCompilationTime()
      If supported (see isCompilationTimeMonitoringSupported()), returns the total number of milliseconds spent by the virtual machine performing compilations. The figure is taken over the lifetime of the virtual machine.
      Returns:
      the compilation time in milliseconds
      Throws:
      UnsupportedOperationException - if the virtual machine does not support compilation monitoring. This can be tested by calling the isCompilationTimeMonitoringSupported() method.
    • isCompilationTimeMonitoringSupported

      boolean isCompilationTimeMonitoringSupported()
      A boolean indication of whether or not the virtual machine supports the timing of its compilation facilities.
      Returns:
      true if compilation timing is supported, otherwise false.