geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [21/24] incubator-geode git commit: GEODE-1781: refactor internal statistics classes
Date Wed, 17 Aug 2016 23:46:19 GMT
GEODE-1781: refactor internal statistics classes

* move internal statistics classes into com.gemstone.gemfire.internal.
statistics

* move statistics tests into com.gemstone.gemfire.internal.statistics

* modify tests to include integration and distributed in names

* modify tests to use TemporaryFolder and TestName rules


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/750996a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/750996a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/750996a0

Branch: refs/heads/feature/GEODE-1781-02
Commit: 750996a09d003b2bd7103cb59a2eaef13661b29a
Parents: a5daa92
Author: Kirk Lund <klund@apache.org>
Authored: Wed Aug 17 16:45:06 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Wed Aug 17 16:45:06 2016 -0700

----------------------------------------------------------------------
 .../internal/DeltaSessionStatistics.java        |    2 +-
 .../gemfire/modules/util/ModuleStatistics.java  |    2 +-
 .../com/gemstone/gemfire/StatisticsFactory.java |    2 +-
 .../gemstone/gemfire/StatisticsTypeFactory.java |    2 +-
 .../admin/internal/MemberHealthEvaluator.java   |    2 +
 .../internal/AsyncEventQueueStats.java          |    2 +-
 .../cache/client/internal/ConnectionStats.java  |    2 +-
 .../client/internal/EndpointManagerImpl.java    |    2 +-
 .../gemfire/cache/client/internal/PoolImpl.java |    2 +-
 .../cache/query/internal/CqQueryVsdStats.java   |    2 +-
 .../cache/query/internal/index/IndexStats.java  |    2 +-
 .../distributed/internal/DistributionStats.java |    2 +-
 .../internal/InternalDistributedSystem.java     |    8 +
 .../distributed/internal/LocatorStats.java      |    2 +-
 .../distributed/internal/locks/DLockStats.java  |    2 +-
 .../internal/AbstractStatisticsFactory.java     |  327 --
 .../gemfire/internal/ArchiveSplitter.java       |  522 ---
 .../internal/DummyStatisticsFactory.java        |  134 -
 .../gemfire/internal/DummyStatisticsImpl.java   |  242 --
 .../gemfire/internal/GemFireStatSampler.java    |  502 ---
 .../gemfire/internal/HostStatHelper.java        |  289 --
 .../gemfire/internal/HostStatSampler.java       |  550 ---
 .../gemfire/internal/LinuxProcFsStatistics.java |  783 ----
 .../gemfire/internal/LinuxProcessStats.java     |   79 -
 .../gemfire/internal/LinuxSystemStats.java      |  311 --
 .../gemfire/internal/LocalStatListener.java     |   40 -
 .../internal/LocalStatisticsFactory.java        |   99 -
 .../gemfire/internal/LocalStatisticsImpl.java   |  268 --
 .../gemfire/internal/OSXProcessStats.java       |   83 -
 .../gemfire/internal/OSXSystemStats.java        |  228 --
 .../gemfire/internal/OsStatisticsFactory.java   |   41 -
 .../gemstone/gemfire/internal/ProcessStats.java |   60 -
 .../gemfire/internal/SimpleStatSampler.java     |  112 -
 .../gemfire/internal/SolarisProcessStats.java   |  217 --
 .../gemfire/internal/SolarisSystemStats.java    |  428 ---
 .../gemfire/internal/StatArchiveFormat.java     |  197 --
 .../gemfire/internal/StatArchiveReader.java     | 3338 -----------------
 .../gemfire/internal/StatArchiveWriter.java     |  733 ----
 .../gemfire/internal/StatSamplerStats.java      |  153 -
 .../internal/StatisticDescriptorImpl.java       |  383 --
 .../gemfire/internal/StatisticsImpl.java        |  589 ---
 .../gemfire/internal/StatisticsManager.java     |   78 -
 .../internal/StatisticsTypeFactoryImpl.java     |  140 -
 .../gemfire/internal/StatisticsTypeImpl.java    |  258 --
 .../gemfire/internal/StatisticsTypeXml.java     |  280 --
 .../gemstone/gemfire/internal/SystemAdmin.java  |    7 +-
 .../com/gemstone/gemfire/internal/VMStats.java  |   87 -
 .../gemfire/internal/VMStatsContract.java       |   36 -
 .../internal/VMStatsContractFactory.java        |   60 -
 .../gemfire/internal/WindowsProcessStats.java   |  160 -
 .../gemfire/internal/WindowsSystemStats.java    |  267 --
 .../admin/remote/AddStatListenerResponse.java   |    2 +-
 .../remote/AdminConsoleDisconnectMessage.java   |    2 +-
 .../remote/CancelStatListenerResponse.java      |    2 +-
 .../internal/admin/remote/RemoteStat.java       |    2 +-
 .../gemfire/internal/admin/remote/package.html  |    2 +-
 .../gemfire/internal/cache/CachePerfStats.java  |    1 +
 .../internal/cache/DiskDirectoryStats.java      |    2 +-
 .../gemfire/internal/cache/DiskRegionStats.java |    2 +-
 .../gemfire/internal/cache/DiskStoreStats.java  |    2 +-
 .../internal/cache/PartitionedRegionStats.java  |    2 +-
 .../gemfire/internal/cache/PoolStats.java       |    2 +-
 .../cache/control/HeapMemoryMonitor.java        |    8 +-
 .../cache/control/ResourceManagerStats.java     |    2 +-
 .../cache/execute/FunctionServiceStats.java     |    4 +-
 .../internal/cache/execute/FunctionStats.java   |    5 +-
 .../internal/cache/ha/HARegionQueueStats.java   |    2 +-
 .../cache/lru/HeapLRUCapacityController.java    |    2 +-
 .../cache/lru/LRUCapacityController.java        |    2 +-
 .../cache/lru/MemLRUCapacityController.java     |    2 +-
 .../cache/tier/sockets/CacheClientNotifier.java |    2 +-
 .../tier/sockets/CacheClientNotifierStats.java  |    3 +-
 .../tier/sockets/CacheClientProxyStats.java     |    2 +-
 .../cache/tier/sockets/CacheClientUpdater.java  |    1 +
 .../cache/tier/sockets/CacheServerStats.java    |   11 +-
 .../internal/cache/wan/GatewaySenderStats.java  |    2 +-
 .../gemfire/internal/concurrent/Atomics.java    |    6 +-
 .../internal/offheap/OffHeapStorage.java        |    2 +-
 .../statistics/AbstractStatisticsFactory.java   |  327 ++
 .../internal/statistics/ArchiveSplitter.java    |  522 +++
 .../internal/statistics/CallbackSampler.java    |    3 -
 .../statistics/DummyStatisticsFactory.java      |  135 +
 .../statistics/DummyStatisticsImpl.java         |  242 ++
 .../internal/statistics/GemFireStatSampler.java |  507 +++
 .../internal/statistics/HostStatHelper.java     |  303 ++
 .../internal/statistics/HostStatSampler.java    |  549 +++
 .../statistics/IgnoreResourceException.java     |    2 +-
 .../internal/statistics/LocalStatListener.java  |   40 +
 .../statistics/LocalStatisticsFactory.java      |  103 +
 .../statistics/LocalStatisticsImpl.java         |  272 ++
 .../internal/statistics/ResourceInstance.java   |    2 +-
 .../internal/statistics/ResourceType.java       |    2 +-
 .../internal/statistics/SimpleStatSampler.java  |  112 +
 .../statistics/StatArchiveDescriptor.java       |    4 +-
 .../internal/statistics/StatArchiveFormat.java  |  197 ++
 .../internal/statistics/StatArchiveHandler.java |    9 +-
 .../statistics/StatArchiveHandlerConfig.java    |    2 +-
 .../internal/statistics/StatArchiveReader.java  | 3339 ++++++++++++++++++
 .../internal/statistics/StatArchiveWriter.java  |  732 ++++
 .../internal/statistics/StatSamplerStats.java   |  153 +
 .../statistics/StatisticDescriptorImpl.java     |  383 ++
 .../internal/statistics/StatisticsImpl.java     |  588 +++
 .../internal/statistics/StatisticsManager.java  |   78 +
 .../statistics/StatisticsTypeFactoryImpl.java   |  140 +
 .../internal/statistics/StatisticsTypeImpl.java |  258 ++
 .../internal/statistics/StatisticsTypeXml.java  |  282 ++
 .../gemfire/internal/statistics/VMStats.java    |   87 +
 .../internal/statistics/VMStatsContract.java    |   36 +
 .../statistics/VMStatsContractFactory.java      |   60 +
 .../internal/statistics/ValueMonitor.java       |    1 -
 .../gemfire/internal/statistics/package.html    |    4 +-
 .../platform/LinuxProcFsStatistics.java         |  783 ++++
 .../statistics/platform/LinuxProcessStats.java  |   84 +
 .../statistics/platform/LinuxSystemStats.java   |  313 ++
 .../statistics/platform/OSXProcessStats.java    |   87 +
 .../statistics/platform/OSXSystemStats.java     |  230 ++
 .../platform/OsStatisticsFactory.java           |   41 +
 .../statistics/platform/ProcessStats.java       |   60 +
 .../platform/SolarisProcessStats.java           |  222 ++
 .../statistics/platform/SolarisSystemStats.java |  430 +++
 .../platform/WindowsProcessStats.java           |  165 +
 .../statistics/platform/WindowsSystemStats.java |  269 ++
 .../stats50/Atomic50StatisticsImpl.java         |    4 +
 .../gemfire/internal/stats50/VMStats50.java     |    4 +-
 .../internal/beans/MemberMBeanBridge.java       |    8 +
 .../com/gemstone/gemfire/GemFireTestCase.java   |   91 -
 .../java/com/gemstone/gemfire/Invariant.java    |   31 -
 .../com/gemstone/gemfire/InvariantResult.java   |   27 -
 .../gemfire/LocalStatisticsJUnitTest.java       |   50 -
 .../gemstone/gemfire/StatisticsTestCase.java    |  388 --
 .../gemfire/StatisticsTypeJUnitTest.java        |   76 -
 .../MemberHealthEvaluatorJUnitTest.java         |    4 +-
 .../management/MemoryThresholdsDUnitTest.java   |    6 +-
 .../codeAnalysis/decode/CompiledClass.java      |    2 +-
 .../internal/DataSerializableJUnitTest.java     |    1 +
 .../internal/GemFireStatSamplerJUnitTest.java   |  612 ----
 .../internal/LocalStatisticsImplJUnitTest.java  |  139 -
 .../internal/SimpleStatSamplerJUnitTest.java    |  357 --
 .../StatArchiveWriterReaderJUnitTest.java       | 1728 ---------
 .../gemfire/internal/StatSamplerJUnitTest.java  |  367 --
 .../gemfire/internal/StatSamplerTestCase.java   |  184 -
 .../internal/cache/lru/LRUClockJUnitTest.java   |    2 +-
 .../offheap/OffHeapStorageJUnitTest.java        |    2 +-
 .../statistics/CallbackSamplerJUnitTest.java    |   98 -
 .../statistics/CallbackSamplerTest.java         |   98 +
 ...tributedSystemStatisticsIntegrationTest.java |  271 ++
 ...utedSystemStatisticsTypeIntegrationTest.java |   90 +
 .../GemFireStatSamplerIntegrationTest.java      |  612 ++++
 .../statistics/SampleCollectorJUnitTest.java    |  322 --
 .../statistics/SampleCollectorTest.java         |  322 ++
 .../SimpleStatSamplerIntegrationTest.java       |  351 ++
 .../StatArchiveWriterReaderIntegrationTest.java | 1634 +++++++++
 .../statistics/StatMonitorHandlerJUnitTest.java |  236 --
 .../statistics/StatMonitorHandlerTest.java      |  235 ++
 .../statistics/StatSamplerIntegrationTest.java  |  363 ++
 .../statistics/StatSamplerTestCase.java         |  185 +
 .../statistics/StatisticsDUnitTest.java         |  947 -----
 .../statistics/StatisticsDistributedTest.java   |  851 +++++
 .../internal/statistics/StatisticsImplTest.java |  136 +
 .../statistics/StatisticsMonitorJUnitTest.java  |  198 --
 .../statistics/StatisticsMonitorTest.java       |  198 ++
 .../statistics/TestStatArchiveWriter.java       |    6 +-
 .../statistics/TestStatisticsManager.java       |   13 +-
 .../statistics/TestStatisticsSampler.java       |   13 +-
 .../statistics/ValueMonitorIntegrationTest.java |  367 ++
 .../statistics/ValueMonitorJUnitTest.java       |  370 --
 .../internal/stats50/AtomicStatsJUnitTest.java  |    2 +-
 .../bean/stats/MemberLevelStatsJUnitTest.java   |    2 +-
 ...st_testWriteAfterSamplingBegins_expected.gfs |  Bin 1970 -> 0 bytes
 ...est_testWriteWhenSamplingBegins_expected.gfs |  Bin 1933 -> 0 bytes
 ...st_testWriteAfterSamplingBegins_expected.gfs |  Bin 0 -> 1976 bytes
 ...est_testWriteWhenSamplingBegins_expected.gfs |  Bin 0 -> 1939 bytes
 .../query/internal/cq/CqServiceVsdStats.java    |    4 +-
 .../cache/lucene/internal/LuceneIndexStats.java |    2 +-
 .../internal/filesystem/FileSystemStats.java    |    2 +-
 .../util/AutoBalancerIntegrationJUnitTest.java  |    2 +-
 176 files changed, 17957 insertions(+), 18408 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java
index 2d59103..99a3a83 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.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;
 
 public class DeltaSessionStatistics {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
index 82e882c..48020a3 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
@@ -22,7 +22,7 @@ import com.gemstone.gemfire.StatisticsFactory;
 import com.gemstone.gemfire.StatisticsType;
 import com.gemstone.gemfire.StatisticsTypeFactory;
 import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
  * Statistics for modules.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/StatisticsFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/StatisticsFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/StatisticsFactory.java
index 3ef5ba5..3ba1665 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/StatisticsFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/StatisticsFactory.java
@@ -17,7 +17,7 @@
 package com.gemstone.gemfire;
 
 //import com.gemstone.gemfire.distributed.DistributedSystem;
-//import com.gemstone.gemfire.internal.StatArchiveFormat;
+//import com.gemstone.gemfire.internal.statistics.StatArchiveFormat;
 //import java.io.IOException;
 //import java.io.Reader;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/StatisticsTypeFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/StatisticsTypeFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/StatisticsTypeFactory.java
index 9b6c546..4569b7e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/StatisticsTypeFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/StatisticsTypeFactory.java
@@ -17,7 +17,7 @@
 package com.gemstone.gemfire;
 
 //import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.StatArchiveFormat;
+import com.gemstone.gemfire.internal.statistics.StatArchiveFormat;
 import java.io.IOException;
 import java.io.Reader;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/MemberHealthEvaluator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/MemberHealthEvaluator.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/MemberHealthEvaluator.java
index d0710ca..5344724 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/MemberHealthEvaluator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/MemberHealthEvaluator.java
@@ -24,6 +24,8 @@ import com.gemstone.gemfire.internal.*;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.cache.CachePerfStats;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.statistics.GemFireStatSampler;
+import com.gemstone.gemfire.internal.statistics.platform.ProcessStats;
 
 import java.util.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueStats.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueStats.java
index 8d541a3..e9e1e0b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueStats.java
@@ -20,7 +20,7 @@ import com.gemstone.gemfire.StatisticDescriptor;
 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;
 import com.gemstone.gemfire.internal.cache.wan.GatewaySenderStats;
 
 public class AsyncEventQueueStats extends GatewaySenderStats {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionStats.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionStats.java
index 4bd4439..6aaae2d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionStats.java
@@ -22,7 +22,7 @@ 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.StatisticsTypeFactoryImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.cache.PoolStats;
 import com.gemstone.gemfire.internal.cache.tier.sockets.MessageStats;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
index d155602..111cec6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
@@ -32,7 +32,7 @@ import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.DummyStatisticsFactory;
+import com.gemstone.gemfire.internal.statistics.DummyStatisticsFactory;
 import com.gemstone.gemfire.internal.cache.PoolStats;
 import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.logging.LogService;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
index b26d76b..371098d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
@@ -33,7 +33,7 @@ import com.gemstone.gemfire.distributed.PoolCancelledException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.DummyStatisticsFactory;
+import com.gemstone.gemfire.internal.statistics.DummyStatisticsFactory;
 import com.gemstone.gemfire.internal.ScheduledThreadPoolExecutorWithKeepAlive;
 import com.gemstone.gemfire.internal.admin.ClientStatsManager;
 import com.gemstone.gemfire.internal.cache.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CqQueryVsdStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CqQueryVsdStats.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CqQueryVsdStats.java
index e9d30d5..e65af17 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CqQueryVsdStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CqQueryVsdStats.java
@@ -22,7 +22,7 @@ import com.gemstone.gemfire.StatisticsFactory;
 import com.gemstone.gemfire.StatisticsType;
 import com.gemstone.gemfire.StatisticsTypeFactory;
 import com.gemstone.gemfire.cache.query.CqEvent;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.cache.tier.MessageType;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexStats.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexStats.java
index 77941b6..84d9b61 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexStats.java
@@ -19,7 +19,7 @@ package com.gemstone.gemfire.cache.query.internal.index;
 
 import com.gemstone.gemfire.*;
 //import com.gemstone.gemfire.cache.query.*;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.cache.CachePerfStats;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
index c4803ab..dcd4aba 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionStats.java
@@ -24,7 +24,7 @@ import com.gemstone.gemfire.StatisticsFactory;
 import com.gemstone.gemfire.StatisticsType;
 import com.gemstone.gemfire.StatisticsTypeFactory;
 import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.logging.LogService;
 //import java.io.*;
 import com.gemstone.gemfire.internal.tcp.Buffers;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 1ea5611..49a4c97 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -55,6 +55,14 @@ import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
 import com.gemstone.gemfire.internal.offheap.OffHeapStorage;
+import com.gemstone.gemfire.internal.statistics.DummyStatisticsImpl;
+import com.gemstone.gemfire.internal.statistics.GemFireStatSampler;
+import com.gemstone.gemfire.internal.statistics.platform.LinuxProcFsStatistics;
+import com.gemstone.gemfire.internal.statistics.LocalStatisticsImpl;
+import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
+import com.gemstone.gemfire.internal.statistics.StatisticsImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsManager;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.tcp.ConnectionTable;
 import com.gemstone.gemfire.internal.util.concurrent.StoppableCondition;
 import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
index f59ed84..897b8c3 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
@@ -17,7 +17,7 @@
 package com.gemstone.gemfire.distributed.internal;
 
 import com.gemstone.gemfire.*;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockStats.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockStats.java
index 9a61c10..ac83d14 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockStats.java
@@ -18,8 +18,8 @@
 package com.gemstone.gemfire.distributed.internal.locks;
 
 import com.gemstone.gemfire.*;
-import com.gemstone.gemfire.internal.*;
 import com.gemstone.gemfire.distributed.internal.*;
+import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
  * This class maintains statistics in GemFire about the distributed lock 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractStatisticsFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractStatisticsFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractStatisticsFactory.java
deleted file mode 100755
index 972e670e..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractStatisticsFactory.java
+++ /dev/null
@@ -1,327 +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.StatisticDescriptor;
-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.i18n.LocalizedStrings;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-/**
- * An abstract standalone implementation of {@link StatisticsFactory}.
- * It can be used in contexts that do not have the GemFire product
- * or in vm's that do not have a distributed system nor a gemfire connection.
- *
- * @since GemFire 7.0
- */
-public abstract class AbstractStatisticsFactory 
-    implements StatisticsFactory, StatisticsManager {
-
-  private final long id;
-  private final String name;
-  private final CopyOnWriteArrayList<Statistics> statsList;
-  private int statsListModCount = 0;
-  private long statsListUniqueId = 1;
-  private final Object statsListUniqueIdLock;
-  private final StatisticsTypeFactory tf;
-  private final long startTime;
-
-  public AbstractStatisticsFactory(long id, String name, long startTime) {
-    this.id = id;
-    this.name = name;
-    this.startTime = startTime;
-    
-    this.statsList = new CopyOnWriteArrayList<Statistics>();
-    this.statsListUniqueIdLock = new Object();
-    this.tf = StatisticsTypeFactoryImpl.singleton();
-  }
-
-  public void close() {
-  }
-  
-  @Override
-  public final String getName() {
-    return this.name;
-  }
-  
-  @Override
-  public final long getId() {
-    return this.id;
-  }
-  
-  @Override
-  public final long getStartTime() {
-    return this.startTime;
-  }
-  
-  @Override
-  public final int getStatListModCount() {
-    return this.statsListModCount;
-  }
-  
-  @Override
-  public final List<Statistics> getStatsList() {
-    return this.statsList;
-  }
-
-  @Override
-  public final int getStatisticsCount() {
-    int result = 0;
-    List<Statistics> statsList = this.statsList;
-    if (statsList != null) {
-      result = statsList.size();
-    }
-    return result;
-  }
-  
-  @Override
-  public final Statistics findStatistics(long id) {
-    List<Statistics> statsList = this.statsList;
-    synchronized (statsList) {
-      for (Statistics s : statsList) {
-        if (s.getUniqueId() == id) {
-          return s;
-        }
-      }
-    }
-    throw new RuntimeException(LocalizedStrings.PureStatSampler_COULD_NOT_FIND_STATISTICS_INSTANCE.toLocalizedString());
-  }
-  
-  @Override
-  public final boolean statisticsExists(long id) {
-    List<Statistics> statsList = this.statsList;
-    for (Statistics s : statsList) {
-      if (s.getUniqueId() == id) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  @Override
-  public final Statistics[] getStatistics() {
-    List<Statistics> statsList = this.statsList;
-    return (Statistics[])statsList.toArray(new Statistics[statsList.size()]);
-  }
-  
-  // StatisticsFactory methods
-  
-  @Override
-  public final Statistics createStatistics(StatisticsType type) {
-    return createOsStatistics(type, null, 0, 0);
-  }
-  
-  @Override
-  public final Statistics createStatistics(StatisticsType type, String textId) {
-    return createOsStatistics(type, textId, 0, 0);
-  }
-  
-  @Override
-  public final Statistics createStatistics(StatisticsType type, String textId, long numericId) {
-    return createOsStatistics(type, textId, 0, 0);
-  }
-  
-  protected Statistics createOsStatistics(StatisticsType type, String textId, long numericId, int osStatFlags) {
-    long myUniqueId;
-    synchronized (statsListUniqueIdLock) {
-      myUniqueId = statsListUniqueId++; // fix for bug 30597
-    }
-    Statistics result = new LocalStatisticsImpl(type, textId, numericId, myUniqueId, false, osStatFlags, this);
-    synchronized (statsList) {
-      statsList.add(result);
-      statsListModCount++;
-    }
-    return result;
-  }
-
-  @Override
-  public final Statistics[] findStatisticsByType(StatisticsType type) {
-    List<Statistics> hits = new ArrayList<Statistics>();
-    Iterator<Statistics> it = statsList.iterator();
-    while (it.hasNext()) {
-      Statistics s = (Statistics)it.next();
-      if (type == s.getType()) {
-        hits.add(s);
-      }
-    }
-    Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[])hits.toArray(result);
-  }
-  
-  @Override
-  public final Statistics[] findStatisticsByTextId(String textId) {
-    List<Statistics> hits = new ArrayList<Statistics>();
-    Iterator<Statistics> it = statsList.iterator();
-    while (it.hasNext()) {
-      Statistics s = (Statistics)it.next();
-      if (s.getTextId().equals(textId)) {
-        hits.add(s);
-      }
-    }
-    Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[])hits.toArray(result);
-  }
-  
-  @Override
-  public final Statistics[] findStatisticsByNumericId(long numericId) {
-    List<Statistics> hits = new ArrayList<Statistics>();
-    Iterator<Statistics> it = statsList.iterator();
-    while (it.hasNext()) {
-      Statistics s = (Statistics)it.next();
-      if (numericId == s.getNumericId()) {
-        hits.add(s);
-      }
-    }
-    Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[])hits.toArray(result);
-  }
-  
-  public final Statistics findStatisticsByUniqueId(long uniqueId) {
-    Iterator<Statistics> it = statsList.iterator();
-    while (it.hasNext()) {
-      Statistics s = (Statistics)it.next();
-      if (uniqueId == s.getUniqueId()) {
-        return s;
-      }
-    }
-    return null;
-  }
-
-  /** for internal use only. Its called by {@link LocalStatisticsImpl#close}. */
-  @Override
-  public final void destroyStatistics(Statistics stats) {
-    synchronized (statsList) {
-      if (statsList.remove(stats)) {
-        statsListModCount++;
-      }
-    }
-  }
-
-  @Override
-  public final Statistics createAtomicStatistics(StatisticsType type) {
-    return createAtomicStatistics(type, null, 0);
-  }
-  
-  @Override
-  public final Statistics createAtomicStatistics(StatisticsType type, String textId) {
-    return createAtomicStatistics(type, textId, 0);
-  }
-  
-  @Override
-  public Statistics createAtomicStatistics(StatisticsType type, String textId, long numericId) {
-    long myUniqueId;
-    synchronized (statsListUniqueIdLock) {
-      myUniqueId = statsListUniqueId++; // fix for bug 30597
-    }
-    Statistics result = StatisticsImpl.createAtomicNoOS(type, textId, numericId, myUniqueId, this);
-    synchronized (statsList) {
-      statsList.add(result);
-      statsListModCount++;
-    }
-    return result;
-  }
-
-  // StatisticsTypeFactory methods
-  
-  /**
-   * Creates or finds a StatisticType for the given shared class.
-   */
-  @Override
-  public final StatisticsType createType(String name, String description, StatisticDescriptor[] stats) {
-    return tf.createType(name, description, stats);
-  }
-  
-  @Override
-  public final StatisticsType findType(String name) {
-    return tf.findType(name);
-  }
-  
-  @Override
-  public final StatisticsType[] createTypesFromXml(Reader reader)
-    throws IOException {
-    return tf.createTypesFromXml(reader);
-  }
-
-  @Override
-  public final StatisticDescriptor createIntCounter(String name, String description, String units) {
-    return tf.createIntCounter(name, description, units);
-  }
-  
-  @Override
-  public final StatisticDescriptor createLongCounter(String name, String description, String units) {
-    return tf.createLongCounter(name, description, units);
-  }
-  
-  @Override
-  public final StatisticDescriptor createDoubleCounter(String name, String description, String units) {
-    return tf.createDoubleCounter(name, description, units);
-  }
-  
-  @Override
-  public final StatisticDescriptor createIntGauge(String name, String description, String units) {
-    return tf.createIntGauge(name, description, units);
-  }
-  
-  @Override
-  public final StatisticDescriptor createLongGauge(String name, String description, String units) {
-    return tf.createLongGauge(name, description, units);
-  }
-  
-  @Override
-  public final StatisticDescriptor createDoubleGauge(String name, String description, String units) {
-    return tf.createDoubleGauge(name, description, units);
-  }
-  
-  @Override
-  public final StatisticDescriptor createIntCounter(String name, String description, String units, boolean largerBetter) {
-    return tf.createIntCounter(name, description, units, largerBetter);
-  }
-  
-  @Override
-  public final StatisticDescriptor createLongCounter(String name, String description, String units, boolean largerBetter) {
-    return tf.createLongCounter(name, description, units, largerBetter);
-  }
-  
-  @Override
-  public final StatisticDescriptor createDoubleCounter(String name, String description, String units, boolean largerBetter) {
-    return tf.createDoubleCounter(name, description, units, largerBetter);
-  }
-  
-  @Override
-  public final StatisticDescriptor createIntGauge(String name, String description, String units, boolean largerBetter) {
-    return tf.createIntGauge(name, description, units, largerBetter);
-  }
-  
-  @Override
-  public final StatisticDescriptor createLongGauge(String name, String description, String units, boolean largerBetter) {
-    return tf.createLongGauge(name, description, units, largerBetter);
-  }
-  
-  @Override
-  public final StatisticDescriptor createDoubleGauge(String name, String description, String units, boolean largerBetter) {
-    return tf.createDoubleGauge(name, description, units, largerBetter);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/internal/ArchiveSplitter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/ArchiveSplitter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/ArchiveSplitter.java
deleted file mode 100644
index 28b9dd7..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/ArchiveSplitter.java
+++ /dev/null
@@ -1,522 +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.text.*;
-//import java.util.*;
-import java.util.zip.*;
-
-/**
- * ArchiveSplitter provides APIs to read statistic snapshots from an archive
- * file.
- */
-public class ArchiveSplitter implements StatArchiveFormat {
-  private final File archiveName;
-  private InputStream is;
-  private MyFilterInputStream myIs;
-  private DataInputStream dataIn;
-  private DataOutputStream dataOut;
-  private OutputStream output;
-  private final static int BUFFER_SIZE = 1024*1024;
-  private long splitDuration; // in millis
-  private byte[][] resourceTypes = new byte[256][];
-  private byte[][] resourceInstanceTypeCodes = new byte[256][];
-  private byte[][] resourceInstanceTokens = new byte[256][];
-  private long[][] resourceInstanceBits = new long[256][];
-  private static final long DEFAULT_SPLIT_DURATION = 24*60*60*1000; // one day
-  private long currentDuration = 0; // in millis
-  private int splitCount = 0;
-  private byte[][] globalTokens = new byte[256][];
-  private int globalTokenCount = 0;
-
-  // header info
-  private byte archiveVersion;
-  private long startTimeStamp;
-  private long systemId;
-  private long systemStartTimeStamp;
-  private int timeZoneOffset;
-  private String timeZoneName;
-  private String systemDirectory;
-  private String productVersion;
-  private String os;
-  private String machine;
-  
-
-  public ArchiveSplitter(File archiveName) throws IOException {
-    this(archiveName, DEFAULT_SPLIT_DURATION);
-  }
-  public ArchiveSplitter(File archiveName, long splitDuration) throws IOException {
-    this.archiveName = archiveName;
-    this.splitDuration = splitDuration;
-    this.is = new FileInputStream(archiveName);
-    boolean compressed = archiveName.getPath().endsWith(".gz");
-    if (compressed) {
-      this.myIs = new MyFilterInputStream(new BufferedInputStream(new GZIPInputStream(this.is, BUFFER_SIZE), BUFFER_SIZE));
-    } else {
-      this.myIs = new MyFilterInputStream(new BufferedInputStream(this.is, BUFFER_SIZE));
-    }
-    this.dataIn = new DataInputStream(this.myIs);
-  }
-  private void readHeaderToken() throws IOException {
-    byte archiveVersion = dataIn.readByte();
-    if (archiveVersion <= 1) {
-      throw new GemFireIOException(LocalizedStrings.ArchiveSplitter_ARCHIVE_VERSION_0_IS_NO_LONGER_SUPPORTED.toLocalizedString(new Byte(archiveVersion)), null);
-    }
-    if (archiveVersion > ARCHIVE_VERSION) {
-      throw new GemFireIOException(LocalizedStrings.ArchiveSplitter_UNSUPPORTED_ARCHIVE_VERSION_0_THE_SUPPORTED_VERSION_IS_1.toLocalizedString(new Object[] {new Byte(archiveVersion), new Byte(ARCHIVE_VERSION)}), null);
-    }
-
-    this.archiveVersion = archiveVersion;
-    this.startTimeStamp = dataIn.readLong();
-    this.systemId = dataIn.readLong();
-    this.systemStartTimeStamp = dataIn.readLong();
-    this.timeZoneOffset = dataIn.readInt();
-    this.timeZoneName = dataIn.readUTF();
-    this.systemDirectory = dataIn.readUTF();
-    this.productVersion = dataIn.readUTF();
-    this.os = dataIn.readUTF();
-    this.machine = dataIn.readUTF();
-  }
-  private void skipBytes(int count) throws IOException {
-    int skipped = dataIn.skipBytes(count);
-    while (skipped != count) {
-      count -= skipped;
-      skipped = dataIn.skipBytes(count);
-    }
-  }
-  private void skipBoolean() throws IOException {
-    //dataIn.readBoolean();
-    skipBytes(1);
-  }
-//  private void skipByte() throws IOException {
-//    //dataIn.readByte();
-//    skipBytes(1);
-//  }
-//  private void skipUByte() throws IOException {
-//    //dataIn.readUnsignedByte();
-//    skipBytes(1);
-//  }
-//  private void skipShort() throws IOException {
-//    //dataIn.readShort();
-//    skipBytes(2);
-//  }
-//  private void skipUShort() throws IOException {
-//    //dataIn.readUnsignedShort();
-//    skipBytes(2);
-//  }
-//  private void skipInt() throws IOException {
-//    //dataIn.readInt();
-//    skipBytes(4);
-//  }
-  private void skipLong() throws IOException {
-    //dataIn.readLong();
-    skipBytes(8);
-  }
-  private void skipUTF() throws IOException {
-    //dataIn.readUTF();
-    skipBytes(dataIn.readUnsignedShort());
-  }
-  private void addGlobalToken(byte[] token) {
-    if (globalTokenCount >= globalTokens.length) {
-      byte[][] tmp = new byte[globalTokenCount+128][];
-      System.arraycopy(globalTokens, 0, tmp, 0, globalTokens.length);
-      globalTokens = tmp;
-    }
-    globalTokens[globalTokenCount] = token;
-    globalTokenCount += 1;
-  }
-  private void readResourceTypeToken() throws IOException {
-    int resourceTypeId = dataIn.readInt();
-    skipUTF(); //String resourceTypeName = dataIn.readUTF();
-    skipUTF(); //String resourceTypeDesc = dataIn.readUTF();
-    int statCount = dataIn.readUnsignedShort();
-    byte[] typeCodes = new byte[statCount];
-
-    for (int i=0; i < statCount; i++) {
-      skipUTF(); //String statName = dataIn.readUTF();
-      typeCodes[i] = dataIn.readByte();
-      skipBoolean(); //boolean isCounter = dataIn.readBoolean();
-      if (this.archiveVersion >= 4) {
-        skipBoolean(); //boolean largerBetter = dataIn.readBoolean();
-      }
-      skipUTF(); //String units = dataIn.readUTF();
-      skipUTF(); //String desc = dataIn.readUTF();
-    }
-    if (resourceTypeId >= resourceTypes.length) {
-      byte[][] tmp = new byte[resourceTypeId+128][];
-      System.arraycopy(resourceTypes, 0, tmp, 0, resourceTypes.length);
-      resourceTypes = tmp;
-    }
-    resourceTypes[resourceTypeId] = typeCodes;
-
-    addGlobalToken(this.myIs.getBytes());
-  }
-  private void readResourceInstanceCreateToken(boolean initialize) throws IOException {
-    int resourceInstId = dataIn.readInt();
-    skipUTF(); //String name = dataIn.readUTF();
-    skipLong(); //long id = dataIn.readLong();
-    int resourceTypeId = dataIn.readInt();
-    
-    if (resourceInstId >= resourceInstanceBits.length) {
-      long[][] tmpBits = new long[resourceInstId+128][];
-      System.arraycopy(resourceInstanceBits, 0,
-                       tmpBits, 0, resourceInstanceBits.length);
-      resourceInstanceBits = tmpBits;
-
-      byte[][] tmpTypeCodes = new byte[resourceInstId+128][];
-      System.arraycopy(resourceInstanceTypeCodes, 0,
-                       tmpTypeCodes, 0, resourceInstanceTypeCodes.length);
-      resourceInstanceTypeCodes = tmpTypeCodes;
-
-      byte[][] tmpTokens = new byte[resourceInstId+128][];
-      System.arraycopy(resourceInstanceTokens, 0,
-                       tmpTokens, 0, resourceInstanceTokens.length);
-      resourceInstanceTokens = tmpTokens;
-    }
-    byte[] instTypeCodes = resourceTypes[resourceTypeId];
-    resourceInstanceTypeCodes[resourceInstId] = instTypeCodes;
-    resourceInstanceTokens[resourceInstId] = this.myIs.getBytes();
-    resourceInstanceTokens[resourceInstId][0] = RESOURCE_INSTANCE_INITIALIZE_TOKEN;
-    long[] instBits = new long[instTypeCodes.length];
-    resourceInstanceBits[resourceInstId] = instBits;
-    if (initialize) {
-      for (int i=0; i < instBits.length; i++) {
-        switch (instTypeCodes[i]) {
-        case BOOLEAN_CODE:
-        case BYTE_CODE:
-        case CHAR_CODE:
-          instBits[i] = dataIn.readByte();
-          break;
-        case WCHAR_CODE:
-          instBits[i] = dataIn.readUnsignedShort();
-          break;
-        case SHORT_CODE:
-          instBits[i] = dataIn.readShort();
-          break;
-        case INT_CODE:
-        case FLOAT_CODE:
-        case LONG_CODE:
-        case DOUBLE_CODE:
-          instBits[i] = readCompactValue();
-          break;
-        default:
-          throw new IOException(LocalizedStrings.ArchiveSplitter_UNEXPECTED_TYPECODE_VALUE_0.toLocalizedString(new Byte(instTypeCodes[i])));
-        }
-      }
-    }
-  }
-  private void readResourceInstanceDeleteToken() throws IOException {
-    int id = dataIn.readInt();
-    resourceInstanceTypeCodes[id] = null;
-    resourceInstanceBits[id] = null;
-    resourceInstanceTokens[id] = null;
-  }
-  private int readResourceInstId() throws IOException {
-    int token = dataIn.readUnsignedByte();
-    if (token <= MAX_BYTE_RESOURCE_INST_ID) {
-      return token;
-    } else if (token == ILLEGAL_RESOURCE_INST_ID_TOKEN) {
-      return ILLEGAL_RESOURCE_INST_ID;
-    } else if (token == SHORT_RESOURCE_INST_ID_TOKEN) {
-      return dataIn.readUnsignedShort();
-    } else { /* token == INT_RESOURCE_INST_ID_TOKEN */
-      return dataIn.readInt();
-    }
-  }
-  private void readTimeDelta() throws IOException {
-    int millisSinceLastSample = dataIn.readUnsignedShort();
-    if (millisSinceLastSample == INT_TIMESTAMP_TOKEN) {
-      millisSinceLastSample = dataIn.readInt();
-    }
-    this.currentDuration += millisSinceLastSample;
-    this.startTimeStamp += millisSinceLastSample;
-  }
-  private long readCompactValue() throws IOException {
-    long v = dataIn.readByte();
-    if (v < MIN_1BYTE_COMPACT_VALUE) {
-      if (v == COMPACT_VALUE_2_TOKEN) {
-        v = dataIn.readShort();
-      } else {
-        int bytesToRead = ((byte)v - COMPACT_VALUE_2_TOKEN) + 2;
-        v = dataIn.readByte(); // note the first byte will be a signed byte.
-        bytesToRead--;
-        while (bytesToRead > 0) {
-          v <<= 8;
-          v |= dataIn.readUnsignedByte();
-          bytesToRead--;
-        }
-      }
-    }
-    return v;
-  }
-  private void readSampleToken() throws IOException {
-    readTimeDelta();
-    int resourceInstId = readResourceInstId();
-    while (resourceInstId != ILLEGAL_RESOURCE_INST_ID) {
-      byte[] typeCodes = resourceInstanceTypeCodes[resourceInstId];
-      long[] bits =      resourceInstanceBits[resourceInstId];
-      int statOffset = dataIn.readUnsignedByte();
-      while (statOffset != ILLEGAL_STAT_OFFSET) {
-        long statDeltaBits;
-        switch (typeCodes[statOffset]) {
-        case BOOLEAN_CODE:
-        case BYTE_CODE:
-        case CHAR_CODE:
-          statDeltaBits = dataIn.readByte();
-          break;
-        case WCHAR_CODE:
-          statDeltaBits = dataIn.readUnsignedShort();
-          break;
-        case SHORT_CODE:
-          statDeltaBits = dataIn.readShort();
-          break;
-        case INT_CODE:
-        case FLOAT_CODE:
-        case LONG_CODE:
-        case DOUBLE_CODE:
-          statDeltaBits = readCompactValue();
-          break;
-        default:
-          throw new IOException(LocalizedStrings.ArchiveSplitter_UNEXPECTED_TYPECODE_VALUE_0.toLocalizedString(new Byte(typeCodes[statOffset])));
-        }
-        bits[statOffset] += statDeltaBits;
-        statOffset = dataIn.readUnsignedByte();
-      }
-      resourceInstId = readResourceInstId();
-    }
-  }
-  /**
-     * Returns true if token read, false if eof.
-     */
-  private boolean readToken() throws IOException {
-    byte token;
-    try {
-      token = this.dataIn.readByte();
-      switch (token) {
-      case HEADER_TOKEN:
-        readHeaderToken();
-        this.myIs.putBytes(this.dataOut);
-        break;
-      case RESOURCE_TYPE_TOKEN:
-        readResourceTypeToken();
-        this.myIs.putBytes(this.dataOut);
-        break;
-      case RESOURCE_INSTANCE_CREATE_TOKEN:
-      case RESOURCE_INSTANCE_INITIALIZE_TOKEN:
-        readResourceInstanceCreateToken(token == RESOURCE_INSTANCE_INITIALIZE_TOKEN);
-        this.myIs.putBytes(this.dataOut);
-        break;
-      case RESOURCE_INSTANCE_DELETE_TOKEN:
-        readResourceInstanceDeleteToken();
-        this.myIs.putBytes(this.dataOut);
-        break;
-      case SAMPLE_TOKEN:
-        readSampleToken();
-        this.myIs.putBytes(this.dataOut);
-        break;
-      default:
-        throw new IOException(LocalizedStrings.ArchiveSplitter_UNEXPECTED_TOKEN_BYTE_VALUE_0.toLocalizedString(new Byte(token)));
-      }
-      return true;
-    } catch (EOFException ignore) {
-      return false;
-    }
-  }
-
-  private File getOutputName() {
-    String inName = archiveName.getPath();
-    StringBuffer buf = new StringBuffer(inName.length()+4);
-    int idx = inName.lastIndexOf('.');
-    if (idx == -1) {
-      buf.append(inName);
-    } else {
-      buf.append(inName.substring(0, idx));
-    }
-    buf.append('-')
-      .append(this.splitCount);
-    if (idx != -1) {
-      buf.append(inName.substring(idx));
-    }
-    return new File(buf.toString());
-  }
-
-  private void startSplit() throws IOException {
-    this.currentDuration = 0;
-    this.splitCount++;
-    if (archiveName.getPath().endsWith(".gz")) {
-      this.output = new GZIPOutputStream(new FileOutputStream(getOutputName()), BUFFER_SIZE);
-    } else {
-      this.output = new BufferedOutputStream(new FileOutputStream(getOutputName()), BUFFER_SIZE);
-    }
-    this.dataOut = new DataOutputStream(this.output);
-
-
-    if (this.splitCount > 1) {
-      this.dataOut.writeByte(HEADER_TOKEN);
-      this.dataOut.writeByte(ARCHIVE_VERSION);
-      this.dataOut.writeLong(this.startTimeStamp);
-      this.dataOut.writeLong(this.systemId);
-      this.dataOut.writeLong(this.systemStartTimeStamp);
-      this.dataOut.writeInt(this.timeZoneOffset);
-      this.dataOut.writeUTF(this.timeZoneName);
-      this.dataOut.writeUTF(this.systemDirectory);
-      this.dataOut.writeUTF(this.productVersion);
-      this.dataOut.writeUTF(this.os);
-      this.dataOut.writeUTF(this.machine);
-    }
-    
-    for (int i=0; i < globalTokenCount; i++) {
-      this.dataOut.write(globalTokens[i]);
-    }
-    for (int i=0; i < resourceInstanceTokens.length; i++) {
-      if (resourceInstanceTokens[i] != null) {
-        this.dataOut.write(resourceInstanceTokens[i]);
-        byte[] instTypeCodes = resourceInstanceTypeCodes[i];
-        long[] instBits = resourceInstanceBits[i];
-        for (int j=0; j < instBits.length; j++) {
-          StatArchiveWriter.writeStatValue(instTypeCodes[j], instBits[j], this.dataOut);
-        }
-      }
-    }
-  }
-
-  private void endSplit() {
-    try {
-      this.dataOut.flush();
-    } catch (IOException ex) {
-    }
-    try {
-      this.output.close();
-    } catch (IOException ex) {
-      System.err.println("[warning] could not close " + getOutputName());
-    }
-  }
-  
-  public void split() throws IOException {
-    boolean done = false;
-    do {
-      done = true;
-      startSplit();
-      while (readToken()) {
-        if (this.currentDuration >= this.splitDuration) {
-          done = false;
-          break;
-        }
-      }
-      endSplit();
-    } while (!done);
-  }
-
-  private static class MyFilterInputStream extends FilterInputStream {
-    private byte[] readBytes = new byte[32000];
-    private int idx = 0;
-    public MyFilterInputStream(InputStream in) {
-      super(in);
-    }
-
-    /**
-     * Returns all the bytes, read or skipped, since the last reset.
-     */
-    public byte[] getBytes() {
-      byte[] result = new byte[idx];
-      System.arraycopy(readBytes, 0, result, 0, result.length);
-      return result;
-    }
-
-    /**
-     * Writes all the bytes, read or skipped, since the last reset
-     * to the specified output stream.
-     * Does a mark and reset after the write.
-     */
-    public void putBytes(DataOutputStream dataOut) throws IOException {
-      dataOut.write(readBytes, 0, idx);
-      idx = 0;
-    }
-    
-    @Override
-    public void close() throws IOException {
-      readBytes = null;
-      super.close();
-    }
-
-    @Override
-    public void reset() throws IOException {
-      idx = 0;
-      super.reset();
-    }
-    
-    @Override
-    public long skip(long n) throws IOException {
-      makeRoom((int)n);
-      int result = super.read(readBytes, idx, (int)n);
-      if (result == -1) {
-        return 0;
-      } else {
-        idx += result;
-        return result;
-      }
-    }
-    
-    private void makeRoom(int n) {
-      if (idx+n > readBytes.length) {
-        byte[] tmp = new byte[readBytes.length + n + 1024];
-        System.arraycopy(readBytes, 0, tmp, 0, readBytes.length);
-        readBytes = tmp;
-      }
-    }
-
-    @Override
-    public int read() throws IOException {
-      int result = super.read();
-      if (result != -1) {
-        makeRoom(1);
-        readBytes[idx] = (byte)result;
-        idx += 1;
-      }
-      return result;
-    }
-
-    @Override
-    public int read(byte[] b) throws IOException {
-      return read(b, 0, b.length);
-    }
-    @Override
-    public int read(byte[] b, int off, int len) throws IOException {
-      int result = super.read(b, off, len);
-      if (result != -1) {
-        makeRoom(result);
-        System.arraycopy(b, off, readBytes, idx, result);
-        idx += result;
-      }
-      return result;
-    }
-  }
-  
-  public static void main(String args[]) throws IOException {
-    if (args.length != 1) {
-      System.err.println(LocalizedStrings.ArchiveSplitter_USAGE.toLocalizedString() + ": com.gemstone.gemfire.internal.ArchiveSplitter <archive.gfs>");
-      System.exit(1);
-    }
-    ArchiveSplitter as = new ArchiveSplitter(new File(args[0]));
-    as.split();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsFactory.java
deleted file mode 100644
index 9d280eb..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsFactory.java
+++ /dev/null
@@ -1,134 +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 java.io.*;
-
-/**
- * A StatisticsFactory that creates disconnected statistics
- */
-public class DummyStatisticsFactory implements StatisticsFactory {
-  
-  private final static StatisticsTypeFactoryImpl tf = (StatisticsTypeFactoryImpl)StatisticsTypeFactoryImpl.singleton();
-
-  /** Creates a new instance of DummyStatisticsFactory */
-  public DummyStatisticsFactory() {
-  }
-  
-  // StatisticsFactory methods
-  public Statistics createStatistics(StatisticsType type) {
-    return createStatistics(type, null, 1);
-  }
-  public Statistics createStatistics(StatisticsType type, String textId) {
-    return createStatistics(type, textId, 1);
-  }
-  public Statistics createStatistics(StatisticsType type, String textId, long numericId) {
-    Statistics result = new LocalStatisticsImpl(type, textId, numericId, 1, false, 0, null);
-    return result;
-  }
-
-//  /** for internal use only. Its called by {@link LocalStatisticsImpl#close}. */
-//  public void destroyStatistics(Statistics stats) {
-//    if (statsList.remove(stats)) {
-//      statsListModCount++;
-//    }
-//  }
-//  
-  public Statistics createAtomicStatistics(StatisticsType type) {
-    return createAtomicStatistics(type, null, 1);
-  }
-  public Statistics createAtomicStatistics(StatisticsType type, String textId) {
-    return createAtomicStatistics(type, textId, 1);
-  }
-  public Statistics createAtomicStatistics(StatisticsType type, String textId, long numericId) {
-    Statistics result = new LocalStatisticsImpl(type, textId, numericId, 1, true, 0, null);
-    return result;
-  }
-  public Statistics[] findStatisticsByType(StatisticsType type) {
-    return new Statistics[0];
-  }
-  public Statistics[] findStatisticsByTextId(String textId) {
-    return new Statistics[0];
-  }
-  public Statistics[] findStatisticsByNumericId(long numericId) {
-    return new Statistics[0];
-  }
-
-  public StatisticsType createType(String name, String description,
-                                   StatisticDescriptor[] stats) {
-    return tf.createType(name, description, stats);
-  }
-  public StatisticsType findType(String name) {
-    return tf.findType(name);
-  }
-  public StatisticsType[] createTypesFromXml(Reader reader)
-    throws IOException {
-    return tf.createTypesFromXml(reader);
-  }
-
-  public StatisticDescriptor createIntCounter(String name, String description,
-                                              String units) {
-    return tf.createIntCounter(name, description, units);
-  }
-  public StatisticDescriptor createLongCounter(String name, String description,
-                                               String units) {
-    return tf.createLongCounter(name, description, units);
-  }
-  public StatisticDescriptor createDoubleCounter(String name, String description,
-                                                 String units) {
-    return tf.createDoubleCounter(name, description, units);
-  }
-  public StatisticDescriptor createIntGauge(String name, String description,
-                                            String units) {
-    return tf.createIntGauge(name, description, units);
-  }
-  public StatisticDescriptor createLongGauge(String name, String description,
-                                             String units) {
-    return tf.createLongGauge(name, description, units);
-  }
-  public StatisticDescriptor createDoubleGauge(String name, String description,
-                                               String units) {
-    return tf.createDoubleGauge(name, description, units);
-  }
-  public StatisticDescriptor createIntCounter(String name, String description,
-                                              String units, boolean largerBetter) {
-    return tf.createIntCounter(name, description, units, largerBetter);
-  }
-  public StatisticDescriptor createLongCounter(String name, String description,
-                                               String units, boolean largerBetter) {
-    return tf.createLongCounter(name, description, units, largerBetter);
-  }
-  public StatisticDescriptor createDoubleCounter(String name, String description,
-                                                 String units, boolean largerBetter) {
-    return tf.createDoubleCounter(name, description, units, largerBetter);
-  }
-  public StatisticDescriptor createIntGauge(String name, String description,
-                                            String units, boolean largerBetter) {
-    return tf.createIntGauge(name, description, units, largerBetter);
-  }
-  public StatisticDescriptor createLongGauge(String name, String description,
-                                             String units, boolean largerBetter) {
-    return tf.createLongGauge(name, description, units, largerBetter);
-  }
-  public StatisticDescriptor createDoubleGauge(String name, String description,
-                                               String units, boolean largerBetter) {
-    return tf.createDoubleGauge(name, description, units, largerBetter);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsImpl.java
deleted file mode 100644
index aa8da50..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/DummyStatisticsImpl.java
+++ /dev/null
@@ -1,242 +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 java.util.function.DoubleSupplier;
-import java.util.function.IntSupplier;
-import java.util.function.LongSupplier;
-
-import com.gemstone.gemfire.*;
-
-/**
- * An implementation of {@link Statistics} that does nothing.
- * Setting the "gemfire.statsDisabled" to true causes it to be used.
- *
- * @see <A href="package-summary.html#statistics">Package introduction</A>
- *
- *
- * @since GemFire 3.0
- *
- */
-public class DummyStatisticsImpl implements Statistics {
-  
-  private final StatisticsType type;
-  private final String textId;
-  private final long numericId;
-
-  ///////////////////////  Constructors  ///////////////////////
-
-  /**
-   * Creates a new statistics instance of the given type
-   *
-   * @param type
-   *        A description of the statistics
-   */
-  public DummyStatisticsImpl(StatisticsType type, String textId, long numericId) {
-    this.type = type;
-    this.textId = textId;
-    this.numericId = numericId;
-  }
-
-  public final void close() {
-  }
-
-  ////////////////////////  accessor Methods  ///////////////////////
-
-  public final int nameToId(String name) {
-    return this.type.nameToId(name);
-  }
-
-  public final StatisticDescriptor nameToDescriptor(String name) {
-    return this.type.nameToDescriptor(name);
-  }
-
-  public final long getUniqueId() {
-    return 0;
-  }
-
-  public final StatisticsType getType() {
-    return this.type;
-  }
-
-  public final String getTextId() {
-    return this.textId;
-  }
-  public final long getNumericId() {
-    return this.numericId;
-  }
-  public final boolean isAtomic() {
-    return true;
-  }
-  public final boolean isClosed() {
-    return false;
-  }
-  
-  ////////////////////////  set() Methods  ///////////////////////
-
-  public final void setInt(int id, int value) {
-  }
-
-  public final void setInt(StatisticDescriptor descriptor, int value) {
-  }
-
-  public final void setInt(String name, int value) {
-  }
-
-  public final void setLong(int id, long value) {
-  }
-
-  public final void setLong(StatisticDescriptor descriptor, long value) {
-  }
-
-  public final void setLong(String name, long value) {
-  }
-
-  public final void setDouble(int id, double value) {
-  }
-
-  public final void setDouble(StatisticDescriptor descriptor, double value) {
-  }
-
-  public final void setDouble(String name, double value) {
-  }
-
-  ///////////////////////  get() Methods  ///////////////////////
-
-  public final int getInt(int id) {
-    return 0;
-  }
-
-  public final int getInt(StatisticDescriptor descriptor) {
-    return 0;
-  }
-
-  public final int getInt(String name) {
-    return 0;
-  }
-
-  public final long getLong(int id) {
-    return 0;
-  }
-
-  public final long getLong(StatisticDescriptor descriptor) {
-    return 0;
-  }
-
-  public final long getLong(String name) {
-    return 0;
-  }
-
-  public final double getDouble(int id) {
-    return 0.0;
-  }
-
-  public final double getDouble(StatisticDescriptor descriptor) {
-    return 0.0;
-  }
-
-  public final double getDouble(String name) {
-    return 0.0;
-  }
-
-  private static final Number dummyNumber = Integer.valueOf(0);
-
-  public final Number get(StatisticDescriptor descriptor) {
-    return dummyNumber; 
-  }
-
-  public final Number get(String name) {
-    return dummyNumber; 
-  }
-
-  public final long getRawBits(StatisticDescriptor descriptor) {
-    return 0;
-  }
-
-  public final long getRawBits(String name) {
-    return 0;
-  }
-
-  ////////////////////////  inc() Methods  ////////////////////////
-
-  public final void incInt(int id, int delta) {
-  }
-
-  public final void incInt(StatisticDescriptor descriptor, int delta) {
-  }
-
-  public final void incInt(String name, int delta) {
-  }
-
-  public final void incLong(int id, long delta) {
-  }
-
-  public final void incLong(StatisticDescriptor descriptor, long delta) {
-  }
-
-  public final void incLong(String name, long delta) {
-  }
-
-  public final void incDouble(int id, double delta) {
-  }
-
-  public final void incDouble(StatisticDescriptor descriptor, double delta) {
-  }
-
-  public final void incDouble(String name, double delta) {
-  }
-
-  @Override
-  public IntSupplier setIntSupplier(final int id, final IntSupplier supplier) {
-    return null;
-  }
-
-  @Override
-  public IntSupplier setIntSupplier(final String name, final IntSupplier supplier) {
-    return null;
-  }
-
-  @Override
-  public IntSupplier setIntSupplier(final StatisticDescriptor descriptor, final IntSupplier supplier) {
-    return null;
-  }
-
-  @Override public LongSupplier setLongSupplier(final int id, final LongSupplier supplier) {
-    return null;
-  }
-
-  @Override public LongSupplier setLongSupplier(final String name, final LongSupplier supplier) {
-    return null;
-  }
-
-  @Override public LongSupplier setLongSupplier(final StatisticDescriptor descriptor, final LongSupplier supplier) {
-    return null;
-  }
-
-  @Override public DoubleSupplier setDoubleSupplier(final int id, final DoubleSupplier supplier) {
-    return null;
-  }
-
-  @Override public DoubleSupplier setDoubleSupplier(final String name, final DoubleSupplier supplier) {
-    return null;
-  }
-
-  @Override
-  public DoubleSupplier setDoubleSupplier(final StatisticDescriptor descriptor, final DoubleSupplier supplier) {
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/750996a0/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireStatSampler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireStatSampler.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireStatSampler.java
deleted file mode 100644
index 1eb35d0..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireStatSampler.java
+++ /dev/null
@@ -1,502 +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;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.admin.ListenerIdMap;
-import com.gemstone.gemfire.internal.admin.remote.StatListenerMessage;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.logging.log4j.Logger;
-
-/**
- * GemFireStatSampler adds listeners and rolling archives to HostStatSampler.
- * <p>
- * The StatisticsManager is implemented by DistributedSystem.
- * 
- */
-public final class GemFireStatSampler extends HostStatSampler  {
-
-  private static final Logger logger = LogService.getLogger();
-  
-  private final ListenerIdMap listeners = new ListenerIdMap();
-  
-  // TODO: change the listener maps to be copy-on-write
-  
-  private final Map<LocalStatListenerImpl, Boolean> localListeners = 
-      new ConcurrentHashMap<LocalStatListenerImpl, Boolean>();
-  
-  private final Map<InternalDistributedMember, List<RemoteStatListenerImpl>> recipientToListeners = 
-      new HashMap<InternalDistributedMember, List<RemoteStatListenerImpl>>();
-  
-  private final InternalDistributedSystem con;
-  
-  private int nextListenerId = 1;
-  private ProcessStats processStats = null;
-
-  //////////////////////  Constructors  //////////////////////
-
-  public GemFireStatSampler(InternalDistributedSystem con) {
-    super(con.getCancelCriterion(), new StatSamplerStats(con, con.getId()));
-    this.con = con;
-  }
-  
-  /**
-   * Returns the <code>ProcessStats</code> for this Java VM.  Note
-   * that <code>null</code> will be returned if operating statistics
-   * are disabled.
-   *
-   * @since GemFire 3.5
-   */
-  public final ProcessStats getProcessStats() {
-    return this.processStats;
-  }
-  
-  @Override
-  public String getProductDescription() {
-    return "GemFire " + GemFireVersion.getGemFireVersion()
-      + " #" + GemFireVersion.getBuildId()
-      + " as of " + GemFireVersion.getSourceDate();
-  }
-
-  public int addListener(InternalDistributedMember recipient, long resourceId, String statName) {
-    int result = getNextListenerId();
-    synchronized (listeners) {
-      while (listeners.get(result) != null) {
-        // previous one was still being used
-        result = getNextListenerId();
-      }
-      RemoteStatListenerImpl sl = RemoteStatListenerImpl.create(result, recipient, 
-          resourceId, statName, this);
-      listeners.put(result, sl);
-      List<RemoteStatListenerImpl> l = recipientToListeners.get(recipient);
-      if (l == null) {
-        l = new ArrayList<RemoteStatListenerImpl>();
-        recipientToListeners.put(recipient, l);
-      }
-      l.add(sl);
-    }
-    return result;
-  }
-  
-  public boolean removeListener(int listenerId) {
-    synchronized (listeners) {
-      RemoteStatListenerImpl sl = (RemoteStatListenerImpl)listeners.remove(listenerId);
-      if (sl != null) {
-        List<RemoteStatListenerImpl> l = recipientToListeners.get(sl.getRecipient());
-        l.remove(sl);
-      }
-      return sl != null;
-    }
-  }
-
-  public void removeListenersByRecipient(InternalDistributedMember recipient) {
-    synchronized (listeners) {
-      List<RemoteStatListenerImpl> l = recipientToListeners.get(recipient);
-      if (l != null && l.size() != 0) {
-        for (RemoteStatListenerImpl sl : l) {
-          listeners.remove(sl.getListenerId());
-        }
-        recipientToListeners.remove(recipient);
-      }
-    }
-  }
-
-  public void addLocalStatListener(LocalStatListener l, Statistics stats, String statName) {
-    LocalStatListenerImpl sl = null;
-    synchronized (LocalStatListenerImpl.class) {
-      sl = LocalStatListenerImpl.create(l, stats, statName);
-    }
-    this.localListeners.put(sl, Boolean.TRUE);
-  }
-
-  public boolean removeLocalStatListener(LocalStatListener listener) {
-    Iterator<Map.Entry<LocalStatListenerImpl, Boolean>> it = 
-                  this.localListeners.entrySet().iterator();
-    while (it.hasNext()) {
-      Map.Entry<LocalStatListenerImpl, Boolean> entry = it.next();
-      if (listener.equals(entry.getKey().getListener())) {
-        it.remove();
-        return true;
-      }
-    }
-    return false;
-  }
-
-  public Set<LocalStatListenerImpl> getLocalListeners() {
-    return this.localListeners.keySet();
-  }
-  
-  @Override
-  public final File getArchiveFileName() {
-    return this.con.getConfig().getStatisticArchiveFile();
-  }
-  
-  @Override
-  public final long getArchiveFileSizeLimit() {
-    if (fileSizeLimitInKB()) {
-      // use KB instead of MB to speed up rolling for testing
-      return ((long)this.con.getConfig().getArchiveFileSizeLimit()) * (1024);
-    } else {
-      return ((long)this.con.getConfig().getArchiveFileSizeLimit()) * (1024*1024);
-    }
-  }
-  
-  @Override
-  public final long getArchiveDiskSpaceLimit() {
-    if (fileSizeLimitInKB()) {
-      // use KB instead of MB to speed up removal for testing
-      return ((long)this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024);
-    } else {
-      return ((long)this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024*1024);
-    }
-  }
-  
-  @Override
-  protected void checkListeners() {
-    checkLocalListeners();
-    synchronized (listeners) {
-      if (listeners.size() == 0) {
-        return;
-      }
-      long timeStamp = System.currentTimeMillis();
-      Iterator<Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>>> it1 = 
-          recipientToListeners.entrySet().iterator();
-      while (it1.hasNext()) {
-        if (stopRequested()) return;
-        Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>> me = 
-            it1.next();
-        List<RemoteStatListenerImpl> l = me.getValue();
-        if (l.size() > 0) {
-          InternalDistributedMember recipient = (InternalDistributedMember)me.getKey();
-          StatListenerMessage msg =
-            StatListenerMessage.create(timeStamp, l.size());
-          msg.setRecipient(recipient);
-          for (RemoteStatListenerImpl statListener : l) {
-            if (getStatisticsManager().statisticsExists(statListener.getStatId())) {
-              statListener.checkForChange(msg);
-            } else {
-              // its stale; indicate this with a negative listener id
-              // fix for bug 29405
-              msg.addChange(-statListener.getListenerId(), 0);
-            }
-          }
-          this.con.getDistributionManager().putOutgoing(msg);
-        }
-      }
-    }
-  }
-  
-  @Override
-  protected final int getSampleRate() {
-    return this.con.getConfig().getStatisticSampleRate();
-  }
-  
-  @Override
-  public final boolean isSamplingEnabled() {
-    return this.con.getConfig().getStatisticSamplingEnabled();
-  }
-  
-  @Override
-  protected final StatisticsManager getStatisticsManager() {
-    return this.con;
-  }
-  
-  @Override
-  protected final OsStatisticsFactory getOsStatisticsFactory() {
-    return this.con;
-  }
-  
-  @Override
-  protected final long getSpecialStatsId() {
-    long statId = OSProcess.getId();
-    if (statId == 0 || statId == -1) {
-      statId = getStatisticsManager().getId();
-    }
-    return statId;
-  }
-  
-  @Override
-  protected final void initProcessStats(long id) {
-    if (PureJavaMode.osStatsAreAvailable()) {
-      if (osStatsDisabled()) {
-        logger.info(LogMarker.STATISTICS, LocalizedMessage.create(LocalizedStrings.GemFireStatSampler_OS_STATISTIC_COLLECTION_DISABLED_BY_OSSTATSDISABLED_SYSTEM_PROPERTY));
-      } else {
-        int retVal = HostStatHelper.initOSStats();
-        if ( retVal != 0 ) {
-          logger.error(LogMarker.STATISTICS, LocalizedMessage.create(LocalizedStrings.GemFireStatSampler_OS_STATISTICS_FAILED_TO_INITIALIZE_PROPERLY_SOME_STATS_MAY_BE_MISSING_SEE_BUGNOTE_37160)); 
-        }
-        HostStatHelper.newSystem(getOsStatisticsFactory());
-        String statName = getStatisticsManager().getName();
-        if (statName == null || statName.length() == 0) {
-          statName = "javaApp" + getStatisticsManager().getId();
-        }
-        Statistics stats = HostStatHelper.newProcess(getOsStatisticsFactory(), id, statName + "-proc");
-        this.processStats = HostStatHelper.newProcessStats(stats); 
-      }
-    }
-  }
-
- @Override
-  protected final void sampleProcessStats(boolean prepareOnly) {
-    if (prepareOnly || osStatsDisabled() || !PureJavaMode.osStatsAreAvailable()) {
-      return;
-    }
-    List<Statistics> l = getStatisticsManager().getStatsList();
-    if (l == null) {
-      return;
-    }
-    if (stopRequested()) return;
-    HostStatHelper.readyRefreshOSStats();
-    Iterator<Statistics> it = l.iterator();
-    while (it.hasNext()) {
-      if (stopRequested()) return;
-      StatisticsImpl s = (StatisticsImpl)it.next();
-      if (s.usesSystemCalls()) {
-        HostStatHelper.refresh((LocalStatisticsImpl)s);
-      }
-    }
-  }
-
- @Override
-  protected final void closeProcessStats() {
-    if (PureJavaMode.osStatsAreAvailable()) {
-      if (!osStatsDisabled()) {
-        if (this.processStats != null) {
-          this.processStats.close();
-        }
-        HostStatHelper.closeOSStats();
-      }
-    }
-  }
-
-  private void checkLocalListeners() {
-    for (LocalStatListenerImpl st : this.localListeners.keySet()) {
-      if (getStatisticsManager().statisticsExists(st.getStatId())) {
-        st.checkForChange();
-      }
-    }
-  }
-  
-  private int getNextListenerId() {
-    int result = nextListenerId++;
-    if (nextListenerId < 0) {
-      nextListenerId = 1;
-    }
-    return result;
-  }
-    
-  protected static abstract class StatListenerImpl {
-    protected Statistics stats;
-    protected StatisticDescriptorImpl stat;
-    protected boolean oldValueInitialized = false;
-    protected long oldValue;
-
-    public long getStatId() {
-      if (this.stats.isClosed()) {
-        return -1;
-      } else {
-        return this.stats.getUniqueId();
-      }
-    }
-    
-    protected abstract double getBitsAsDouble(long bits);
-  }
-
-  protected static abstract class LocalStatListenerImpl extends StatListenerImpl {
-    private LocalStatListener listener;
-    
-    public LocalStatListener getListener() {
-      return this.listener;
-    }
-    
-    static LocalStatListenerImpl create(LocalStatListener l, Statistics stats, String statName) {
-      LocalStatListenerImpl result = null;
-      StatisticDescriptorImpl stat = (StatisticDescriptorImpl)stats.nameToDescriptor(statName);
-      switch (stat.getTypeCode()) {
-      case StatisticDescriptorImpl.BYTE:
-      case StatisticDescriptorImpl.SHORT:
-      case StatisticDescriptorImpl.INT:
-      case StatisticDescriptorImpl.LONG:
-        result = new LocalLongStatListenerImpl();
-        break;
-      case StatisticDescriptorImpl.FLOAT:
-        result = new LocalFloatStatListenerImpl();
-        break;
-      case StatisticDescriptorImpl.DOUBLE:
-        result = new LocalDoubleStatListenerImpl();
-        break;
-      default:
-        throw new RuntimeException("Illegal field type " + stats.getType() + " for statistic");
-      }
-      result.stats = stats;
-      result.stat = stat;
-      result.listener = l;
-      return result;
-    }
-    
-    /**
-     * Checks to see if the value of the stat has changed. If it has then 
-     * the local listener is fired
-     */
-    public void checkForChange() {
-      long currentValue = stats.getRawBits(stat);
-      if (oldValueInitialized) {
-        if (currentValue == oldValue) {
-          return;
-        }
-      } else {
-        oldValueInitialized = true;
-      }
-      oldValue = currentValue;
-      listener.statValueChanged(getBitsAsDouble(currentValue));
-    }
-  }
-  
-  protected static class LocalLongStatListenerImpl extends LocalStatListenerImpl {
-    @Override
-    protected double getBitsAsDouble(long bits) {
-      return bits;
-    }
-  }
-
-  protected static class LocalFloatStatListenerImpl extends LocalStatListenerImpl {
-    @Override
-    protected double getBitsAsDouble(long bits) {
-      return Float.intBitsToFloat((int)bits);
-    }
-  }
-  
-  protected static class LocalDoubleStatListenerImpl extends LocalStatListenerImpl {
-    @Override
-    protected double getBitsAsDouble(long bits) {
-      return Double.longBitsToDouble(bits);
-    }
-  }
-
-  /**
-   * Used to register a StatListener.
-   */
-  protected static abstract class RemoteStatListenerImpl extends StatListenerImpl{
-    private int listenerId;
-    private InternalDistributedMember recipient;
-
-    @Override
-    public final int hashCode() {
-      return listenerId;
-    }
-    
-    @Override
-    public final boolean equals(Object o) {
-      if (o == null) {
-        return false;
-      }
-      if (o instanceof RemoteStatListenerImpl) {
-        return listenerId == ((RemoteStatListenerImpl)o).listenerId;
-      } else {
-        return false;
-      }
-    }
-
-    public int getListenerId() {
-      return this.listenerId;
-    }
-    
-    public InternalDistributedMember getRecipient() {
-      return this.recipient;
-    }
-    
-    static RemoteStatListenerImpl create(int listenerId, InternalDistributedMember recipient, long resourceId, String statName, HostStatSampler sampler) {
-      RemoteStatListenerImpl result = null;
-      Statistics stats = sampler.getStatisticsManager().findStatistics(resourceId);
-      StatisticDescriptorImpl stat = (StatisticDescriptorImpl)stats.nameToDescriptor(statName);
-      switch (stat.getTypeCode()) {
-      case StatisticDescriptorImpl.BYTE:
-      case StatisticDescriptorImpl.SHORT:
-      case StatisticDescriptorImpl.INT:
-      case StatisticDescriptorImpl.LONG:
-        result = new LongStatListenerImpl();
-        break;
-      case StatisticDescriptorImpl.FLOAT:
-        result = new FloatStatListenerImpl();
-        break;
-      case StatisticDescriptorImpl.DOUBLE:
-        result = new DoubleStatListenerImpl();
-        break;
-      default:
-        throw new RuntimeException(LocalizedStrings.GemFireStatSampler_ILLEGAL_FIELD_TYPE_0_FOR_STATISTIC.toLocalizedString(stats.getType()));
-      }
-      result.stats = stats;
-      result.stat = stat;
-      result.listenerId = listenerId;
-      result.recipient = recipient;
-      return result;
-    }
-    
-    /**
-     * Checks to see if the value of the stat has changed. If it has then it
-     * adds that change to the specified message.
-     */
-    public void checkForChange(StatListenerMessage msg) {
-      long currentValue = stats.getRawBits(stat);
-      if (oldValueInitialized) {
-        if (currentValue == oldValue) {
-          return;
-        }
-      } else {
-        oldValueInitialized = true;
-      }
-      oldValue = currentValue;
-      msg.addChange(listenerId, getBitsAsDouble(currentValue));
-    }
-  }
-
-  protected static class LongStatListenerImpl extends RemoteStatListenerImpl {
-    @Override
-    protected double getBitsAsDouble(long bits) {
-      return bits;
-    }
-  }
-
-  protected static class FloatStatListenerImpl extends RemoteStatListenerImpl {
-    @Override
-    protected double getBitsAsDouble(long bits) {
-      return Float.intBitsToFloat((int)bits);
-    }
-  }
-  
-  protected static class DoubleStatListenerImpl extends RemoteStatListenerImpl {
-    @Override
-    protected double getBitsAsDouble(long bits) {
-      return Double.longBitsToDouble(bits);
-    }
-  }
-}



Mime
View raw message