Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/jcl/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java
12511 views
1
/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
2
/*
3
*******************************************************************************
4
* Copyright (c) 2005, 2022 IBM Corp. and others
5
*
6
* This program and the accompanying materials are made available under
7
* the terms of the Eclipse Public License 2.0 which accompanies this
8
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
* or the Apache License, Version 2.0 which accompanies this distribution and
10
* is available at https://www.apache.org/licenses/LICENSE-2.0.
11
*
12
* This Source Code may also be made available under the following
13
* Secondary Licenses when the conditions for such availability set
14
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
* General Public License, version 2 with the GNU Classpath
16
* Exception [1] and GNU General Public License, version 2 with the
17
* OpenJDK Assembly Exception [2].
18
*
19
* [1] https://www.gnu.org/software/classpath/license.html
20
* [2] http://openjdk.java.net/legal/assembly-exception.html
21
*
22
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
23
*******************************************************************************/
24
package java.lang.management;
25
26
/**
27
* The management and monitoring interface for the virtual machine's class
28
* loading functionality.
29
* <p>
30
* Precisely one instance of this interface will be made
31
* available to management clients.
32
* </p>
33
* <p>
34
* Accessing this <code>MXBean</code> can be done in one of three ways.
35
* <ol>
36
* <li>Invoking the static ManagementFactory.getClassLoadingMXBean() method.</li>
37
* <li>Using a javax.management.MBeanServerConnection.</li>
38
* <li>Obtaining a proxy MXBean from the static
39
* {@code ManagementFactory.newPlatformMXBeanProxy(MBeanServerConnection connection,
40
* String mxbeanName, Class<T> mxbeanInterface())} method, passing in
41
* &quot;java.lang:type=ClassLoading&quot; for the value of the mxbeanName
42
* parameter.</li>
43
* </ol>
44
*
45
*/
46
public interface ClassLoadingMXBean extends PlatformManagedObject {
47
48
/**
49
* Returns the number of classes currently loaded by the virtual machine.
50
* @return the number of loaded classes
51
*/
52
public int getLoadedClassCount();
53
54
/**
55
* Returns a figure for the total number of classes that have been
56
* loaded by the virtual machine during its lifetime.
57
* @return the total number of classes that have been loaded
58
*/
59
public long getTotalLoadedClassCount();
60
61
/**
62
* Returns a figure for the total number of classes that have
63
* been unloaded by the virtual machine over its lifetime.
64
* @return the total number of unloaded classes
65
*/
66
public long getUnloadedClassCount();
67
68
/**
69
* Returns a boolean indication of whether the virtual
70
* machine's class loading system is producing verbose output.
71
* @return true if running in verbose mode
72
*/
73
public boolean isVerbose();
74
75
/**
76
* Updates the virtual machine's class loading system to
77
* operate in verbose or non-verbose mode.
78
* @param value true to put the class loading system into verbose
79
* mode, false to take the class loading system out of verbose mode.
80
*/
81
public void setVerbose(boolean value);
82
83
}
84
85