< prev index next >

src/jdk.management/share/classes/com/sun/management/GcInfo.java

Print this page


   1 /*
   2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  39 /**
  40  * Garbage collection information.  It contains the following
  41  * information for one garbage collection as well as GC-specific
  42  * attributes:
  43  * <blockquote>
  44  * <ul>
  45  *   <li>Start time</li>
  46  *   <li>End time</li>
  47  *   <li>Duration</li>
  48  *   <li>Memory usage before the collection starts</li>
  49  *   <li>Memory usage after the collection ends</li>
  50  * </ul>
  51  * </blockquote>
  52  *
  53  * <p>
  54  * {@code GcInfo} is a {@link CompositeData CompositeData}
  55  * The GC-specific attributes can be obtained via the CompositeData
  56  * interface.  This is a historical relic, and other classes should
  57  * not copy this pattern.  Use {@link CompositeDataView} instead.
  58  *
  59  * <h2>MXBean Mapping</h2>
  60  * {@code GcInfo} is mapped to a {@link CompositeData CompositeData}
  61  * with attributes as specified in the {@link #from from} method.
  62  *
  63  * @author  Mandy Chung
  64  * @since   1.5
  65  */
  66 public class GcInfo implements CompositeData, CompositeDataView {
  67     private final long index;
  68     private final long startTime;
  69     private final long endTime;
  70     private final Map<String, MemoryUsage> usageBeforeGc;
  71     private final Map<String, MemoryUsage> usageAfterGc;
  72     private final Object[] extAttributes;
  73     private final CompositeData cdata;
  74     private final GcInfoBuilder builder;
  75 
  76     private GcInfo(GcInfoBuilder builder,
  77                    long index, long startTime, long endTime,
  78                    MemoryUsage[] muBeforeGc,
  79                    MemoryUsage[] muAfterGc,


   1 /*
   2  * Copyright (c) 2003, 2017, Oracle and/or its affiliates. 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  39 /**
  40  * Garbage collection information.  It contains the following
  41  * information for one garbage collection as well as GC-specific
  42  * attributes:
  43  * <blockquote>
  44  * <ul>
  45  *   <li>Start time</li>
  46  *   <li>End time</li>
  47  *   <li>Duration</li>
  48  *   <li>Memory usage before the collection starts</li>
  49  *   <li>Memory usage after the collection ends</li>
  50  * </ul>
  51  * </blockquote>
  52  *
  53  * <p>
  54  * {@code GcInfo} is a {@link CompositeData CompositeData}
  55  * The GC-specific attributes can be obtained via the CompositeData
  56  * interface.  This is a historical relic, and other classes should
  57  * not copy this pattern.  Use {@link CompositeDataView} instead.
  58  *
  59  * <h3>MXBean Mapping</h3>
  60  * {@code GcInfo} is mapped to a {@link CompositeData CompositeData}
  61  * with attributes as specified in the {@link #from from} method.
  62  *
  63  * @author  Mandy Chung
  64  * @since   1.5
  65  */
  66 public class GcInfo implements CompositeData, CompositeDataView {
  67     private final long index;
  68     private final long startTime;
  69     private final long endTime;
  70     private final Map<String, MemoryUsage> usageBeforeGc;
  71     private final Map<String, MemoryUsage> usageAfterGc;
  72     private final Object[] extAttributes;
  73     private final CompositeData cdata;
  74     private final GcInfoBuilder builder;
  75 
  76     private GcInfo(GcInfoBuilder builder,
  77                    long index, long startTime, long endTime,
  78                    MemoryUsage[] muBeforeGc,
  79                    MemoryUsage[] muAfterGc,


< prev index next >