src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java
author jjg
Fri, 05 Jan 2018 12:41:28 -0800
changeset 48445 cb7926b6b3d6
parent 47216 71c04702a3d5
permissions -rw-r--r--
8188649: javadoc -encoding doesn't work when using the old doclet API Reviewed-by: ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
     2
 * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.lang.management;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * The management interface for the class loading system of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * the Java virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * <p> A Java virtual machine has a single instance of the implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * class of this interface.  This instance implementing this interface is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * an <a href="ManagementFactory.html#MXBean">MXBean</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * that can be obtained by calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * the {@link ManagementFactory#getClassLoadingMXBean} method or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * from the {@link ManagementFactory#getPlatformMBeanServer
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    38
 * platform MBeanServer}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    40
 * <p>The {@code ObjectName} for uniquely identifying the MXBean for
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    41
 * the class loading system within an {@code MBeanServer} is:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * <blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    44
 *        java.lang:type=ClassLoading}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * </blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *
401
ef01e0dccd63 6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents: 2
diff changeset
    47
 * It can be obtained by calling the
ef01e0dccd63 6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents: 2
diff changeset
    48
 * {@link PlatformManagedObject#getObjectName} method.
ef01e0dccd63 6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents: 2
diff changeset
    49
 *
ef01e0dccd63 6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents: 2
diff changeset
    50
 * @see ManagementFactory#getPlatformMXBeans(Class)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * @see <a href="../../../javax/management/package-summary.html">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *      JMX Specification.</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * @see <a href="package-summary.html#examples">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *      Ways to Access MXBeans</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * @author  Mandy Chung
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * @since   1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 */
401
ef01e0dccd63 6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents: 2
diff changeset
    59
public interface ClassLoadingMXBean extends PlatformManagedObject {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * Returns the total number of classes that have been loaded since
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * the Java virtual machine has started execution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * @return the total number of classes loaded.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    public long getTotalLoadedClassCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     * Returns the number of classes that are currently loaded in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * Java virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * @return the number of currently loaded classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    public int getLoadedClassCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * Returns the total number of classes unloaded since the Java virtual machine
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * has started execution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * @return the total number of unloaded classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    public long getUnloadedClassCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * Tests if the verbose output for the class loading system is enabled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    89
     * @return {@code true} if the verbose output for the class loading
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
    90
     * system is enabled; {@code false} otherwise.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    public boolean isVerbose();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * Enables or disables the verbose output for the class loading
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * system.  The verbose output information and the output stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * to which the verbose information is emitted are implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * dependent.  Typically, a Java virtual machine implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     * prints a message each time a class file is loaded.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * <p>This method can be called by multiple threads concurrently.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * Each invocation of this method enables or disables the verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * output globally.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     *
32034
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   105
     * @param value {@code true} to enable the verbose output;
05676cfd40b5 8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents: 25859
diff changeset
   106
     *              {@code false} to disable.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * @exception  java.lang.SecurityException if a security manager
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     *             exists and the caller does not have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     *             ManagementPermission("control").
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    public void setVerbose(boolean value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
}