Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A16C7200B76 for ; Tue, 16 Aug 2016 03:14:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9FD9A160AB9; Tue, 16 Aug 2016 01:14:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 50F50160AA7 for ; Tue, 16 Aug 2016 03:14:42 +0200 (CEST) Received: (qmail 27785 invoked by uid 500); 16 Aug 2016 01:14:41 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 27776 invoked by uid 99); 16 Aug 2016 01:14:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2016 01:14:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E86BDC0362 for ; Tue, 16 Aug 2016 01:14:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id wAH3zMBbeF6C for ; Tue, 16 Aug 2016 01:14:28 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 03D6460D5C for ; Tue, 16 Aug 2016 01:14:15 +0000 (UTC) Received: (qmail 25729 invoked by uid 99); 16 Aug 2016 01:14:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2016 01:14:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CA7DDE38AC; Tue, 16 Aug 2016 01:14:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: klund@apache.org To: commits@geode.incubator.apache.org Date: Tue, 16 Aug 2016 01:14:28 -0000 Message-Id: <7d3c0eee7e4c4626a466089b6ff843b2@git.apache.org> In-Reply-To: <7e1c5fcb6de04060851f6605f41536e1@git.apache.org> References: <7e1c5fcb6de04060851f6605f41536e1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/21] incubator-geode git commit: GEODE-1781: repackage internal statistics classes and refactor statistics tests archived-at: Tue, 16 Aug 2016 01:14:44 -0000 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeImpl.java deleted file mode 100644 index ccd4d6c..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeImpl.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gemstone.gemfire.internal; - -import com.gemstone.gemfire.*; -import com.gemstone.gemfire.internal.i18n.LocalizedStrings; - -import java.io.*; -import java.util.*; - -/** - * Gathers together a number of {@link StatisticDescriptor statistics} - * into one logical type. - * - * @see Statistics - * - * - * @since GemFire 3.0 - */ -public class StatisticsTypeImpl implements StatisticsType { - - /** The name of this statistics type */ - private final String name; - - /** The description of this statistics type */ - private final String description; - - /** The descriptions of the statistics in id order */ - private final StatisticDescriptor[] stats; - - /** Maps a stat name to its StatisticDescriptor */ - private final HashMap statsMap; - - /** Contains the number of 32-bit statistics in this type. */ - private final int intStatCount; - - /** Contains the number of long statistics in this type. */ - private final int longStatCount; - - /** Contains the number of double statistics in this type. */ - private final int doubleStatCount; - - ///////////////////// Static Methods ///////////////////// - - /** - * @see StatisticsTypeXml#read(Reader, StatisticsTypeFactory) - */ - public static StatisticsType[] fromXml(Reader reader, - StatisticsTypeFactory factory) - throws IOException { - return (new StatisticsTypeXml()).read(reader, factory); - } - - ////////////////////// Constructors ////////////////////// - - /** - * Creates a new StatisticsType with the given name, - * description, and statistics. - * - * @param name - * The name of this statistics type (for example, - * "DatabaseStatistics") - * @param description - * A description of this statistics type (for example, - * "Information about the application's use of the - * database"). - * @param stats - * Descriptions of the individual statistics grouped together - * in this statistics type. - * - * @throws NullPointerException - * If either name or stats is - * null. - */ - public StatisticsTypeImpl(String name, String description, - StatisticDescriptor[] stats) { - this(name, description, stats, false); - } - - /** - * Creates a new StatisticsType with the given name, - * description, and statistics. - * - * @param name - * The name of this statistics type (for example, - * "DatabaseStatistics") - * @param description - * A description of this statistics type (for example, - * "Information about the application's use of the - * database"). - * @param stats - * Descriptions of the individual statistics grouped together - * in this statistics type. - * @param wrapsSharedClass - * True if this type is a wrapper around a SharedClass??. - * False if its a dynamic type created at run time. - * - * @throws NullPointerException - * If either name or stats is - * null. - */ - public StatisticsTypeImpl(String name, String description, - StatisticDescriptor[] stats, boolean wrapsSharedClass) { - if (name == null) { - throw new NullPointerException(LocalizedStrings.StatisticsTypeImpl_CANNOT_HAVE_A_NULL_STATISTICS_TYPE_NAME.toLocalizedString()); - } - - if (stats == null) { - throw new NullPointerException(LocalizedStrings.StatisticsTypeImpl_CANNOT_HAVE_A_NULL_STATISTIC_DESCRIPTORS.toLocalizedString()); - } - if (stats.length > StatisticsTypeFactory.MAX_DESCRIPTORS_PER_TYPE) { - throw new IllegalArgumentException(LocalizedStrings.StatisticsTypeImpl_THE_REQUESTED_DESCRIPTOR_COUNT_0_EXCEEDS_THE_MAXIMUM_WHICH_IS_1.toLocalizedString(new Object[] {Integer.valueOf(stats.length), Integer.valueOf(StatisticsTypeFactory.MAX_DESCRIPTORS_PER_TYPE)})); - } - - this.name = name; - this.description = description; - this.stats = stats; - this.statsMap = new HashMap(stats.length*2); - int intCount = 0; - int longCount = 0; - int doubleCount = 0; - for (int i=0; i < stats.length; i++) { - StatisticDescriptorImpl sd = (StatisticDescriptorImpl)stats[i]; - if (sd.getTypeCode() == StatisticDescriptorImpl.INT) { - if (!wrapsSharedClass) { - sd.setId(intCount); - } - intCount++; - } else if (sd.getTypeCode() == StatisticDescriptorImpl.LONG) { - if (!wrapsSharedClass) { - sd.setId(longCount); - } - longCount++; - } else if (sd.getTypeCode() == StatisticDescriptorImpl.DOUBLE) { - if (!wrapsSharedClass) { - sd.setId(doubleCount); - } - doubleCount++; - } - Object previousValue = statsMap.put(stats[i].getName(), sd); - if (previousValue != null) { - throw new IllegalArgumentException(LocalizedStrings.StatisticsTypeImpl_DUPLICATE_STATISTICDESCRIPTOR_NAMED_0.toLocalizedString(stats[i].getName())); - } - } - this.intStatCount = intCount; - this.longStatCount = longCount; - this.doubleStatCount = doubleCount; - } - - ////////////////////// StatisticsType Methods ////////////////////// - - public final String getName() { - return this.name; - } - - public final String getDescription() { - return this.description; - } - - public final StatisticDescriptor[] getStatistics() { - return this.stats; - } - - public final int nameToId(String name) { - return nameToDescriptor(name).getId(); - } - - public final StatisticDescriptor nameToDescriptor(String name) { - StatisticDescriptorImpl stat = (StatisticDescriptorImpl)statsMap.get(name); - if (stat == null) { - throw new IllegalArgumentException(LocalizedStrings.StatisticsTypeImpl_THERE_IS_NO_STATISTIC_NAMED_0.toLocalizedString(name)); - } - return stat; - } - - ////////////////////// Instance Methods ////////////////////// - - /** - * Gets the number of statistics in this type that are ints. - */ - public int getIntStatCount() { - return this.intStatCount; - } - /** - * Gets the number of statistics in this type that are longs. - */ - public int getLongStatCount() { - return this.longStatCount; - } - /** - * Gets the number of statistics that are doubles. - */ - public int getDoubleStatCount() { - return this.doubleStatCount; - } - -// @Override -// public String toString() { -// return "StatisticType with " + this.stats.length + " stats"; -// } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder(getClass().getName()); - sb.append("@").append(System.identityHashCode(this)).append("{"); - sb.append("name=").append(this.name); - sb.append(", description=").append(this.description); - sb.append(", stats.length=").append(this.stats.length); - sb.append("}"); - return sb.toString(); - } - - @Override - public int hashCode() { - return getName().hashCode(); - } - @Override - public boolean equals(Object o) { - if (o == null) { - return false; - } - if (!(o instanceof StatisticsType)) { - return false; - } - StatisticsType other = (StatisticsType)o; - if (!getName().equals(other.getName())) { - return false; - } - if (!getDescription().equals(other.getDescription())) { - return false; - } - StatisticDescriptor[] myStats = getStatistics(); - StatisticDescriptor[] yourStats = other.getStatistics(); - if (myStats.length != yourStats.length) { - return false; - } - for (int i=0; i < myStats.length; i++) { - if (!myStats[i].equals(yourStats[i])) { - return false; - } - } - return true; - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeXml.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeXml.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeXml.java deleted file mode 100644 index 0ce0422..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/StatisticsTypeXml.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gemstone.gemfire.internal; - -import com.gemstone.gemfire.*; -import com.gemstone.gemfire.internal.i18n.LocalizedStrings; - -import java.io.*; -import java.util.*; -import javax.xml.parsers.*; -//import javax.xml.transform.*; -//import javax.xml.transform.dom.*; -//import javax.xml.transform.stream.*; -import org.w3c.dom.*; -import org.xml.sax.*; - -// @todo davidw Use a SAX parser instead of DOM -/** - * This is an internal helper class for dealing with the - * SessionFactory XML configuration files. - */ -public class StatisticsTypeXml - implements EntityResolver, ErrorHandler { - - /** The name of the DTD file */ - static final String DTD = "statisticsType.dtd"; - - static final String systemId = "http://www.gemstone.com/dtd/" + DTD; - static final String publicId = - "-//GemStone Systems, Inc.//GemFire StatisticsType//EN"; - - ///////////////////// Interface methods /////////////////////// - - /** - * Given a publicId, attempts to resolve it to a DTD. Returns an - * InputSource for the DTD. - */ - public InputSource resolveEntity (String publicId, String systemId) - throws SAXException { - - // Figure out the location for the publicId. Be tolerant of other - // versions of the dtd - if(publicId.equals(StatisticsTypeXml.publicId) || - systemId.equals(StatisticsTypeXml.systemId) || - systemId.endsWith(DTD)) { - - // Public ID for system config DTD - String location = "/com/gemstone/gemfire/" + DTD; - InputStream stream = ClassPathLoader.getLatest().getResourceAsStream(getClass(), location); - if (stream != null) { - return new InputSource(stream); - - } else { - throw new SAXNotRecognizedException(LocalizedStrings.StatisticsTypeXml_DTD_NOT_FOUND_0.toLocalizedString(location)); - } - - } else { - throw new SAXNotRecognizedException(LocalizedStrings.StatisticsTypeXml_INVALID_PUBLIC_ID_0.toLocalizedString(publicId)); - } - } - - public void warning(SAXParseException exception) throws SAXException - { - // We don't want to thrown an exception. We want to log it!! - // FIXME -// String s = "SAX warning while working with XML"; - } - - public void error(SAXParseException exception) throws SAXException - { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_SAX_ERROR_WHILE_WORKING_WITH_XML.toLocalizedString(), exception); - } - - public void fatalError(SAXParseException exception) throws SAXException - { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_SAX_FATAL_ERROR_WHILE_WORKING_WITH_XML.toLocalizedString(), exception); - } - - ////////////////////// Parsing XML File //////////////////////// - - /** - * Parses the contents of XML data and from it creates one or more - * StatisticsType instances. - */ - public StatisticsType[] read( Reader reader, StatisticsTypeFactory statFactory) { - DocumentBuilderFactory factory = - DocumentBuilderFactory.newInstance(); -// factory.setValidating(validate); - - DocumentBuilder parser = null; - try { - parser = factory.newDocumentBuilder(); - - } catch (ParserConfigurationException ex) { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_FAILED_PARSING_XML.toLocalizedString(), ex); - } - - parser.setErrorHandler(this); - parser.setEntityResolver(this); - Document doc; - try { - doc = parser.parse(new InputSource(reader)); - } catch (SAXException se) { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_FAILED_PARSING_XML.toLocalizedString(), se); - } catch (IOException io) { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_FAILED_READING_XML_DATA.toLocalizedString(), io); - } - - if (doc == null) { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_FAILED_READING_XML_DATA_NO_DOCUMENT.toLocalizedString()); - } - Element root = doc.getDocumentElement(); - if (root == null) { - throw new GemFireConfigException(LocalizedStrings.StatisticsTypeXml_FAILED_READING_XML_DATA_NO_ROOT_ELEMENT.toLocalizedString()); - } - return extractStatistics(root, statFactory); - } - - /* - * - */ - private StatisticsType[] extractStatistics(Element root, StatisticsTypeFactory statFactory) { - Assert.assertTrue(root.getTagName().equals("statistics")); - - ArrayList types = new ArrayList(); - NodeList typeNodes = root.getElementsByTagName("type"); - for (int i = 0; i < typeNodes.getLength(); i++) { - Element typeNode = (Element) typeNodes.item(i); - types.add(extractType(typeNode, statFactory)); - } - return (StatisticsType[])types.toArray(new StatisticsType[types.size()]); - } - /** - * - * - */ - private StatisticsType extractType(Element typeNode, StatisticsTypeFactory statFactory) { - Assert.assertTrue(typeNode.getTagName().equals("type")); - Assert.assertTrue(typeNode.hasAttribute("name")); - - final String typeName = typeNode.getAttribute("name"); - ArrayList stats = new ArrayList(); - NodeList statNodes = typeNode.getElementsByTagName("stat"); - for (int i = 0; i < statNodes.getLength(); i++) { - Element statNode = (Element) statNodes.item(i); - stats.add(extractStat(statNode, statFactory)); - } - StatisticDescriptor[] descriptors = - (StatisticDescriptor[])stats.toArray(new StatisticDescriptor[stats.size()]); - String description = ""; - { - NodeList descriptionNodes = typeNode.getElementsByTagName("description"); - if (descriptionNodes.getLength() > 0) { - // descriptionNodes will contain the both our description, if it exists, - // and any nested stat descriptions. Ours will always be first - Element descriptionNode = (Element) descriptionNodes.item(0); - // but make sure the first one belongs to our node - if (descriptionNode.getParentNode().getNodeName().equals(typeNode.getNodeName())) { - description = extractDescription(descriptionNode); - } - } - } - - return statFactory.createType(typeName, description, descriptors); - } - private final static int INT_STORAGE = 0; - private final static int LONG_STORAGE = 1; - private final static int DOUBLE_STORAGE = 2; - /** - * - * - */ - private StatisticDescriptor extractStat(Element statNode, StatisticsTypeFactory statFactory) { - Assert.assertTrue(statNode.getTagName().equals("stat")); - Assert.assertTrue(statNode.hasAttribute("name")); - - final String statName = statNode.getAttribute("name"); - String description = ""; - String unit = ""; - boolean isCounter = true; - boolean largerBetter; - int storage = INT_STORAGE; - - if ( statNode.hasAttribute("counter")) { - String value = statNode.getAttribute("counter"); - Assert.assertTrue(value.equalsIgnoreCase("true") || - value.equalsIgnoreCase("false")); - isCounter = Boolean.valueOf(value).booleanValue(); - } - largerBetter = isCounter; // default - if ( statNode.hasAttribute("largerBetter")) { - String value = statNode.getAttribute("largerBetter"); - Assert.assertTrue(value.equalsIgnoreCase("true") || - value.equalsIgnoreCase("false")); - largerBetter = Boolean.valueOf(value).booleanValue(); - } - if ( statNode.hasAttribute("storage")) { - String value = statNode.getAttribute("storage"); - if (value.equalsIgnoreCase("int")) { - storage = INT_STORAGE; - } else if (value.equalsIgnoreCase("long")) { - storage = LONG_STORAGE; - } else { - Assert.assertTrue(value.equalsIgnoreCase("double")); - storage = DOUBLE_STORAGE; - } - } - { - NodeList descriptionNodes = - statNode.getElementsByTagName("description"); - Assert.assertTrue(descriptionNodes.getLength() <= 1); - if (descriptionNodes.getLength() == 1) { - Element descriptionNode = (Element) descriptionNodes.item(0); - description = extractDescription(descriptionNode); - } - } - - { - NodeList unitNodes = - statNode.getElementsByTagName("unit"); - Assert.assertTrue(unitNodes.getLength() <= 1); - if (unitNodes.getLength() == 1) { - Element unitNode = (Element) unitNodes.item(0); - unit = extractUnit(unitNode); - } - } - if (isCounter) { - switch (storage) { - case INT_STORAGE: return statFactory.createIntCounter(statName, description, unit, largerBetter); - case LONG_STORAGE: return statFactory.createLongCounter(statName, description, unit, largerBetter); - case DOUBLE_STORAGE: return statFactory.createDoubleCounter(statName, description, unit, largerBetter); - default: throw new RuntimeException(LocalizedStrings.StatisticsTypeXml_UNEXPECTED_STORAGE_TYPE_0.toLocalizedString(Integer.valueOf(storage))); - } - } else { - switch (storage) { - case INT_STORAGE: return statFactory.createIntGauge(statName, description, unit, largerBetter); - case LONG_STORAGE: return statFactory.createLongGauge(statName, description, unit, largerBetter); - case DOUBLE_STORAGE: return statFactory.createDoubleGauge(statName, description, unit, largerBetter); - default: throw new RuntimeException(LocalizedStrings.StatisticsTypeXml_UNEXPECTED_STORAGE_TYPE_0.toLocalizedString(Integer.valueOf(storage))); - } - } - } - /** - * - */ - private String extractDescription(Element descriptionNode) { - Assert.assertTrue(descriptionNode.getTagName().equals("description")); - return extractText(descriptionNode); - } - /** - * - */ - private String extractUnit(Element unitNode) { - Assert.assertTrue(unitNode.getTagName().equals("unit")); - return extractText(unitNode); - } - private String extractText(Element element) { - Text text = (Text) element.getFirstChild(); - return((text == null ? "" : text.getData())); - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java index cc03ad6..e52950f 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java @@ -26,8 +26,9 @@ import com.gemstone.gemfire.cache.persistence.PersistentID; import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.distributed.internal.*; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; -import com.gemstone.gemfire.internal.StatArchiveReader.ResourceInst; -import com.gemstone.gemfire.internal.StatArchiveReader.StatValue; +import com.gemstone.gemfire.internal.statistics.StatArchiveReader; +import com.gemstone.gemfire.internal.statistics.StatArchiveReader.ResourceInst; +import com.gemstone.gemfire.internal.statistics.StatArchiveReader.StatValue; import com.gemstone.gemfire.internal.admin.remote.TailLogResponse; import com.gemstone.gemfire.internal.cache.DiskStoreImpl; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; @@ -940,7 +941,7 @@ public class SystemAdmin { return result; } - private static class StatSpec implements StatArchiveReader.StatSpec { + public static class StatSpec implements StatArchiveReader.StatSpec { public final String cmdLineSpec; public final String typeId; public final String instanceId; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStats.java deleted file mode 100644 index d7dde46..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStats.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gemstone.gemfire.internal; - -import com.gemstone.gemfire.*; - -/** - * Statistics related to a Java VM. Currently they all come from - * {@link java.lang.Runtime}. - */ -public class VMStats implements VMStatsContract { - private final static StatisticsType vmType; - private final static int cpusId; - private final static int freeMemoryId; - private final static int totalMemoryId; - private final static int maxMemoryId; - static { - StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton(); - vmType = f.createType("VMStats", - "Stats available on any java virtual machine.", - new StatisticDescriptor[] { - f.createIntGauge("cpus", - "Number of cpus available to the java VM on its machine.", - "cpus", true), - f.createLongGauge("freeMemory", - "An approximation fo the total amount of memory currently available for future allocated objects, measured in bytes.", - "bytes", true), - f.createLongGauge("totalMemory", - "The total amount of memory currently available for current and future objects, measured in bytes.", - "bytes"), - f.createLongGauge("maxMemory", - "The maximum amount of memory that the VM will attempt to use, measured in bytes.", - "bytes", true) - }); - cpusId = vmType.nameToId("cpus"); - freeMemoryId = vmType.nameToId("freeMemory"); - totalMemoryId = vmType.nameToId("totalMemory"); - maxMemoryId = vmType.nameToId("maxMemory"); - } - - private final Statistics vmStats; - - - public VMStats(StatisticsFactory f, long id) { - this.vmStats = f.createStatistics(vmType, "vmStats", id); - } - - public void refresh() { - Runtime rt = Runtime.getRuntime(); - this.vmStats.setInt(cpusId, rt.availableProcessors()); - this.vmStats.setLong(freeMemoryId, rt.freeMemory()); - this.vmStats.setLong(totalMemoryId, rt.totalMemory()); - this.vmStats.setLong(maxMemoryId, rt.maxMemory()); - - } - public void close() { - this.vmStats.close(); - } - - /* (non-Javadoc) - * @see com.gemstone.gemfire.internal.VMStatsContract#getFdsOpen() - */ - public long getFdsOpen() { - return -1; - } - - /* (non-Javadoc) - * @see com.gemstone.gemfire.internal.VMStatsContract#getFdLimit() - */ - public long getFdLimit() { - return 0; - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContract.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContract.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContract.java deleted file mode 100644 index 238cf86..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContract.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gemstone.gemfire.internal; - -/** - * Describes the contract a VMStats implementation must implement. - *

I named this VMStatsContract because an implementation named - * VMStats already exists and I didn't want to rename it because - * of the svn merge issues. - * @see VMStatsContractFactory - */ -public interface VMStatsContract { - /** - * Called by sampler when it wants the VMStats statistics values to be - * refetched from the system. - */ - public void refresh(); - /** - * Called by sampler when it wants the VMStats to go away. - */ - public void close(); -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContractFactory.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContractFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContractFactory.java deleted file mode 100644 index ff84b0e..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/VMStatsContractFactory.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gemstone.gemfire.internal; - -import com.gemstone.gemfire.*; -import com.gemstone.gemfire.internal.stats50.VMStats50; - -/** - * Factory used to produce an instance of VMStatsContract. - */ -public class VMStatsContractFactory { - /** - * Create and return a VMStatsContract. - */ - public static VMStatsContract create(StatisticsFactory f, long id) { - VMStatsContract result; - try { - result = new VMStats50(f, id); - } - catch (VirtualMachineError err) { - SystemFailure.initiateFailure(err); - // If this ever returns, rethrow the error. We're poisoned - // now, so don't let this thread continue. - throw err; - } - catch (Throwable ignore) { - // Now that we no longer support 1.4 I'm not sure why we would get here. - // But just in case other vm vendors don't support mxbeans I've left - // this logic in that will create a simple VMStats instance. - // Whenever you catch Error or Throwable, you must also - // catch VirtualMachineError (see above). However, there is - // _still_ a possibility that you are dealing with a cascading - // error condition, so you also need to check to see if the JVM - // is still usable: - SystemFailure.checkFailure(); - //log.warning("Could not create 5.0 VMStats", ignore); - // couldn't create the 1.5 version so create the old 1.4 version - result = new VMStats(f, id); - } - return result; - } - - private VMStatsContractFactory() { - // private so no instances allowed. static methods only - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsProcessStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsProcessStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsProcessStats.java deleted file mode 100644 index a671717..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsProcessStats.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.gemstone.gemfire.internal; - -import com.gemstone.gemfire.*; - -/** - *

This class provides the interface for statistics about a - * windows operating system process that is using a GemFire system. - */ -public class WindowsProcessStats -{ - private final static int handlesINT = 0; - private final static int priorityBaseINT = 1; - private final static int threadsINT = 2; - - private final static int activeTimeLONG = 0; - private final static int pageFaultsLONG = 1; - private final static int pageFileSizeLONG = 2; - private final static int pageFileSizePeakLONG = 3; - private final static int privateSizeLONG = 4; - private final static int systemTimeLONG = 5; - private final static int userTimeLONG = 6; - private final static int virtualSizeLONG = 7; - private final static int virtualSizePeakLONG = 8; - private final static int workingSetSizeLONG = 9; - private final static int workingSetSizePeakLONG = 10; - - private final static StatisticsType myType; - - private static void checkOffset(String name, int offset) { - int id = myType.nameToId(name); - Assert.assertTrue(offset == id, "Expected the offset for " + name + " to be " + offset + " but it was " + id); - } - - static { - StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton(); - myType = f - .createType( - "WindowsProcessStats", - "Statistics on a Microsoft Window's process.", - new StatisticDescriptor[] { - f.createIntGauge( - "handles", - "The total number of handles currently open by this process. This number is the sum of the handles currently open by each thread in this process.", - "items"), - f.createIntGauge( - "priorityBase", - "The current base priority of the process. Threads within a process can raise and lower their own base priority relative to the process's base priority", - "priority"), - f.createIntGauge( - "threads", - "Number of threads currently active in this process. An instruction is the basic unit of execution in a processor, and a thread is the object that executes instructions. Every running process has at least one thread.", - "threads"), - - f.createLongCounter( - "activeTime", - "The elapsed time in milliseconds that all of the threads of this process used the processor to execute instructions. An instruction is the basic unit of execution in a computer, a thread is the object that executes instructions, and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions are included in this count.", - "milliseconds", false), - - f.createLongCounter( - "pageFaults", - "The total number of Page Faults by the threads executing in this process. A page fault occurs when a thread refers to a virtual memory page that is not in its working set in main memory. This will not cause the page to be fetched from disk if it is on the standby list and hence already in main memory, or if it is in use by another process with whom the page is shared.", - "operations", false), - f.createLongGauge( - "pageFileSize", - "The current number of bytes this process has used in the paging file(s). Paging files are used to store pages of memory used by the process that are not contained in other files. Paging files are shared by all processes, and lack of space in paging files can prevent other processes from allocating memory.", - "bytes"), - f.createLongGauge( - "pageFileSizePeak", - "The maximum number of bytes this process has used in the paging file(s). Paging files are used to store pages of memory used by the process that are not contained in other files. Paging files are shared by all processes, and lack of space in paging files can prevent other processes from allocating memory.", - "bytes"), - f.createLongGauge( - "privateSize", - "The current number of bytes this process has allocated that cannot be shared with other processes.", - "bytes"), - f.createLongCounter( - "systemTime", - "The elapsed time in milliseconds that the threads of the process have spent executing code in privileged mode. When a Windows system service is called, the service will often run in Privileged Mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process.", - "milliseconds", false), - f.createLongCounter( - "userTime", - "The elapsed time in milliseconds that this process's threads have spent executing code in user mode. Applications, environment subsystems, and integral subsystems execute in user mode. Code executing in User Mode cannot damage the integrity of the Windows Executive, Kernel, and device drivers. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process.", - "milliseconds", false), - f.createLongGauge( - "virtualSize", - "Virtual Bytes is the current size in bytes of the virtual address space the process is using. Use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is finite, and by using too much, the process can limit its ability to load libraries.", - "bytes"), - f.createLongGauge( - "virtualSizePeak", - "The maximum number of bytes of virtual address space the process has used at any one time. Use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is however finite, and by using too much, the process might limit its ability to load libraries.", - "bytes"), - f.createLongGauge( - "workingSetSize", - "The current number of bytes in the Working Set of this process. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before they are paged out out to disk.", - "bytes"), - f.createLongGauge( - "workingSetSizePeak", - "The maximum number of bytes in the Working Set of this process at any point in time. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before they leave main memory.", - "bytes"), - - }); - checkOffset("handles", handlesINT); - checkOffset("priorityBase", priorityBaseINT); - checkOffset("threads", threadsINT); - - checkOffset("activeTime", activeTimeLONG); - checkOffset("pageFaults", pageFaultsLONG); - checkOffset("pageFileSize", pageFileSizeLONG); - checkOffset("pageFileSizePeak", pageFileSizePeakLONG); - checkOffset("privateSize", privateSizeLONG); - checkOffset("systemTime", systemTimeLONG); - checkOffset("userTime", userTimeLONG); - checkOffset("virtualSize", virtualSizeLONG); - checkOffset("virtualSizePeak", virtualSizePeakLONG); - checkOffset("workingSetSize", workingSetSizeLONG); - checkOffset("workingSetSizePeak", workingSetSizePeakLONG); - } - - private WindowsProcessStats() { - // no instances allowed - } - public static StatisticsType getType() { - return myType; - } - - /** - * Returns a ProcessStats that wraps Windows process - * Statistics. - * - * @since GemFire 3.5 - */ - static ProcessStats createProcessStats(final Statistics stats) { - if (stats instanceof LocalStatisticsImpl) { - HostStatHelper.refresh((LocalStatisticsImpl) stats); - } // otherwise its a Dummy implementation so do nothing - return new ProcessStats(stats) { - @Override - public long getProcessSize() { - return stats.getLong(workingSetSizeLONG) / (1024*1024); - } - }; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsSystemStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsSystemStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsSystemStats.java deleted file mode 100644 index 1325fcc..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/WindowsSystemStats.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.gemstone.gemfire.internal; - -import com.gemstone.gemfire.*; - -/** - *

This class provides the interface for statistics about the - * Windows machine a GemFire system is running on. - */ -public class WindowsSystemStats -{ - private final static int committedMemoryInUseINT = 0; - private final static int eventsINT = 1; - private final static int interruptsINT = 2; - private final static int mutexesINT = 3; - private final static int processesINT = 4; - private final static int processorQueueLengthINT = 5; - private final static int registryQuotaInUseINT = 6; - private final static int sharedMemorySectionsINT = 7; - private final static int semaphoresINT = 8; - private final static int threadsINT = 9; - private final static int dgramsReceivedINT = 10; - private final static int dgramsNoPortINT = 11; - private final static int dgramsReceivedErrorsINT = 12; - private final static int dgramsSentINT = 13; - private final static int loopbackPacketsINT = 14; - private final static int loopbackBytesINT = 15; - private final static int netPacketsReceivedINT = 16; - private final static int netBytesReceivedINT = 17; - private final static int netPacketsSentINT = 18; - private final static int netBytesSentINT = 19; - - - private final static int availableMemoryLONG = 0; - private final static int cacheFaultsLONG = 1; - private final static int cacheSizeLONG = 2; - private final static int cacheSizePeakLONG = 3; - private final static int committedMemoryLONG = 4; - private final static int committedMemoryLimitLONG = 5; - private final static int contextSwitchesLONG = 6; - private final static int demandZeroFaultsLONG = 7; - private final static int pageFaultsLONG = 8; - private final static int pageReadsLONG = 9; - private final static int pagesLONG = 10; - private final static int pageWritesLONG = 11; - private final static int pagesInputLONG = 12; - private final static int pagesOutputLONG = 13; - private final static int systemCallsLONG = 14; - - private final static int cpuActiveDOUBLE = 0; - private final static int cpuIdleDOUBLE = 1; - private final static int cpuInterruptDOUBLE = 2; - private final static int cpuSystemDOUBLE = 3; - private final static int cpuUserDOUBLE = 4; - - private final static StatisticsType myType; - - private static void checkOffset(String name, int offset) { - int id = myType.nameToId(name); - Assert.assertTrue(offset == id, "Expected the offset for " + name + " to be " + offset + " but it was " + id); - } - - static { - StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton(); - myType = f.createType("WindowsSystemStats", - "Statistics on a Microsoft Windows machine.", - new StatisticDescriptor[] { - f.createIntGauge("committedMemoryInUse", - "This represents the percentage of available virtual memory in use. This is an instantaneous value, not an average.", - "%"), - f.createIntGauge("events", - "The number of events in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. An event is used when two or more threads wish to synchronize execution.", - "items"), - f.createIntCounter("interrupts", - "The total number of harware interrupts on the computer. Some devices that may generate interrupts are the system timer, the mouse, data communication lines, network interface cards and other peripheral devices. This counter provides an indication of how busy these devices are on a computer-wide basis.", - "operations", false), - f.createIntGauge("mutexes", - "The number of mutexes in the computer at the time of data collection. This is an instantaneous count, not an average over the time interval. Mutexes are used by threads to assure only one thread is executing some section of code.", - "items"), - f.createIntGauge("processes", - "The number of processes in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. Each process represents the running of a program.", - "processes"), - f.createIntGauge("processorQueueLength", - "The instantaneous length of the processor queue in units of threads. All processors use a single queue in which threads wait for processor cycles. This length does not include the threads that are currently executing. A sustained processor queue length greater than two generally indicates processor congestion. This is an instantaneous count, not an average over the time interval", - "threads"), - f.createIntGauge("registryQuotaInUse", - "The percentage of the Total Registry Quota Allowed currently in use by the system.", - "%"), - f.createIntGauge("sharedMemorySections", - "The number of sections in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. A section is a portion of virtual memory created by a process for storing data. A process may share sections with other processes.", - "items"), - f.createIntGauge("semaphores", - "The number of semaphores in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. Threads use semaphores to obtain exclusive access to data structures that they share with other threads.", - "items"), - f.createIntGauge("threads", - "The number of threads in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. A thread is the basic executable entity that can execute instructions in a processor.", - "threads"), - f.createIntCounter( - "dgramsReceived", - "The number of datagrams received on the VM's machine.", - "datagrams/sec"), - f.createIntCounter( - "dgramsNoPort", - "The number of incoming datagrams that were discarded due to invalid headers", - "datagrams/sec"), - f.createIntCounter( - "dgramsReceivedErrors", - "The number of received UDP datagrams that could not be delivered for reasons other than the lack of an application at the destination port", - "datagrams"), - f.createIntCounter( - "dgramsSent", - "The number of datagrams sent on the VM's machine", - "datagrams/sec"), - - f.createIntCounter( - "loopbackPackets", - "The number of packets sent/received on the loopback interface", - "packets"), - f.createIntCounter( - "loopbackBytes", - "The number of bytes sent/received on the loopback interface", - "bytes"), - f.createIntCounter("netPacketsReceived", - "The number of network packets received (total excluding loopback)", - "packets"), - f.createIntCounter("netBytesReceived", - "The number of network bytes received (total excluding loopback)", - "bytes"), - f.createIntCounter("netPacketsSent", - "The number of network packets sent (total excluding loopback)", - "packets"), - f.createIntCounter("netBytesSent", - "The number of network bytes sent (total excluding loopback)", - "bytes"), - - f.createLongGauge("availableMemory", - "The size, in bytes, of the virtual memory currently on the Zeroed, Free, and Standby lists. Zeroed and Free memory is ready for use, with Zeroed memory cleared to zeros. Standby memory is memory removed from a process's Working Set but still available. Notice that this is an instantaneous count, not an average over the time interval.", - "bytes", true), - f.createLongCounter("cacheFaults", - "Incremented whenever the Cache manager does not find a file's page in the immediate Cache and must ask the memory manager to locate the page elsewhere in memory or on the disk so that it can be loaded into the immediate Cache.", - "operations", false), - f.createLongGauge("cacheSize", - "Measures the number of bytes currently in use by the system Cache. The system Cache is used to buffer data retrieved from disk or LAN. The system Cache uses memory not in use by active processes in the computer.", - "bytes"), - f.createLongGauge("cacheSizePeak", - "Measures the maximum number of bytes used by the system Cache. The system Cache is used to buffer data retrieved from disk or LAN. The system Cache uses memory not in use by active processes in the computer.", - "bytes"), - f.createLongGauge("committedMemory", - "The size of virtual memory, in bytes, that has been Committed (as opposed to simply reserved). Committed memory must have backing (i.e., disk) storage available, or must be assured never to need disk storage (because main memory is large enough to hold it.) Notice that this is an instantaneous count, not an average over the time interval.", - "bytes"), - f.createLongGauge("committedMemoryLimit", - "The size, in bytes, of virtual memory that can be committed without having to extend the paging file(s). If the paging file(s) can be extended, this is a soft limit. Note that this value will change if the paging file is extended.", - "bytes"), - f.createLongCounter("contextSwitches", - "The number of times this thread has lost the cpu to another thread. Thread switches can occur either inside of a single process or across processes. A thread switch may be caused either by one thread asking another for information, or by a thread being preempted by another, higher priority thread becoming ready to run. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of User and Privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows on behalf of an application may appear in other subsystem processes in addition to the Privileged Time in the application. Switching to the subsystem process causes one Context Switch in the application thread. Switching back causes another Context Switch in the subsystem thread.", - "operations", false), - f.createLongCounter("demandZeroFaults", - "The total number of page faults for pages that must be filled with zeros before the fault is satisfied. If the Zeroed list is not empty, the fault can be resolved by removing a page from the Zeroed list.", - "operations", false), - f.createLongCounter("pageFaults", - "The total number of Page Faults by the threads executing in this process. A page fault occurs when a thread refers to a virtual memory page that is not in its working set in main memory. This will not cause the page to be fetched from disk if it is on the standby list and hence already in main memory, or if it is in use by another process with whom the page is shared.", - "operations", false), - f.createLongCounter("pageReads", - "The number of page read operations done by the process since it was last started. These operations involve actual disk reads and not reads from the shared page cache", - "operations", false), - f.createLongCounter("pages", - "The total number of pages read from the disk or written to the disk to resolve memory references to pages that were not in memory at the time of the reference. This is the sum of pagesInput and the pagesOutput. This counter includes paging traffic on behalf of the system Cache to access file data for applications. This value also includes the pages to/from non-cached mapped memory files. This is the primary counter to observe if you are concerned about excessive memory pressure (that is, thrashing), and the excessive paging that may result.", - "pages", false), - f.createLongCounter("pageWrites", - "The number of pages written by the process since it was last started. These page writes are actual disk writes and not just writes into the shared page cache. Unless a large data load is in process, the number should be low for all processes except the Stone's AIO page server process.", - "operations", false), - f.createLongCounter("pagesInput", - "The total number of pages read from the disk to resolve memory references to pages that were not in memory at the time of the reference. This counter includes paging traffic on behalf of the system Cache to access file data for applications. This is an important counter to observe if you are concerned about excessive memory pressure (that is, thrashing), and the excessive paging that may result", - "pages", false), - f.createLongCounter("pagesOutput", - "A count of the total number of pages that are written to disk because the pages have been modified in main memory", - "pages", false), - f.createLongCounter("systemCalls", - "The total number of calls to Windows system service routines on the computer. These routines perform all of the basic scheduling and synchronization of activities on the computer, and provide access to non-graphical devices, memory management, and name space management.", - "operations"), - - - - f.createDoubleGauge("cpuActive", - "The percentage of time spent doing useful work by all processors. On a multi-processor system, if all processors are always busy this is 100%.", - "%"), - f.createDoubleGauge("cpuIdle", - "The percentage of time the machine's processors spent idle.", - "%", true), - f.createDoubleGauge("cpuInterrupt", - "The percentage of time spent receiving and servicing interrupts on all the processors on the machine. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. ", - "%"), - f.createDoubleGauge("cpuSystem", - "The percentage of time spent in privileged mode by all processors. On a multi-processor system, if all processors are always in privileged mode this is 100%. When a Windows system service is called, the service will often run in privileged mode in order to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system may be explicit, or they may be implicit such as when a page fault or an interrupt occurs. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows on behalf of an application may appear in other subsystem processes in addition to the cpuSystem in the application process.", - "%"), - f.createDoubleGauge("cpuUser", - "The percentage of time spent executing code in user mode on all the processor's on the machine.", - "%") - }); - checkOffset("committedMemoryInUse", committedMemoryInUseINT); - checkOffset("events", eventsINT); - checkOffset("interrupts", interruptsINT); - checkOffset("mutexes", mutexesINT); - checkOffset("processes", processesINT); - checkOffset("processorQueueLength", processorQueueLengthINT); - checkOffset("registryQuotaInUse", registryQuotaInUseINT); - checkOffset("sharedMemorySections", sharedMemorySectionsINT); - checkOffset("semaphores", semaphoresINT); - checkOffset("threads", threadsINT); - checkOffset("dgramsReceived", dgramsReceivedINT); - checkOffset("dgramsNoPort", dgramsNoPortINT); - checkOffset("dgramsReceivedErrors", dgramsReceivedErrorsINT); - checkOffset("dgramsSent", dgramsSentINT); - - checkOffset("loopbackPackets", loopbackPacketsINT); - checkOffset("loopbackBytes", loopbackBytesINT); - checkOffset("netPacketsReceived", netPacketsReceivedINT); - checkOffset("netBytesReceived", netBytesReceivedINT); - checkOffset("netPacketsSent", netPacketsSentINT); - checkOffset("netBytesSent", netBytesSentINT); - - checkOffset("availableMemory", availableMemoryLONG); - checkOffset("cacheFaults", cacheFaultsLONG); - checkOffset("cacheSize", cacheSizeLONG); - checkOffset("cacheSizePeak", cacheSizePeakLONG); - checkOffset("committedMemory", committedMemoryLONG); - checkOffset("committedMemoryLimit", committedMemoryLimitLONG); - checkOffset("contextSwitches", contextSwitchesLONG); - checkOffset("demandZeroFaults", demandZeroFaultsLONG); - checkOffset("pageFaults", pageFaultsLONG); - checkOffset("pageReads", pageReadsLONG); - checkOffset("pages", pagesLONG); - checkOffset("pageWrites", pageWritesLONG); - checkOffset("pagesInput", pagesInputLONG); - checkOffset("pagesOutput", pagesOutputLONG); - checkOffset("systemCalls", systemCallsLONG); - - checkOffset("cpuActive", cpuActiveDOUBLE); - checkOffset("cpuIdle", cpuIdleDOUBLE); - checkOffset("cpuInterrupt", cpuInterruptDOUBLE); - checkOffset("cpuSystem", cpuSystemDOUBLE); - checkOffset("cpuUser", cpuUserDOUBLE); - } - - private WindowsSystemStats() { - // no instances allowed - } - public static StatisticsType getType() { - return myType; - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AddStatListenerResponse.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AddStatListenerResponse.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AddStatListenerResponse.java index 7ea19f5..078798f 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AddStatListenerResponse.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AddStatListenerResponse.java @@ -19,12 +19,12 @@ package com.gemstone.gemfire.internal.admin.remote; //import com.gemstone.gemfire.*; -import com.gemstone.gemfire.internal.*; //import com.gemstone.gemfire.internal.admin.*; import com.gemstone.gemfire.distributed.internal.*; import java.io.*; //import java.util.*; import com.gemstone.gemfire.distributed.internal.membership.*; +import com.gemstone.gemfire.internal.statistics.GemFireStatSampler; /** * A message that is sent to a particular distribution manager to http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminConsoleDisconnectMessage.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminConsoleDisconnectMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminConsoleDisconnectMessage.java index 2f8d336..a1d3680 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminConsoleDisconnectMessage.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminConsoleDisconnectMessage.java @@ -28,7 +28,7 @@ import com.gemstone.gemfire.DataSerializer; import com.gemstone.gemfire.distributed.internal.DistributionManager; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.distributed.internal.PooledDistributionMessage; -import com.gemstone.gemfire.internal.GemFireStatSampler; +import com.gemstone.gemfire.internal.statistics.GemFireStatSampler; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import com.gemstone.gemfire.internal.logging.LogService; import com.gemstone.gemfire.internal.logging.log4j.AlertAppender; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/CancelStatListenerResponse.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/CancelStatListenerResponse.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/CancelStatListenerResponse.java index d338b70..a223524 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/CancelStatListenerResponse.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/CancelStatListenerResponse.java @@ -19,13 +19,13 @@ package com.gemstone.gemfire.internal.admin.remote; //import com.gemstone.gemfire.*; -import com.gemstone.gemfire.internal.*; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; //import com.gemstone.gemfire.internal.admin.*; import com.gemstone.gemfire.distributed.internal.*; import java.io.*; //import java.util.*; import com.gemstone.gemfire.distributed.internal.membership.*; +import com.gemstone.gemfire.internal.statistics.GemFireStatSampler; /** * A message that is sent to a particular distribution manager to http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteStat.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteStat.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteStat.java index cdc2b88..6127e45 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteStat.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteStat.java @@ -18,8 +18,8 @@ package com.gemstone.gemfire.internal.admin.remote; import com.gemstone.gemfire.*; -import com.gemstone.gemfire.internal.*; import com.gemstone.gemfire.internal.admin.*; +import com.gemstone.gemfire.internal.statistics.StatisticDescriptorImpl; //import java.util.*; import java.io.*; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html index a2fef69..a47f53d 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html @@ -34,7 +34,7 @@ relationships between the various classes in this package.

Statistics

StatListeners are assigned a {@link -com.gemstone.gemfire.internal.GemFireStatSampler#addListener} unique +com.gemstone.gemfire.internal.statistics.GemFireStatSampler#addListener} unique id} in the remote VM. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachePerfStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachePerfStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachePerfStats.java index 72a850d..532bafa 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachePerfStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachePerfStats.java @@ -21,6 +21,7 @@ import com.gemstone.gemfire.*; import com.gemstone.gemfire.internal.*; import com.gemstone.gemfire.distributed.internal.PoolStatHelper; import com.gemstone.gemfire.distributed.internal.QueueStatHelper; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * CachePerfStats tracks statistics about GemFire cache performance. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskDirectoryStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskDirectoryStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskDirectoryStats.java index 21a7b26..a0d7022 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskDirectoryStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskDirectoryStats.java @@ -19,7 +19,7 @@ package com.gemstone.gemfire.internal.cache; import com.gemstone.gemfire.*; //import com.gemstone.gemfire.internal.NanoTimer; //import com.gemstone.gemfire.cache.Region; -import com.gemstone.gemfire.internal.*; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * GemFire statistics about Disk Directories http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegionStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegionStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegionStats.java index ae9b0a9..014fd6f 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegionStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegionStats.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.Statistics; import com.gemstone.gemfire.StatisticsFactory; import com.gemstone.gemfire.StatisticsType; import com.gemstone.gemfire.StatisticsTypeFactory; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * GemFire statistics about a {@link DiskRegion}. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreStats.java index db505b9..e5f4bb2 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreStats.java @@ -18,8 +18,8 @@ package com.gemstone.gemfire.internal.cache; import com.gemstone.gemfire.*; //import com.gemstone.gemfire.cache.Region; -import com.gemstone.gemfire.internal.*; import com.gemstone.gemfire.distributed.internal.DistributionStats; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * GemFire statistics about a {@link DiskStoreImpl}. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStats.java index 04d432f..c6f1243 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStats.java @@ -27,7 +27,7 @@ import com.gemstone.gemfire.StatisticsFactory; import com.gemstone.gemfire.StatisticsType; import com.gemstone.gemfire.StatisticsTypeFactory; import com.gemstone.gemfire.cache.Region; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * Represents a statistics type that can be archived to vsd. Loading of this http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java index 2161de7..e53b61c 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java @@ -18,7 +18,7 @@ package com.gemstone.gemfire.internal.cache; import com.gemstone.gemfire.*; import com.gemstone.gemfire.distributed.internal.DistributionStats; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; import static com.gemstone.gemfire.distributed.ConfigurationProperties.LOCATORS; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java index bc83335..eeaad42 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java @@ -22,10 +22,10 @@ import com.gemstone.gemfire.cache.CacheClosedException; import com.gemstone.gemfire.cache.query.internal.QueryMonitor; import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; -import com.gemstone.gemfire.internal.GemFireStatSampler; -import com.gemstone.gemfire.internal.LocalStatListener; +import com.gemstone.gemfire.internal.statistics.GemFireStatSampler; +import com.gemstone.gemfire.internal.statistics.LocalStatListener; import com.gemstone.gemfire.internal.SetUtils; -import com.gemstone.gemfire.internal.StatisticsImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsImpl; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType; import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState; @@ -759,7 +759,7 @@ public void stopMonitoring() { class LocalHeapStatListener implements LocalStatListener { /* (non-Javadoc) - * @see com.gemstone.gemfire.internal.LocalStatListener#statValueChanged(double) + * @see com.gemstone.gemfire.internal.statistics.LocalStatListener#statValueChanged(double) */ @Override @SuppressWarnings("synthetic-access") http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/ResourceManagerStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/ResourceManagerStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/ResourceManagerStats.java index d54e7c4..3281273 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/ResourceManagerStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/ResourceManagerStats.java @@ -23,7 +23,7 @@ import com.gemstone.gemfire.StatisticsType; import com.gemstone.gemfire.StatisticsTypeFactory; import com.gemstone.gemfire.distributed.internal.PoolStatHelper; import com.gemstone.gemfire.distributed.internal.QueueStatHelper; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * Contains methods for manipulating resource manager statistics. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStats.java index e62d800..b4ad43b 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStats.java @@ -22,8 +22,8 @@ import com.gemstone.gemfire.StatisticsFactory; import com.gemstone.gemfire.StatisticsType; import com.gemstone.gemfire.StatisticsTypeFactory; import com.gemstone.gemfire.distributed.internal.DistributionStats; -import com.gemstone.gemfire.internal.DummyStatisticsImpl; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.DummyStatisticsImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; public class FunctionServiceStats { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java index 0e7687a..88a8b10 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java @@ -20,9 +20,8 @@ import com.gemstone.gemfire.*; import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.distributed.internal.DistributionStats; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; -import com.gemstone.gemfire.internal.DummyStatisticsImpl; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; -import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; +import com.gemstone.gemfire.internal.statistics.DummyStatisticsImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; public class FunctionStats { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStats.java index e7b74d1..150c080 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStats.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStats.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.Statistics; import com.gemstone.gemfire.StatisticsFactory; import com.gemstone.gemfire.StatisticsType; import com.gemstone.gemfire.StatisticsTypeFactory; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; /** * This class tracks GemFire statistics related to a {@link HARegionQueue}. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java index 7bf2d1f..a2a7be1 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java @@ -25,7 +25,7 @@ import com.gemstone.gemfire.cache.EvictionAlgorithm; import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.util.ObjectSizer; import com.gemstone.gemfire.distributed.internal.DistributionConfig; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.cache.control.InternalResourceManager; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/LRUCapacityController.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/LRUCapacityController.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/LRUCapacityController.java index 0e5afab..ffbc4ad 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/LRUCapacityController.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/LRUCapacityController.java @@ -18,7 +18,7 @@ package com.gemstone.gemfire.internal.cache.lru; import com.gemstone.gemfire.*; import com.gemstone.gemfire.cache.*; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/MemLRUCapacityController.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/MemLRUCapacityController.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/MemLRUCapacityController.java index d1634b4..6cfa582 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/MemLRUCapacityController.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/MemLRUCapacityController.java @@ -29,7 +29,7 @@ import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.RegionAttributes; import com.gemstone.gemfire.cache.util.ObjectSizer; import com.gemstone.gemfire.internal.ClassPathLoader; -import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl; +import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; import com.gemstone.gemfire.internal.cache.AbstractLRURegionMap.CDValueWrapper; import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory; import com.gemstone.gemfire.internal.cache.Token; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7334c131/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java index edf3a94..6fd4560 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java @@ -81,7 +81,7 @@ import com.gemstone.gemfire.distributed.internal.MessageWithReply; import com.gemstone.gemfire.distributed.internal.ReplyMessage; import com.gemstone.gemfire.distributed.internal.ReplyProcessor21; import com.gemstone.gemfire.internal.ClassLoadUtil; -import com.gemstone.gemfire.internal.DummyStatisticsFactory; +import com.gemstone.gemfire.internal.statistics.DummyStatisticsFactory; import com.gemstone.gemfire.internal.InternalDataSerializer; import com.gemstone.gemfire.internal.InternalInstantiator; import com.gemstone.gemfire.internal.SocketCloser;