2362N/A * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Garbage collection information. It contains the following 0N/A * information for one garbage collection as well as GC-specific 0N/A * <li>Start time</li> 0N/A * <li>Memory usage before the collection starts</li> 0N/A * <li>Memory usage after the collection ends</li> 0N/A * <tt>GcInfo</tt> is a {@link CompositeData CompositeData} 0N/A * The GC-specific attributes can be obtained via the CompositeData 0N/A * interface. This is a historical relic, and other classes should 0N/A * not copy this pattern. Use {@link CompositeDataView} instead. 0N/A * <h4>MXBean Mapping</h4> 0N/A * <tt>GcInfo</tt> is mapped to a {@link CompositeData CompositeData} 0N/A * with attributes as specified in the {@link #from from} method. 0N/A * @author Mandy Chung 0N/A * Returns the identifier of this garbage collection which is 0N/A * the number of collections that this collector has done. 0N/A * @return the identifier of this garbage collection which is 0N/A * the number of collections that this collector has done. 0N/A * Returns the start time of this GC in milliseconds 0N/A * since the Java virtual machine was started. 0N/A * @return the start time of this GC. 0N/A * Returns the end time of this GC in milliseconds 0N/A * since the Java virtual machine was started. 0N/A * @return the end time of this GC. 0N/A * Returns the elapsed time of this GC in milliseconds. 0N/A * @return the elapsed time of this GC in milliseconds. 0N/A * Returns the memory usage of all memory pools 0N/A * at the beginning of this GC. 0N/A * This method returns 0N/A * a <tt>Map</tt> of the name of a memory pool 0N/A * to the memory usage of the corresponding 0N/A * memory pool before GC starts. 0N/A * @return a <tt>Map</tt> of memory pool names to the memory 0N/A * usage of a memory pool before GC starts. 0N/A * Returns the memory usage of all memory pools 0N/A * at the end of this GC. 0N/A * This method returns 0N/A * a <tt>Map</tt> of the name of a memory pool 0N/A * to the memory usage of the corresponding 0N/A * memory pool when GC finishes. 0N/A * @return a <tt>Map</tt> of memory pool names to the memory 0N/A * usage of a memory pool when GC finishes. 0N/A * Returns a <tt>GcInfo</tt> object represented by the 0N/A * given <tt>CompositeData</tt>. The given 0N/A * <tt>CompositeData</tt> must contain 0N/A * all the following attributes: 0N/A * <th align=left>Attribute Name</th> 0N/A * <th align=left>Type</th> 0N/A * <td><tt>java.lang.Long</tt></td> 0N/A * <td>startTime</td> 0N/A * <td><tt>java.lang.Long</tt></td> 0N/A * <td><tt>java.lang.Long</tt></td> 0N/A * <td>memoryUsageBeforeGc</td> 0N/A * <td><tt>javax.management.openmbean.TabularData</tt></td> 0N/A * <td>memoryUsageAfterGc</td> 0N/A * <td><tt>javax.management.openmbean.TabularData</tt></td> 0N/A * @throws IllegalArgumentException if <tt>cd</tt> does not 0N/A * represent a <tt>GcInfo</tt> object with the attributes 0N/A * @return a <tt>GcInfo</tt> object represented by <tt>cd</tt> 0N/A * if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise. 0N/A // Implementation of the CompositeData interface 0N/A * <p>Return the {@code CompositeData} representation of this 0N/A * {@code GcInfo}, including any GC-specific attributes. The 0N/A * returned value will have at least all the attributes described 0N/A * in the {@link #from(CompositeData) from} method, plus optionally 0N/A * @param ct the {@code CompositeType} that the caller expects. 0N/A * This parameter is ignored and can be null. 0N/A * @return the {@code CompositeData} representation.