blob: 6143bd0112db4ca90ac72d8432184a7cd4d51409 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2003-2005 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
26package sun.management;
27
28import java.util.List;
29import sun.management.counter.Counter;
30/**
31 * An interface for the monitoring and management of the
32 * Java virtual machine.
33 */
34public interface VMManagement {
35
36 // Optional supports
37 public boolean isCompilationTimeMonitoringSupported();
38 public boolean isThreadContentionMonitoringSupported();
39 public boolean isThreadContentionMonitoringEnabled();
40 public boolean isCurrentThreadCpuTimeSupported();
41 public boolean isOtherThreadCpuTimeSupported();
42 public boolean isThreadCpuTimeEnabled();
43 public boolean isBootClassPathSupported();
44 public boolean isObjectMonitorUsageSupported();
45 public boolean isSynchronizerUsageSupported();
46
47 // Class Loading Subsystem
48 public long getTotalClassCount();
49 public int getLoadedClassCount();
50 public long getUnloadedClassCount();
51 public boolean getVerboseClass();
52
53 // Memory Subsystem
54 public boolean getVerboseGC();
55
56 // Runtime Subsystem
57 public String getManagementVersion();
58 public String getVmId();
59 public String getVmName();
60 public String getVmVendor();
61 public String getVmVersion();
62 public String getVmSpecName();
63 public String getVmSpecVendor();
64 public String getVmSpecVersion();
65 public String getClassPath();
66 public String getLibraryPath();
67 public String getBootClassPath();
68 public List<String> getVmArguments();
69 public long getStartupTime();
70 public int getAvailableProcessors();
71
72 // Compilation Subsystem
73 public String getCompilerName();
74 public long getTotalCompileTime();
75
76 // Thread Subsystem
77 public long getTotalThreadCount();
78 public int getLiveThreadCount();
79 public int getPeakThreadCount();
80 public int getDaemonThreadCount();
81
82 // Operating System
83 public String getOsName();
84 public String getOsArch();
85 public String getOsVersion();
86
87 // Hotspot-specific Runtime support
88 public long getSafepointCount();
89 public long getTotalSafepointTime();
90 public long getSafepointSyncTime();
91 public long getTotalApplicationNonStoppedTime();
92
93 public long getLoadedClassSize();
94 public long getUnloadedClassSize();
95 public long getClassLoadingTime();
96 public long getMethodDataSize();
97 public long getInitializedClassCount();
98 public long getClassInitializationTime();
99 public long getClassVerificationTime();
100
101 // Performance counter support
102 public List<Counter> getInternalCounters(String pattern);
103}