2
|
1 |
/*
|
|
2 |
* Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation. Sun designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Sun in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or
|
|
23 |
* have any questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
package java.lang.management;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* The management interface for the compilation system of
|
|
30 |
* the Java virtual machine.
|
|
31 |
*
|
|
32 |
* <p> A Java virtual machine has a single instance of the implementation
|
|
33 |
* class of this interface. This instance implementing this interface is
|
|
34 |
* an <a href="ManagementFactory.html#MXBean">MXBean</a>
|
|
35 |
* that can be obtained by calling
|
|
36 |
* the {@link ManagementFactory#getCompilationMXBean} method or
|
|
37 |
* from the {@link ManagementFactory#getPlatformMBeanServer
|
|
38 |
* platform <tt>MBeanServer</tt>} method.
|
|
39 |
*
|
|
40 |
* <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
|
|
41 |
* the compilation system within an MBeanServer is:
|
|
42 |
* <blockquote>
|
|
43 |
* {@link ManagementFactory#COMPILATION_MXBEAN_NAME
|
|
44 |
* <tt>java.lang:type=Compilation</tt>}
|
|
45 |
* </blockquote>
|
|
46 |
*
|
|
47 |
* @see <a href="../../../javax/management/package-summary.html">
|
|
48 |
* JMX Specification.</a>
|
|
49 |
* @see <a href="package-summary.html#examples">
|
|
50 |
* Ways to Access MXBeans</a>
|
|
51 |
*
|
|
52 |
* @author Mandy Chung
|
|
53 |
* @since 1.5
|
|
54 |
*/
|
|
55 |
public interface CompilationMXBean {
|
|
56 |
/**
|
|
57 |
* Returns the name of the Just-in-time (JIT) compiler.
|
|
58 |
*
|
|
59 |
* @return the name of the JIT compiler.
|
|
60 |
*/
|
|
61 |
public java.lang.String getName();
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Tests if the Java virtual machine supports the monitoring of
|
|
65 |
* compilation time.
|
|
66 |
*
|
|
67 |
* @return <tt>true</tt> if the monitoring of compilation time is
|
|
68 |
* supported ; <tt>false</tt> otherwise.
|
|
69 |
*/
|
|
70 |
public boolean isCompilationTimeMonitoringSupported();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* Returns the approximate accumlated elapsed time (in milliseconds)
|
|
74 |
* spent in compilation.
|
|
75 |
* If multiple threads are used for compilation, this value is
|
|
76 |
* summation of the approximate time that each thread spent in compilation.
|
|
77 |
*
|
|
78 |
* <p>This method is optionally supported by the platform.
|
|
79 |
* A Java virtual machine implementation may not support the compilation
|
|
80 |
* time monitoring. The {@link #isCompilationTimeMonitoringSupported}
|
|
81 |
* method can be used to determine if the Java virtual machine
|
|
82 |
* supports this operation.
|
|
83 |
*
|
|
84 |
* <p> This value does not indicate the level of performance of
|
|
85 |
* the Java virtual machine and is not intended for performance comparisons
|
|
86 |
* of different virtual machine implementations.
|
|
87 |
* The implementations may have different definitions and different
|
|
88 |
* measurements of the compilation time.
|
|
89 |
*
|
|
90 |
* @return Compilation time in milliseconds
|
|
91 |
* @throws java.lang.UnsupportedOperationException if the Java
|
|
92 |
* virtual machine does not support
|
|
93 |
* this operation.
|
|
94 |
*
|
|
95 |
*/
|
|
96 |
public long getTotalCompilationTime();
|
|
97 |
}
|