KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > management > CompilationMXBean


1 /*
2  * @(#)CompilationMXBean.java 1.10 04/04/20
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.lang.management;
9
10 /**
11  * The management interface for the compilation system of
12  * the Java virtual machine.
13  *
14  * <p> A Java virtual machine has a single instance of the implementation
15  * class of this interface. This instance implementing this interface is
16  * an <a HREF="ManagementFactory.html#MXBean">MXBean</a>
17  * that can be obtained by calling
18  * the {@link ManagementFactory#getCompilationMXBean} method or
19  * from the {@link ManagementFactory#getPlatformMBeanServer
20  * platform <tt>MBeanServer</tt>} method.
21  *
22  * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
23  * the compilation system within an MBeanServer is:
24  * <blockquote>
25  * {@link ManagementFactory#COMPILATION_MXBEAN_NAME
26  * <tt>java.lang:type=Compilation</tt>}
27  * </blockquote>
28  *
29  * @see <a HREF="../../../javax/management/package-summary.html">
30  * JMX Specification.</a>
31  * @see <a HREF="package-summary.html#examples">
32  * Ways to Access MXBeans</a>
33  *
34  * @author Mandy Chung
35  * @version 1.10, 04/20/04
36  * @since 1.5
37  */

38 public interface CompilationMXBean {
39     /**
40      * Returns the name of the Just-in-time (JIT) compiler.
41      *
42      * @return the name of the JIT compiler.
43      */

44     public java.lang.String JavaDoc getName();
45     
46     /**
47      * Tests if the Java virtual machine supports the monitoring of
48      * compilation time.
49      *
50      * @return <tt>true</tt> if the monitoring of compilation time is
51      * supported ; <tt>false</tt> otherwise.
52      */

53     public boolean isCompilationTimeMonitoringSupported();
54
55     /**
56      * Returns the approximate accumlated elapsed time (in milliseconds)
57      * spent in compilation.
58      * If multiple threads are used for compilation, this value is
59      * summation of the approximate time that each thread spent in compilation.
60      *
61      * <p>This method is optionally supported by the platform.
62      * A Java virtual machine implementation may not support the compilation
63      * time monitoring. The {@link #isCompilationTimeMonitoringSupported}
64      * method can be used to determine if the Java virtual machine
65      * supports this operation.
66      *
67      * <p> This value does not indicate the level of performance of
68      * the Java virtual machine and is not intended for performance comparisons
69      * of different virtual machine implementations.
70      * The implementations may have different definitions and different
71      * measurements of the compilation time.
72      *
73      * @return Compilation time in milliseconds
74      * @throws java.lang.UnsupportedOperationException if the Java
75      * virtual machine does not support
76      * this operation.
77      *
78      */

79     public long getTotalCompilationTime();
80 }
81
82
Popular Tags