001/* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013package gnu.java.lang.management; 014 015import org.jikesrvm.mm.mminterface.JMXSupport; 016 017final class VMGarbageCollectorMXBeanImpl { 018 019 /** 020 * Returns the number of collections that have occurred. 021 * We ignore the name as we only have one collector. 022 * 023 * @param name the name of the collector whose count should 024 * be returned (ignored). 025 * @return the number of collections. 026 */ 027 static long getCollectionCount(String name) { 028 return JMXSupport.getCollectionCount(); 029 } 030 031 /** 032 * Returns the amount of time spent collecting. 033 * We ignore the name as we only have one collector. 034 * 035 * @param name the name of the collector whose time should 036 * be returned (ignored). 037 * @return the number of milliseconds spent collecting. 038 */ 039 static long getCollectionTime(String name) { 040 return JMXSupport.getCollectionTime(); 041 } 042 043}