Path: blob/master/src/java.management/share/classes/java/lang/management/MemoryManagerMXBean.java
41159 views
/*1* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.lang.management;2627/**28* The management interface for a memory manager.29* A memory manager manages one or more memory pools of the30* Java virtual machine.31*32* <p> A Java virtual machine has one or more memory managers.33* An instance implementing this interface is34* an <a href="ManagementFactory.html#MXBean">MXBean</a>35* that can be obtained by calling36* the {@link ManagementFactory#getMemoryManagerMXBeans} method or37* from the {@link ManagementFactory#getPlatformMBeanServer38* platform MBeanServer} method.39*40* <p>The {@code ObjectName} for uniquely identifying the MXBean for41* a memory manager within an MBeanServer is:42* <blockquote>43* {@link ManagementFactory#MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE44* java.lang:type=MemoryManager}{@code ,name=}<i>manager's name</i>45* </blockquote>46*47* It can be obtained by calling the48* {@link PlatformManagedObject#getObjectName} method.49*50* @see ManagementFactory#getPlatformMXBeans(Class)51* @see MemoryMXBean52*53* @see <a href="../../../javax/management/package-summary.html">54* JMX Specification.</a>55* @see <a href="package-summary.html#examples">56* Ways to Access MXBeans</a>57*58* @author Mandy Chung59* @since 1.560*/61public interface MemoryManagerMXBean extends PlatformManagedObject {62/**63* Returns the name representing this memory manager.64*65* @return the name of this memory manager.66*/67public String getName();6869/**70* Tests if this memory manager is valid in the Java virtual71* machine. A memory manager becomes invalid once the Java virtual72* machine removes it from the memory system.73*74* @return {@code true} if the memory manager is valid in the75* Java virtual machine;76* {@code false} otherwise.77*/78public boolean isValid();7980/**81* Returns the name of memory pools that this memory manager manages.82*83* @return an array of {@code String} objects, each is84* the name of a memory pool that this memory manager manages.85*/86public String[] getMemoryPoolNames();87}888990