You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2018/07/12 00:05:32 UTC

[geode] branch feature/Micrometer updated: Refactored stats to have public interfaces in own package Refactored DistributedSystem.java and InternalDistributedSystem.java to now contain a InternalDistributedSystemStats.java instead of being one

This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/Micrometer
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/Micrometer by this push:
     new 971aff5  Refactored stats to have public interfaces in own package Refactored DistributedSystem.java and InternalDistributedSystem.java to now contain a InternalDistributedSystemStats.java instead of being one
971aff5 is described below

commit 971aff58d385642edb0fdf5d8ef66cac85010d06
Author: Udo Kohlmeyer <uk...@pivotal.io>
AuthorDate: Wed Jul 11 17:05:17 2018 -0700

    Refactored stats to have public interfaces in own package
    Refactored DistributedSystem.java and InternalDistributedSystem.java to
    now contain a InternalDistributedSystemStats.java instead of being one
---
 .../internal/common/AbstractSessionCache.java      |   2 +-
 .../session/catalina/AbstractSessionCache.java     |   2 +-
 .../catalina/internal/DeltaSessionStatistics.java  |  10 +-
 .../geode/modules/util/ModuleStatistics.java       |  12 +-
 geode-core/build.gradle                            |   2 +
 .../asyncqueue/internal/AsyncEventQueueStats.java  |   8 +-
 .../internal/ParallelAsyncEventQueueImpl.java      |   2 +-
 .../internal/SerialAsyncEventQueueImpl.java        |   2 +-
 .../cache/client/internal/ConnectionStats.java     |  10 +-
 .../cache/client/internal/EndpointManagerImpl.java |  34 +-
 .../geode/cache/client/internal/PoolImpl.java      |  42 +-
 .../cache/query/internal/CqQueryVsdStats.java      |  10 +-
 .../query/internal/index/AbstractMapIndex.java     |   2 +-
 .../query/internal/index/CompactRangeIndex.java    |   2 +-
 .../cache/query/internal/index/HashIndex.java      |   2 +-
 .../cache/query/internal/index/IndexStats.java     |  10 +-
 .../query/internal/index/PartitionedIndex.java     |   2 +-
 .../cache/query/internal/index/RangeIndex.java     |   2 +-
 .../geode/distributed/DistributedSystem.java       |   7 +-
 .../internal/ClusterDistributionManager.java       |   2 +-
 .../distributed/internal/DistributionStats.java    |  10 +-
 .../internal/InternalDistributedSystem.java        | 425 +++------------------
 .../distributed/internal/InternalLocator.java      |   2 +-
 .../geode/distributed/internal/LocatorStats.java   |  10 +-
 .../distributed/internal/locks/DLockService.java   |   8 +-
 .../distributed/internal/locks/DLockStats.java     |  10 +-
 .../distributed/internal/tcpserver/TcpServer.java  |   2 +-
 .../org/apache/geode/internal/HistogramStats.java  |   8 +-
 .../geode/internal/admin/ClientStatsManager.java   |  18 +-
 .../geode/internal/admin/StatAlertDefinition.java  |   2 +-
 .../geode/internal/admin/StatAlertsManager.java    |   8 +-
 .../remote/FetchResourceAttributesResponse.java    |  38 +-
 .../internal/admin/remote/FetchStatsResponse.java  |  28 +-
 .../geode/internal/admin/remote/RemoteStat.java    |   4 +-
 .../internal/admin/remote/RemoteStatResource.java  |   2 +-
 .../admin/statalerts/BaseDecoratorImpl.java        |   2 +-
 .../admin/statalerts/DummyStatisticInfoImpl.java   |   4 +-
 .../admin/statalerts/FunctionDecoratorImpl.java    |   2 +-
 .../statalerts/GaugeThresholdDecoratorImpl.java    |   2 +-
 .../admin/statalerts/MultiAttrDefinitionImpl.java  |   6 +-
 .../statalerts/NumberThresholdDecoratorImpl.java   |   2 +-
 .../admin/statalerts/SingleAttrDefinitionImpl.java |   6 +-
 .../internal/admin/statalerts/StatisticInfo.java   |   6 +-
 .../admin/statalerts/StatisticInfoImpl.java        |   8 +-
 .../geode/internal/cache/AbstractDiskRegion.java   |   2 +-
 .../geode/internal/cache/AbstractRegion.java       |   4 +-
 .../geode/internal/cache/CachePerfStats.java       |  10 +-
 .../geode/internal/cache/DirectoryHolder.java      |   2 +-
 .../geode/internal/cache/DiskDirectoryStats.java   |  10 +-
 .../geode/internal/cache/DiskRegionStats.java      |  10 +-
 .../apache/geode/internal/cache/DiskStoreImpl.java |   6 +-
 .../geode/internal/cache/DiskStoreStats.java       |  10 +-
 .../geode/internal/cache/DummyCachePerfStats.java  |   2 +-
 .../geode/internal/cache/EvictableRegion.java      |   2 +-
 .../geode/internal/cache/GemFireCacheImpl.java     |   2 +-
 .../geode/internal/cache/InternalRegion.java       |   2 +-
 .../apache/geode/internal/cache/LocalRegion.java   |   6 +-
 .../cache/OfflineCompactionDiskRegion.java         |   2 +-
 .../geode/internal/cache/PartitionedRegion.java    |   6 +-
 .../internal/cache/PartitionedRegionHelper.java    |   7 +-
 .../internal/cache/PartitionedRegionStats.java     |  10 +-
 .../org/apache/geode/internal/cache/PoolStats.java |  10 +-
 .../geode/internal/cache/ValidatingDiskRegion.java |  20 +-
 .../client/protocol/ClientProtocolService.java     |   2 +-
 .../internal/cache/control/HeapMemoryMonitor.java  |  12 +-
 .../cache/control/InternalResourceManager.java     |   2 +-
 .../cache/control/ResourceManagerStats.java        |  10 +-
 .../cache/eviction/AbstractEvictionController.java |   2 +-
 .../cache/eviction/CountLRUStatistics.java         |  10 +-
 .../cache/eviction/DisabledEvictionCounters.java   |   2 +-
 .../internal/cache/eviction/EvictionCounters.java  |   2 +-
 .../cache/eviction/EvictionCountersImpl.java       |   2 +-
 .../internal/cache/eviction/EvictionStats.java     |   2 +-
 .../internal/cache/eviction/HeapLRUStatistics.java |  10 +-
 .../cache/eviction/MemoryLRUStatistics.java        |  10 +-
 .../cache/execute/FunctionServiceStats.java        |  10 +-
 .../internal/cache/execute/FunctionStats.java      |  22 +-
 .../geode/internal/cache/ha/HARegionQueue.java     |   4 +-
 .../internal/cache/ha/HARegionQueueStats.java      |  10 +-
 .../cache/tier/sockets/CacheClientNotifier.java    |   4 +-
 .../tier/sockets/CacheClientNotifierStats.java     |  10 +-
 .../cache/tier/sockets/CacheClientProxy.java       |   4 +-
 .../cache/tier/sockets/CacheClientProxyStats.java  |  10 +-
 .../cache/tier/sockets/CacheClientUpdater.java     |  12 +-
 .../cache/tier/sockets/CacheServerStats.java       |  10 +-
 .../tier/sockets/ServerConnectionFactory.java      |   4 +-
 .../internal/cache/wan/AbstractGatewaySender.java  |   4 +-
 .../internal/cache/wan/GatewayReceiverStats.java   |  28 +-
 .../internal/cache/wan/GatewaySenderStats.java     |  10 +-
 .../apache/geode/internal/concurrent/Atomics.java  |   4 +-
 .../geode/internal/offheap/OffHeapMemoryStats.java |   2 +-
 .../geode/internal/offheap/OffHeapStorage.java     |  10 +-
 .../statistics/AbstractStatisticsFactory.java      |  10 +-
 .../geode/internal/statistics/CallbackSampler.java |   2 +-
 .../statistics/DummyStatisticsFactory.java         |   8 +-
 .../internal/statistics/DummyStatisticsImpl.java   |   6 +-
 .../internal/statistics/GemFireStatSampler.java    |  49 ++-
 .../geode/internal/statistics/HostStatHelper.java  |   2 +-
 .../geode/internal/statistics/HostStatSampler.java |   2 +-
 ...ry.java => InternalDistributedSystemStats.java} | 254 ++++++------
 .../statistics/LocalStatisticsFactory.java         |   6 +-
 .../internal/statistics/LocalStatisticsImpl.java   |   4 +-
 .../statistics/MapBasedStatisticsNotification.java |   6 +-
 .../internal/statistics/ResourceInstance.java      |   4 +-
 .../geode/internal/statistics/ResourceType.java    |   4 +-
 .../geode/internal/statistics/SampleCollector.java |   6 +-
 .../internal/statistics/SimpleStatisticId.java     |   4 +-
 .../internal/statistics/StatArchiveWriter.java     |   2 +-
 .../internal/statistics/StatSamplerStats.java      |  10 +-
 .../statistics/StatisticDescriptorImpl.java        |   6 +-
 .../geode/internal/statistics/StatisticId.java     |   4 +-
 .../geode/internal/statistics/StatisticsImpl.java  |   6 +-
 .../internal/statistics/StatisticsManager.java     |   4 +-
 .../statistics/StatisticsNotification.java         |   6 +-
 .../internal/statistics/StatisticsSampler.java     |   2 +-
 .../statistics/StatisticsTypeFactoryImpl.java      |   6 +-
 .../internal/statistics/StatisticsTypeImpl.java    |   8 +-
 .../internal/statistics/StatisticsTypeXml.java     |   6 +-
 .../apache/geode/internal/statistics/VMStats.java  |  10 +-
 .../statistics/VMStatsContractFactory.java         |   2 +-
 .../geode/internal/statistics/ValueMonitor.java    |   6 +-
 .../micrometer/MicrometerStatsFactory.java         | 137 +++++++
 .../statistics/platform/LinuxProcessStats.java     |   8 +-
 .../statistics/platform/LinuxSystemStats.java      |   6 +-
 .../statistics/platform/OSXProcessStats.java       |   8 +-
 .../statistics/platform/OSXSystemStats.java        |   6 +-
 .../statistics/platform/OsStatisticsFactory.java   |   6 +-
 .../internal/statistics/platform/ProcessStats.java |   2 +-
 .../statistics/platform/SolarisProcessStats.java   |   8 +-
 .../statistics/platform/SolarisSystemStats.java    |   6 +-
 .../statistics/platform/WindowsProcessStats.java   |   8 +-
 .../statistics/platform/WindowsSystemStats.java    |   6 +-
 .../internal/stats50/Atomic50StatisticsImpl.java   |   4 +-
 .../apache/geode/internal/stats50/VMStats50.java   |  10 +-
 .../management/internal/FederatingManager.java     |  24 +-
 .../geode/management/internal/LocalManager.java    |   2 +-
 .../internal/beans/AsyncEventQueueMBeanBridge.java |   2 +-
 .../internal/beans/GatewaySenderMBeanBridge.java   |   2 +-
 .../internal/beans/MemberMBeanBridge.java          |  22 +-
 .../internal/beans/RegionMBeanBridge.java          |   2 +-
 .../beans/stats/AggregateRegionStatsMonitor.java   |   5 +-
 .../internal/beans/stats/GCStatsMonitor.java       |   2 +-
 .../beans/stats/GatewaySenderOverflowMonitor.java  |   4 +-
 .../internal/beans/stats/MBeanStatsMonitor.java    |   6 +-
 .../beans/stats/MemberLevelDiskMonitor.java        |   5 +-
 .../internal/beans/stats/VMStatsMonitor.java       |   2 +-
 .../src/main/java/org/apache/geode/package.html    |  32 +-
 .../{ => statistics}/StatisticDescriptor.java      |   2 +-
 .../apache/geode/{ => statistics}/Statistics.java  |   2 +-
 .../geode/{ => statistics}/StatisticsFactory.java  |   2 +-
 .../geode/{ => statistics}/StatisticsType.java     |   2 +-
 .../{ => statistics}/StatisticsTypeFactory.java    |   2 +-
 .../AutoConnectionSourceImplJUnitTest.java         |   6 +-
 .../client/internal/QueueManagerJUnitTest.java     |  32 +-
 .../pooling/ConnectionManagerJUnitTest.java        |  10 +-
 .../management/MemoryThresholdsDUnitTest.java      |   2 +-
 .../geode/cache30/ClientMembershipDUnitTest.java   |   8 +-
 .../gms/fd/GMSHealthMonitorJUnitTest.java          |   2 +-
 .../gms/messenger/JGroupsMessengerJUnitTest.java   |   2 +-
 .../internal/cache/ComplexDiskRegionJUnitTest.java |   6 +-
 .../internal/cache/DiskInitFileJUnitTest.java      |   2 +-
 .../geode/internal/cache/OplogJUnitTest.java       |   6 +-
 .../geode/internal/cache/OplogRVVJUnitTest.java    |   2 +-
 .../cache/PartitionedRegionStatsDUnitTest.java     |   2 +-
 .../cache/PartitionedRegionStatsJUnitTest.java     |   2 +-
 .../internal/cache/SimpleDiskRegionJUnitTest.java  |   4 +-
 .../execute/FunctionServiceStatsDUnitTest.java     | 121 +++---
 .../CacheServerMaxConnectionsJUnitTest.java        |   8 +-
 .../ClientHealthMonitorIntegrationTest.java        |   8 +-
 .../ParallelQueueRemovalMessageJUnitTest.java      |   2 +-
 .../internal/offheap/NullOffHeapMemoryStats.java   |   2 +-
 .../internal/offheap/OffHeapStorageJUnitTest.java  |   2 +-
 .../statistics/DiskSpaceLimitIntegrationTest.java  |   6 +-
 ...DistributedSystemStatisticsIntegrationTest.java |  10 +-
 ...ributedSystemStatisticsTypeIntegrationTest.java |   8 +-
 .../statistics/FileSizeLimitIntegrationTest.java   |   6 +-
 .../GemFireStatSamplerIntegrationTest.java         |  77 +---
 .../internal/statistics/LinuxSystemStatsTest.java  |   2 +-
 .../internal/statistics/SampleCollectorTest.java   |   6 +-
 .../SimpleStatSamplerIntegrationTest.java          |   4 +-
 ...rchiveWithConsecutiveResourceInstGenerator.java |   6 +-
 .../StatArchiveWriterReaderIntegrationTest.java    |   6 +-
 .../statistics/StatSamplerIntegrationTest.java     |   6 +-
 .../internal/statistics/StatSamplerTestCase.java   |   4 +-
 .../StatTypesAreRolledOverRegressionTest.java      |   6 +-
 .../statistics/StatisticsDistributedTest.java      |  22 +-
 .../internal/statistics/TestStatisticsManager.java |   4 +-
 .../internal/statistics/TestStatisticsSampler.java |   2 +-
 .../statistics/ValueMonitorIntegrationTest.java    |   6 +-
 .../internal/stats50/AtomicStatsJUnitTest.java     |  14 +-
 .../bean/stats/AsyncEventQueueStatsJUnitTest.java  |   4 +-
 .../management/bean/stats/DiskStatsJUnitTest.java  |   2 +-
 .../bean/stats/GatewayMBeanBridgeJUnitTest.java    |   2 +-
 .../bean/stats/MemberLevelStatsJUnitTest.java      |  12 +-
 .../bean/stats/RegionStatsJUnitTest.java           |   6 +-
 .../management/bean/stats/StatsRateJUnitTest.java  |   2 +-
 .../internal/beans/ManagementAdapterTest.java      |   2 +-
 .../beans/stats/MBeanStatsMonitorTest.java         |   6 +-
 .../dunit/internal/JUnit4DistributedTestCase.java  |   2 +-
 .../java/org/apache/geode/test/fake/Fakes.java     |   6 +-
 .../geode/cache/query/internal/cq/CqQueryImpl.java |   4 +-
 .../cache/query/internal/cq/CqServiceImpl.java     |   4 +-
 .../cache/query/internal/cq/CqServiceVsdStats.java |  10 +-
 .../internal/LuceneIndexForPartitionedRegion.java  |   2 +-
 .../cache/lucene/internal/LuceneIndexImpl.java     |   2 +-
 .../cache/lucene/internal/LuceneIndexStats.java    |  10 +-
 .../internal/filesystem/FileSystemStats.java       |  10 +-
 .../lucene/internal/LuceneIndexStatsJUnitTest.java |   6 +-
 .../internal/LuceneServiceImplJUnitTest.java       |   4 +-
 .../filesystem/FileSystemStatsJUnitTest.java       |   6 +-
 .../IndexRepositoryImplPerformanceTest.java        |   6 +-
 .../statistics/ProtobufClientStatistics.java       |  10 +-
 .../protobuf/v1/ProtobufProtocolService.java       |   2 +-
 .../protobuf/v1/AuthenticationIntegrationTest.java |   6 +-
 .../v1/acceptance/CacheConnectionJUnitTest.java    |   6 +-
 .../v1/acceptance/LocatorConnectionDUnitTest.java  |   6 +-
 216 files changed, 1149 insertions(+), 1318 deletions(-)

diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/common/AbstractSessionCache.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/common/AbstractSessionCache.java
index 7d65961..602c6cb 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/common/AbstractSessionCache.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/common/AbstractSessionCache.java
@@ -70,7 +70,7 @@ public abstract class AbstractSessionCache implements SessionCache {
   }
 
   protected void createStatistics() {
-    this.statistics = new DeltaSessionStatistics(getCache().getDistributedSystem(),
+    this.statistics = new DeltaSessionStatistics(getCache().getDistributedSystem().getStatisticsFactory(),
         (String) properties.get(CacheProperty.STATISTICS_NAME));
   }
 
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/AbstractSessionCache.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/AbstractSessionCache.java
index 1764190..8d2a172 100644
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/AbstractSessionCache.java
+++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/AbstractSessionCache.java
@@ -94,7 +94,7 @@ public abstract class AbstractSessionCache implements SessionCache {
   }
 
   protected void createStatistics() {
-    this.statistics = new DeltaSessionStatistics(getCache().getDistributedSystem(),
+    this.statistics = new DeltaSessionStatistics(getCache().getDistributedSystem().getStatisticsFactory(),
         getSessionManager().getStatisticsName());
   }
 
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/internal/DeltaSessionStatistics.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/internal/DeltaSessionStatistics.java
index 57c14b4..8c3499f 100644
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/internal/DeltaSessionStatistics.java
+++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/internal/DeltaSessionStatistics.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.modules.session.catalina.internal;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class DeltaSessionStatistics {
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/ModuleStatistics.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/ModuleStatistics.java
index 6f276c4..137af57 100644
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/ModuleStatistics.java
+++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/ModuleStatistics.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.modules.util;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
@@ -64,7 +64,7 @@ public class ModuleStatistics {
   public static ModuleStatistics getInstance(DistributedSystem system) {
     synchronized (ModuleStatistics.class) {
       if (instance == null) {
-        instance = new ModuleStatistics(system);
+        instance = new ModuleStatistics(system.getStatisticsFactory());
       }
     }
     return instance;
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index d409e1e..8fe6691 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -38,6 +38,8 @@ dependencies {
   antlr 'antlr:antlr:' + project.'antlr.version'
 
   // External
+  compile group: 'io.micrometer', name: 'micrometer-core', version: '1.0.5'
+
   compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar")
   testCompile files("${System.getProperty('java.home')}/../lib/tools.jar")
   compile 'com.github.stephenc.findbugs:findbugs-annotations:' + project.'stephenc-findbugs.version'
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueStats.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueStats.java
index 2f317cf..cb3ad81 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueStats.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueStats.java
@@ -14,10 +14,10 @@
  */
 package org.apache.geode.cache.asyncqueue.internal;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.cache.wan.GatewaySenderStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
index 8e2e4e4..aece4cf 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
@@ -48,7 +48,7 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
     if (!(this.cache instanceof CacheCreation)) {
       // this sender lies underneath the AsyncEventQueue. Need to have
       // AsyncEventQueueStats
-      this.statistics = new AsyncEventQueueStats(cache.getDistributedSystem(),
+      this.statistics = new AsyncEventQueueStats(cache.getDistributedSystem().getStatisticsFactory(),
           AsyncEventQueueImpl.getAsyncEventQueueIdFromSenderId(id));
     }
     this.isForInternalUse = true;
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
index 400126d..5b3ef95 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
@@ -50,7 +50,7 @@ public class SerialAsyncEventQueueImpl extends AbstractGatewaySender {
     if (!(this.cache instanceof CacheCreation)) {
       // this sender lies underneath the AsyncEventQueue. Need to have
       // AsyncEventQueueStats
-      this.statistics = new AsyncEventQueueStats(cache.getDistributedSystem(),
+      this.statistics = new AsyncEventQueueStats(cache.getDistributedSystem().getStatisticsFactory(),
           AsyncEventQueueImpl.getAsyncEventQueueIdFromSenderId(id));
     }
   }
diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionStats.java b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionStats.java
index 20b00f1..a115bf3 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.cache.client.internal;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.cache.PoolStats;
 import org.apache.geode.internal.cache.tier.sockets.MessageStats;
diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/EndpointManagerImpl.java b/geode-core/src/main/java/org/apache/geode/cache/client/internal/EndpointManagerImpl.java
index 663d99f..59fad1c 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/EndpointManagerImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/EndpointManagerImpl.java
@@ -39,17 +39,18 @@ public class EndpointManagerImpl implements EndpointManager {
   private static final Logger logger = LogService.getLogger();
 
   private volatile Map<ServerLocation, Endpoint> endpointMap = Collections.emptyMap();
-  private final Map/* <ServerLocation, ConnectionStats> */<ServerLocation, ConnectionStats> statMap =
+  private final Map/* <ServerLocation, ConnectionStats> */<ServerLocation, ConnectionStats>
+      statMap =
       new HashMap<ServerLocation, ConnectionStats>();
-  private final DistributedSystem ds;
+  private final DistributedSystem distributedSystem;
   private final String poolName;
   private final EndpointListenerBroadcaster listener = new EndpointListenerBroadcaster();
   protected final CancelCriterion cancelCriterion;
   private final PoolStats poolStats;
 
   public EndpointManagerImpl(String poolName, DistributedSystem ds, CancelCriterion cancelCriterion,
-      PoolStats poolStats) {
-    this.ds = ds;
+                             PoolStats poolStats) {
+    this.distributedSystem = ds;
     this.poolName = poolName;
     this.cancelCriterion = cancelCriterion;
     this.poolStats = poolStats;
@@ -72,7 +73,7 @@ public class EndpointManagerImpl implements EndpointManager {
           ConnectionStats stats = getStats(server);
           Map<ServerLocation, Endpoint> endpointMapTemp =
               new HashMap<ServerLocation, Endpoint>(endpointMap);
-          endpoint = new Endpoint(this, ds, server, stats, memberId);
+          endpoint = new Endpoint(this, distributedSystem, server, stats, memberId);
           listener.clearPdxRegistry(endpoint);
           endpointMapTemp.put(server, endpoint);
           endpointMap = Collections.unmodifiableMap(endpointMapTemp);
@@ -106,7 +107,9 @@ public class EndpointManagerImpl implements EndpointManager {
     removeEndpoint(endpoint, false);
   }
 
-  /** Used by Endpoint only, when the reference count for this endpoint reaches 0 */
+  /**
+   * Used by Endpoint only, when the reference count for this endpoint reaches 0
+   */
   private void removeEndpoint(Endpoint endpoint, boolean crashed) {
     endpoint.close();
     boolean removedEndpoint = false;
@@ -165,7 +168,6 @@ public class EndpointManagerImpl implements EndpointManager {
   }
 
 
-
   /*
    * (non-Javadoc)
    *
@@ -181,7 +183,7 @@ public class EndpointManagerImpl implements EndpointManager {
    * @see org.apache.geode.cache.client.internal.EndpointManager#close()
    */
   public synchronized void close() {
-    for (Iterator<ConnectionStats> itr = statMap.values().iterator(); itr.hasNext();) {
+    for (Iterator<ConnectionStats> itr = statMap.values().iterator(); itr.hasNext(); ) {
       ConnectionStats stats = itr.next();
       stats.close();
     }
@@ -224,9 +226,10 @@ public class EndpointManagerImpl implements EndpointManager {
         }
       }
       if (stats == null) {
-        stats = new ConnectionStats(ds, statName, this.poolStats/*
-                                                                 * , this.gatewayStats
-                                                                 */);
+        stats =
+            new ConnectionStats(distributedSystem.getStatisticsFactory(), statName, this.poolStats/*
+             * , this.gatewayStats
+             */);
       }
       statMap.put(location, stats);
     }
@@ -268,21 +271,21 @@ public class EndpointManagerImpl implements EndpointManager {
     }
 
     public void endpointCrashed(Endpoint endpoint) {
-      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext();) {
+      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext(); ) {
         EndpointManager.EndpointListener listener = itr.next();
         listener.endpointCrashed(endpoint);
       }
     }
 
     public void endpointNoLongerInUse(Endpoint endpoint) {
-      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext();) {
+      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext(); ) {
         EndpointManager.EndpointListener listener = itr.next();
         listener.endpointNoLongerInUse(endpoint);
       }
     }
 
     public void endpointNowInUse(Endpoint endpoint) {
-      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext();) {
+      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext(); ) {
         EndpointManager.EndpointListener listener = itr.next();
         if (!(listener instanceof PdxRegistryRecoveryListener)) {
           listener.endpointNowInUse(endpoint);
@@ -291,7 +294,7 @@ public class EndpointManagerImpl implements EndpointManager {
     }
 
     public void clearPdxRegistry(Endpoint endpoint) {
-      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext();) {
+      for (Iterator<EndpointListener> itr = endpointListeners.iterator(); itr.hasNext(); ) {
         EndpointManager.EndpointListener listener = itr.next();
         if (listener instanceof PdxRegistryRecoveryListener) {
           listener.endpointNowInUse(endpoint);
@@ -302,7 +305,6 @@ public class EndpointManagerImpl implements EndpointManager {
   }
 
 
-
   public class EndpointListenerForBridgeMembership implements EndpointManager.EndpointListener {
 
     public void endpointCrashed(Endpoint endpoint) {
diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/PoolImpl.java b/geode-core/src/main/java/org/apache/geode/cache/client/internal/PoolImpl.java
index 29b288b..e200864 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/PoolImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/PoolImpl.java
@@ -35,7 +35,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.CacheClosedException;
 import org.apache.geode.cache.NoSubscriptionServersAvailableException;
@@ -133,7 +133,7 @@ public class PoolImpl implements InternalPool {
   private ScheduledExecutorService backgroundProcessor;
   private final OpExecutorImpl executor;
   private final RegisterInterestTracker riTracker = new RegisterInterestTracker();
-  private final InternalDistributedSystem dsys;
+  private final InternalDistributedSystem internalDistributedSystem;
   private InternalCache cache;
 
   private final ClientProxyMembershipID proxyId;
@@ -215,15 +215,15 @@ public class PoolImpl implements InternalPool {
         ((PoolFactoryImpl.PoolAttributes) attributes).startDisabled || !pm.isNormal();
     this.usedByGateway = ((PoolFactoryImpl.PoolAttributes) attributes).isGateway();
     this.gatewaySender = ((PoolFactoryImpl.PoolAttributes) attributes).getGatewaySender();
-    this.dsys = distributedSystem;
-    if (this.dsys == null) {
+    this.internalDistributedSystem = distributedSystem;
+    if (this.internalDistributedSystem == null) {
       throw new IllegalStateException(
           LocalizedStrings.PoolImpl_DISTRIBUTED_SYSTEM_MUST_BE_CREATED_BEFORE_CREATING_POOL
               .toLocalizedString());
     }
     this.cache = cache;
-    this.securityLogWriter = this.dsys.getSecurityInternalLogWriter();
-    if (!this.dsys.getConfig().getStatisticSamplingEnabled() && this.statisticInterval > 0) {
+    this.securityLogWriter = this.internalDistributedSystem.getSecurityInternalLogWriter();
+    if (!this.internalDistributedSystem.getConfig().getStatisticSamplingEnabled() && this.statisticInterval > 0) {
       logger.info(LocalizedMessage.create(
           LocalizedStrings.PoolImpl_STATISTIC_SAMPLING_MUST_BE_ENABLED_FOR_SAMPLING_RATE_OF_0_TO_TAKE_AFFECT,
           this.statisticInterval));
@@ -231,24 +231,24 @@ public class PoolImpl implements InternalPool {
     this.cancelCriterion = new Stopper();
     if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE")) {
       ClientProxyMembershipID.setPoolName(name);
-      this.proxyId = ClientProxyMembershipID.getNewProxyMembership(this.dsys);
+      this.proxyId = ClientProxyMembershipID.getNewProxyMembership(this.internalDistributedSystem);
       ClientProxyMembershipID.setPoolName(null);
     } else {
-      this.proxyId = ClientProxyMembershipID.getNewProxyMembership(this.dsys);
+      this.proxyId = ClientProxyMembershipID.getNewProxyMembership(this.internalDistributedSystem);
     }
     StatisticsFactory statFactory = null;
     if (this.gatewaySender != null) {
       statFactory = new DummyStatisticsFactory();
     } else {
-      statFactory = this.dsys;
+      statFactory = this.internalDistributedSystem.getInternalDistributedSystemStats();
     }
     this.stats = this.startDisabled ? null
         : new PoolStats(statFactory, getName() + "->"
             + (isEmpty(serverGroup) ? "[any servers]" : "[" + getServerGroup() + "]"));
 
     source = getSourceImpl(((PoolFactoryImpl.PoolAttributes) attributes).locatorCallback);
-    endpointManager = new EndpointManagerImpl(name, this.dsys, this.cancelCriterion, this.stats);
-    connectionFactory = new ConnectionFactoryImpl(source, endpointManager, this.dsys,
+    endpointManager = new EndpointManagerImpl(name, this.internalDistributedSystem, this.cancelCriterion, this.stats);
+    connectionFactory = new ConnectionFactoryImpl(source, endpointManager, this.internalDistributedSystem,
         socketBufferSize, socketConnectTimeout, readTimeout, proxyId, this.cancelCriterion,
         usedByGateway, gatewaySender, pingInterval, multiuserSecureModeEnabled, this);
     if (subscriptionEnabled) {
@@ -351,7 +351,7 @@ public class PoolImpl implements InternalPool {
     }
 
 
-    if (this.statisticInterval > 0 && this.dsys.getConfig().getStatisticSamplingEnabled()) {
+    if (this.statisticInterval > 0 && this.internalDistributedSystem.getConfig().getStatisticSamplingEnabled()) {
       backgroundProcessor.scheduleWithFixedDelay(new PublishClientStatsTask(), statisticInterval,
           statisticInterval, TimeUnit.MILLISECONDS);
     }
@@ -511,8 +511,8 @@ public class PoolImpl implements InternalPool {
       if (SPECIAL_DURABLE) {
         synchronized (simpleLock) {
           try {
-            if (cache == null && dsys != null) {
-              cache = dsys.getCache();
+            if (cache == null && internalDistributedSystem != null) {
+              cache = internalDistributedSystem.getCache();
               if (cache == null) {
                 throw new IllegalStateException(
                     LocalizedStrings.PoolImpl_CACHE_MUST_BE_CREATED_BEFORE_CREATING_POOL
@@ -1013,7 +1013,7 @@ public class PoolImpl implements InternalPool {
 
   public boolean isDurableClient() {
     boolean isDurable = false;
-    DistributionConfig config = dsys.getConfig();
+    DistributionConfig config = internalDistributedSystem.getConfig();
     String durableClientId = config.getDurableClientId();
     isDurable = durableClientId != null && durableClientId.length() > 0;
     return isDurable;
@@ -1430,8 +1430,8 @@ public class PoolImpl implements InternalPool {
     for (Entry<Object, Object> entry : properties.entrySet()) {
       props.setProperty((String) entry.getKey(), (String) entry.getValue());
     }
-    if (cache == null && dsys != null) {
-      cache = dsys.getCache();
+    if (cache == null && internalDistributedSystem != null) {
+      cache = internalDistributedSystem.getCache();
       if (cache == null) {
         throw new IllegalStateException(
             LocalizedStrings.PoolImpl_CACHE_MUST_BE_CREATED_BEFORE_CREATING_POOL
@@ -1457,8 +1457,8 @@ public class PoolImpl implements InternalPool {
         return cacheCriterion.generateCancelledException(e);
       }
     } else {
-      if (cache == null && dsys != null) {
-        cache = dsys.getCache();
+      if (cache == null && internalDistributedSystem != null) {
+        cache = internalDistributedSystem.getCache();
         if (cache == null) {
           throw new IllegalStateException(
               LocalizedStrings.PoolImpl_CACHE_MUST_BE_CREATED_BEFORE_CREATING_POOL
@@ -1486,8 +1486,8 @@ public class PoolImpl implements InternalPool {
         }
         return null;
       } else {
-        if (cache == null && dsys != null) {
-          cache = dsys.getCache();
+        if (cache == null && internalDistributedSystem != null) {
+          cache = internalDistributedSystem.getCache();
           if (cache == null) {
             throw new IllegalStateException(
                 LocalizedStrings.PoolImpl_CACHE_MUST_BE_CREATED_BEFORE_CREATING_POOL
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CqQueryVsdStats.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CqQueryVsdStats.java
index a60fbab..e198adc 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CqQueryVsdStats.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CqQueryVsdStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.cache.query.internal;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.cache.query.CqEvent;
 import org.apache.geode.internal.cache.tier.MessageType;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractMapIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractMapIndex.java
index cbb49c9..a1a5933 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractMapIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractMapIndex.java
@@ -90,7 +90,7 @@ public abstract class AbstractMapIndex extends AbstractIndex {
     private IndexStats vsdStats;
 
     public MapIndexStatistics(String indexName) {
-      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem(), indexName);
+      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem().getStatisticsFactory(), indexName);
     }
 
     /**
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java
index 9a4e3a9..cf0f833 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java
@@ -955,7 +955,7 @@ public class CompactRangeIndex extends AbstractIndex {
     private IndexStats vsdStats;
 
     public RangeIndexStatistics(String indexName) {
-      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem(), indexName);
+      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem().getStatisticsFactory(), indexName);
     }
 
     /**
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
index 090dfc7..b4d7e63 100755
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
@@ -831,7 +831,7 @@ public class HashIndex extends AbstractIndex {
     private IndexStats vsdStats;
 
     public RangeIndexStatistics(String indexName) {
-      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem(), indexName);
+      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem().getStatisticsFactory(), indexName);
     }
 
     /**
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexStats.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexStats.java
index 4fc68db..2e82394 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexStats.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.cache.query.internal.index;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.cache.CachePerfStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/PartitionedIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/PartitionedIndex.java
index ab61767..f9f3977 100755
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/PartitionedIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/PartitionedIndex.java
@@ -425,7 +425,7 @@ public class PartitionedIndex extends AbstractIndex {
     private IndexStats vsdStats;
 
     public PartitionedIndexStatistics(String indexName) {
-      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem(), indexName);
+      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem().getStatisticsFactory(), indexName);
     }
 
     /**
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
index 9b433ec..e05f183 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
@@ -1470,7 +1470,7 @@ public class RangeIndex extends AbstractIndex {
 
     public RangeIndexStatistics(String indexName) {
 
-      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem(), indexName);
+      this.vsdStats = new IndexStats(getRegion().getCache().getDistributedSystem().getStatisticsFactory(), indexName);
     }
 
     /**
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/DistributedSystem.java b/geode-core/src/main/java/org/apache/geode/distributed/DistributedSystem.java
index b1f661c..c38a1c5 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/DistributedSystem.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/DistributedSystem.java
@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.LogWriter;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.client.ClientCache;
@@ -77,7 +77,8 @@ import org.apache.geode.internal.util.IOUtils;
  *
  * @since GemFire 3.0
  */
-public abstract class DistributedSystem implements StatisticsFactory {
+//public abstract class DistributedSystem implements StatisticsFactory {
+public abstract class DistributedSystem{
 
   /**
    * The instances of <code>DistributedSystem</code> created in this VM. Presently only one connect
@@ -750,4 +751,6 @@ public abstract class DistributedSystem implements StatisticsFactory {
    */
   public abstract DistributedSystem getReconnectedSystem();
 
+  public abstract StatisticsFactory getStatisticsFactory();
+
 }
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java
index a513627..71d880b 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java
@@ -666,7 +666,7 @@ public class ClusterDistributionManager implements DistributionManager {
        * deadcoded since we don't know the channel id yet. if (statId == 0 || statId == -1) { statId
        * = getMembershipPort(); }
        */
-      this.stats = new DistributionStats(system, statId);
+      this.stats = new DistributionStats(system.getStatisticsFactory(), statId);
       DistributionStats.enableClockStats = system.getConfig().getEnableTimeStatistics();
     }
 
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionStats.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionStats.java
index ad109bd..fdffef4 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionStats.java
@@ -16,11 +16,11 @@ package org.apache.geode.distributed.internal;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
index ebca008..cc32d18 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
@@ -51,10 +51,12 @@ import org.apache.geode.ForcedDisconnectException;
 import org.apache.geode.GemFireConfigException;
 import org.apache.geode.GemFireIOException;
 import org.apache.geode.LogWriter;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.internal.statistics.InternalDistributedSystemStats;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.SystemConnectException;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.admin.AlertLevel;
@@ -120,11 +122,9 @@ import org.apache.geode.security.SecurityManager;
 /**
  * The concrete implementation of {@link DistributedSystem} that provides internal-only
  * functionality.
- *
  * @since GemFire 3.0
  */
-public class InternalDistributedSystem extends DistributedSystem
-    implements OsStatisticsFactory, StatisticsManager {
+public class InternalDistributedSystem extends DistributedSystem {
 
   /**
    * True if the user is allowed lock when memory resources appear to be overcommitted.
@@ -160,13 +160,20 @@ public class InternalDistributedSystem extends DistributedSystem
       new AtomicReference<CreationStackGenerator>(DEFAULT_CREATION_STACK_GENERATOR);
 
   /**
+   * The IDS StatiticsManager, StatisticsFactory and OsStatsFactory
+   */
+  private final InternalDistributedSystemStats internalDistributedSystemStats;
+
+  /**
    * The distribution manager that is used to communicate with the distributed system.
    */
   protected DistributionManager dm;
 
   private final GrantorRequestProcessor.GrantorRequestContext grc;
 
-  /** services provided by other modules */
+  /**
+   * services provided by other modules
+   */
   private Map<Class, DistributedSystemService> services = new HashMap<>();
 
   public GrantorRequestProcessor.GrantorRequestContext getGrantorRequestContext() {
@@ -335,7 +342,7 @@ public class InternalDistributedSystem extends DistributedSystem
   }
 
   public static InternalDistributedSystem newInstance(Properties config,
-      SecurityConfig securityConfig) {
+                                                      SecurityConfig securityConfig) {
     if (securityConfig == null) {
       return newInstance(config, null, null);
     } else {
@@ -345,7 +352,8 @@ public class InternalDistributedSystem extends DistributedSystem
   }
 
   public static InternalDistributedSystem newInstance(Properties config,
-      SecurityManager securityManager, PostProcessor postProcessor) {
+                                                      SecurityManager securityManager,
+                                                      PostProcessor postProcessor) {
     boolean success = false;
     InternalDataSerializer.checkSerializationVersion();
     try {
@@ -367,11 +375,10 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * creates a non-functional instance for testing
-   *
    * @param nonDefault - non-default distributed system properties
    */
   public static InternalDistributedSystem newInstanceForTesting(DistributionManager dm,
-      Properties nonDefault) {
+                                                                Properties nonDefault) {
     InternalDistributedSystem sys = new InternalDistributedSystem(nonDefault);
     sys.config = new RuntimeDistributionConfigImpl(sys);
     sys.dm = dm;
@@ -386,7 +393,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Returns a connection to the distributed system that is suitable for administration. For
    * administration, we are not as strict when it comes to existing connections.
-   *
    * @since GemFire 4.0
    */
   public static DistributedSystem connectForAdmin(Properties props) {
@@ -399,7 +405,6 @@ public class InternalDistributedSystem extends DistributedSystem
    * <p>
    * <p>
    * author bruce
-   *
    * @since GemFire 5.0
    */
   public static InternalDistributedSystem getConnectedInstance() {
@@ -421,7 +426,6 @@ public class InternalDistributedSystem extends DistributedSystem
    * size existingSystems uses copy-on-write.
    * <p>
    * author bruce
-   *
    * @since GemFire 5.0
    */
   public static InternalDistributedSystem unsafeGetConnectedInstance() {
@@ -491,16 +495,13 @@ public class InternalDistributedSystem extends DistributedSystem
     reconnectAttemptCounter = 0;
   }
 
-
   ////////////////////// Constructors //////////////////////
 
   /**
    * Creates a new <code>InternalDistributedSystem</code> with the given configuration properties.
-   * Does all of the magic of finding the "default" values of properties. See
-   * {@link DistributedSystem#connect} for a list of exceptions that may be thrown.
-   *
+   * Does all of the magic of finding the "default" values of properties. See {@link
+   * DistributedSystem#connect} for a list of exceptions that may be thrown.
    * @param nonDefault The non-default configuration properties specified by the caller
-   *
    * @see DistributedSystem#connect
    */
   private InternalDistributedSystem(Properties nonDefault) {
@@ -530,17 +531,24 @@ public class InternalDistributedSystem extends DistributedSystem
     }
 
     ((DistributionConfigImpl) this.originalConfig).checkForDisallowedDefaults(); // throws
-                                                                                 // IllegalStateEx
+    // IllegalStateEx
     this.shareSockets = this.originalConfig.getConserveSockets();
     this.startTime = System.currentTimeMillis();
     this.grc = new GrantorRequestProcessor.GrantorRequestContext(stopper);
 
     this.creationStack =
         TEST_CREATION_STACK_GENERATOR.get().generateCreationStack(this.originalConfig);
+
+    this.internalDistributedSystemStats = new InternalDistributedSystemStats(this.statsDisabled);
   }
 
   //////////////////// Instance Methods ////////////////////
 
+
+  public InternalDistributedSystemStats getInternalDistributedSystemStats() {
+    return internalDistributedSystemStats;
+  }
+
   public SecurityService getSecurityService() {
     return this.securityService;
   }
@@ -551,7 +559,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Registers a listener to the system
-   *
    * @param listener listener to be added
    */
   public void addResourceListener(ResourceEventsListener listener) {
@@ -560,7 +567,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Un-Registers a listener to the system
-   *
    * @param listener listener to be removed
    */
   public void removeResourceListener(ResourceEventsListener listener) {
@@ -576,7 +582,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Handles a particular event associated with a resource
-   *
    * @param event Resource event
    * @param resource resource on which event is generated
    */
@@ -719,7 +724,10 @@ public class InternalDistributedSystem extends DistributedSystem
       final long offHeapMemorySize =
           OffHeapStorage.parseOffHeapMemorySize(getConfig().getOffHeapMemorySize());
 
-      this.offHeapStore = OffHeapStorage.createOffHeapStorage(this, offHeapMemorySize, this);
+      this.offHeapStore =
+          OffHeapStorage
+              .createOffHeapStorage(this.getInternalDistributedSystemStats(), offHeapMemorySize,
+                  this);
 
       // Note: this can only happen on a linux system
       if (getConfig().getLockMemory()) {
@@ -913,9 +921,8 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Checks whether or not this connection to a distributed system is closed.
-   *
-   * @throws DistributedSystemDisconnectedException This connection has been
-   *         {@link #disconnect(boolean, String, boolean) disconnected}
+   * @throws DistributedSystemDisconnectedException This connection has been {@link
+   * #disconnect(boolean, String, boolean) disconnected}
    */
   private void checkConnected() {
     if (!isConnected()) {
@@ -940,6 +947,10 @@ public class InternalDistributedSystem extends DistributedSystem
     return this.isConnected;
   }
 
+  public void visitStatistics(StatisticsVisitor statisticsVisitor) {
+    this.getInternalDistributedSystemStats().visitStatistics(statisticsVisitor);
+  }
+
   /**
    * This class defers to the DM. If we don't have a DM, we're dead.
    */
@@ -1025,7 +1036,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Disconnects this member from the distributed system when an internal error has caused
    * distribution to fail (e.g., this member was shunned)
-   *
    * @param reason a string describing why the disconnect is occurring
    * @param cause an optional exception showing the reason for abnormal disconnect
    * @param shunned whether this member was shunned by the membership coordinator
@@ -1052,9 +1062,8 @@ public class InternalDistributedSystem extends DistributedSystem
       Long.getLong("DistributionManager.DISCONNECT_WAIT", 10 * 1000).longValue();
 
   /**
-   * Run a disconnect listener, checking for errors and honoring the timeout
-   * {@link #MAX_DISCONNECT_WAIT}.
-   *
+   * Run a disconnect listener, checking for errors and honoring the timeout {@link
+   * #MAX_DISCONNECT_WAIT}.
    * @param dc the listener to run
    */
   private void runDisconnect(final DisconnectListener dc, ThreadGroup tg) {
@@ -1116,7 +1125,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Run a disconnect listener in the same thread sequence as the reconnect.
-   *
    * @param dc the listener to run
    * @param tg the thread group to run the listener in
    */
@@ -1140,17 +1148,15 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Disconnect cache, run disconnect listeners.
-   *
    * @param doReconnect whether a reconnect will be done
    * @param reason the reason that the system is disconnecting
-   *
    * @return a collection of shutdownListeners
    */
   private HashSet doDisconnects(boolean doReconnect, String reason) {
     // Make a pass over the disconnect listeners, asking them _politely_
     // to clean up.
     HashSet shutdownListeners = new HashSet();
-    for (;;) {
+    for (; ; ) {
       DisconnectListener listener = null;
       synchronized (this.listeners) {
         Iterator itr = listeners.iterator();
@@ -1176,7 +1182,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Process the shutdown listeners. It is essential that the DM has been shut down before calling
    * this step, to ensure that no new listeners are registering.
-   *
    * @param shutdownListeners shutdown listeners initially registered with us
    */
   private void doShutdownListeners(HashSet shutdownListeners) {
@@ -1212,7 +1217,7 @@ public class InternalDistributedSystem extends DistributedSystem
     // disconnect listeners may have appeared. After messagingDisabled is
     // set, no new ones will be created. However, we must process any
     // that appeared in the interim.
-    for (;;) {
+    for (; ; ) {
       // Pluck next listener from the list
       DisconnectListener dcListener = null;
       ShutdownListener sdListener = null;
@@ -1262,7 +1267,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Ensure that the MembershipManager class gets loaded.
-   *
    * @see SystemFailure#loadEmergencyClasses()
    */
   public static void loadEmergencyClasses() {
@@ -1275,7 +1279,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Closes the membership manager
-   *
    * @see SystemFailure#emergencyClose()
    */
   public void emergencyClose() {
@@ -1334,7 +1337,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Disconnects this VM from the distributed system. Shuts down the distribution manager.
-   *
    * @param preparingForReconnect true if called by a reconnect operation
    * @param reason the reason the disconnect is being performed
    * @param keepAlive true if user requested durable subscriptions are to be retained at server.
@@ -1366,7 +1368,7 @@ public class InternalDistributedSystem extends DistributedSystem
           InternalCache currentCache = getCache();
           if (currentCache != null && !currentCache.isClosed()) {
             disconnectListenerThread.set(Boolean.TRUE); // bug #42663 - this must be set while
-                                                        // closing the cache
+            // closing the cache
             try {
               currentCache.close(reason, dm.getRootCause(), keepAlive, true); // fix for 42150
             } catch (VirtualMachineError e) {
@@ -1450,14 +1452,7 @@ public class InternalDistributedSystem extends DistributedSystem
         doShutdownListeners(shutdownListeners);
       }
 
-      // closing the Aggregate stats
-      if (functionServiceStats != null) {
-        functionServiceStats.close();
-      }
-      // closing individual function stats
-      for (FunctionStats functionstats : functionExecutionStatsMap.values()) {
-        functionstats.close();
-      }
+      this.getInternalDistributedSystemStats().closeFunctionStats();
 
       (new FunctionServiceManager()).unregisterAllFunctions();
 
@@ -1478,7 +1473,7 @@ public class InternalDistributedSystem extends DistributedSystem
       // NOTE: no logging after this point :-)
 
       LoggingThreadGroup.cleanUpThreadGroups(); // bug35388 - logwriters accumulate, causing mem
-                                                // leak
+      // leak
       EventID.unsetDS();
 
     } finally {
@@ -1500,6 +1495,7 @@ public class InternalDistributedSystem extends DistributedSystem
     }
   }
 
+
   /**
    * Returns the distribution manager for accessing this distributed system.
    */
@@ -1509,7 +1505,8 @@ public class InternalDistributedSystem extends DistributedSystem
   }
 
   /**
-   * Returns the distribution manager without checking for connected or not so can also return null.
+   * Returns the distribution manager without checking for connected or not so can also return
+   * null.
    */
   public DistributionManager getDM() {
     return this.dm;
@@ -1519,7 +1516,6 @@ public class InternalDistributedSystem extends DistributedSystem
    * If this DistributedSystem is attempting to reconnect to the distributed system this will return
    * the quorum checker created by the old MembershipManager for checking to see if a quorum of old
    * members can be reached.
-   *
    * @return the quorum checking service
    */
   public QuorumChecker getQuorumChecker() {
@@ -1536,7 +1532,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Returns whether or not this distributed system has the same configuration as the given set of
    * properties.
-   *
    * @see DistributedSystem#connect
    */
   public boolean sameAs(Properties props, boolean isConnected) {
@@ -1556,7 +1551,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Returns whether or not the given configuration properties refer to the same distributed system
    * as this <code>InternalDistributedSystem</code> connection.
-   *
    * @since GemFire 4.0
    */
   public boolean sameSystemAs(Properties props) {
@@ -1585,7 +1579,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Canonicalizes a locators string so that they may be compared.
-   *
    * @since GemFire 4.0
    */
   private static String canonicalizeLocators(String locators) {
@@ -1608,7 +1601,7 @@ public class InternalDistributedSystem extends DistributedSystem
     }
 
     StringBuilder sb = new StringBuilder();
-    for (Iterator iter = sorted.iterator(); iter.hasNext();) {
+    for (Iterator iter = sorted.iterator(); iter.hasNext(); ) {
       sb.append((String) iter.next());
       if (iter.hasNext()) {
         sb.append(",");
@@ -1627,7 +1620,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Returns the id of this connection to the distributed system. This is actually the port of the
    * distribution manager's distribution channel.
-   *
    */
   @Override
   public long getId() {
@@ -1704,9 +1696,9 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Since {@link DistributedSystem#connect} guarantees that there is a canonical instance of
-   * <code>DistributedSystem</code> for each configuration, we can use the default implementation of
+   * <code>DistributedSystem</code> for each configuration, we can use the default implementation
+   * of
    * <code>equals</code>.
-   *
    * @see #sameAs
    */
   @Override
@@ -1774,129 +1766,8 @@ public class InternalDistributedSystem extends DistributedSystem
     return sb.toString().trim();
   }
 
-  private final CopyOnWriteArrayList<Statistics> statsList = new CopyOnWriteArrayList<Statistics>();
-  private int statsListModCount = 0;
-  private AtomicLong statsListUniqueId = new AtomicLong(1);
-
-  // As the function execution stats can be lot in number, its better to put
-  // them in a map so that it will be accessible immediately
-  private final ConcurrentHashMap<String, FunctionStats> functionExecutionStatsMap =
-      new ConcurrentHashMap<String, FunctionStats>();
-  private FunctionServiceStats functionServiceStats = null;
-
-  public int getStatListModCount() {
-    return this.statsListModCount;
-  }
-
-  public List<Statistics> getStatsList() {
-    return this.statsList;
-  }
-
-  @Override
-  public int getStatisticsCount() {
-    int result = 0;
-    List<Statistics> statsList = this.statsList;
-    if (statsList != null) {
-      result = statsList.size();
-    }
-    return result;
-  }
-
-  @Override
-  public Statistics findStatistics(long id) {
-    List<Statistics> statsList = this.statsList;
-    for (Statistics s : statsList) {
-      if (s.getUniqueId() == id) {
-        return s;
-      }
-    }
-    throw new RuntimeException(
-        LocalizedStrings.PureStatSampler_COULD_NOT_FIND_STATISTICS_INSTANCE.toLocalizedString());
-  }
-
-  @Override
-  public boolean statisticsExists(long id) {
-    List<Statistics> statsList = this.statsList;
-    for (Statistics s : statsList) {
-      if (s.getUniqueId() == id) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  @Override
-  public Statistics[] getStatistics() {
-    List<Statistics> statsList = this.statsList;
-    return statsList.toArray(new Statistics[0]);
-  }
-
-  // StatisticsFactory methods
-  public Statistics createStatistics(StatisticsType type) {
-    return createOsStatistics(type, null, 0, 0);
-  }
-
-  public Statistics createStatistics(StatisticsType type, String textId) {
-    return createOsStatistics(type, textId, 0, 0);
-  }
-
-  public Statistics createStatistics(StatisticsType type, String textId, long numericId) {
-    return createOsStatistics(type, textId, numericId, 0);
-  }
-
-  public Statistics createOsStatistics(StatisticsType type, String textId, long numericId,
-      int osStatFlags) {
-    if (this.statsDisabled) {
-      return new DummyStatisticsImpl(type, textId, numericId);
-    }
-    long myUniqueId = statsListUniqueId.getAndIncrement();
-    Statistics result =
-        new LocalStatisticsImpl(type, textId, numericId, myUniqueId, false, osStatFlags, this);
-    synchronized (statsList) {
-      statsList.add(result);
-      statsListModCount++;
-    }
-    return result;
-  }
-
-  public FunctionStats getFunctionStats(String textId) {
-    FunctionStats stats = functionExecutionStatsMap.get(textId);
-    if (stats == null) {
-      stats = new FunctionStats(this, textId);
-      FunctionStats oldStats = functionExecutionStatsMap.putIfAbsent(textId, stats);
-      if (oldStats != null) {
-        stats.close();
-        stats = oldStats;
-      }
-    }
-    return stats;
-  }
-
-
-  public FunctionServiceStats getFunctionServiceStats() {
-    if (functionServiceStats == null) {
-      synchronized (this) {
-        if (functionServiceStats == null) {
-          functionServiceStats = new FunctionServiceStats(this, "FunctionExecution");
-        }
-      }
-    }
-    return functionServiceStats;
-  }
-
-  /**
-   * For every registered statistic instance call the specified visitor. This method was added to
-   * fix bug 40358
-   */
-  public void visitStatistics(StatisticsVisitor visitor) {
-    for (Statistics s : this.statsList) {
-      visitor.visit(s);
-    }
-  }
-
   /**
    * Used to "visit" each instance of Statistics registered with
-   *
    * @see #visitStatistics
    */
   public interface StatisticsVisitor {
@@ -1904,165 +1775,6 @@ public class InternalDistributedSystem extends DistributedSystem
     void visit(Statistics stat);
   }
 
-  public Set<String> getAllFunctionExecutionIds() {
-    return functionExecutionStatsMap.keySet();
-  }
-
-
-  public Statistics[] findStatisticsByType(final StatisticsType type) {
-    final ArrayList hits = new ArrayList();
-    visitStatistics(new StatisticsVisitor() {
-      public void visit(Statistics s) {
-        if (type == s.getType()) {
-          hits.add(s);
-        }
-      }
-    });
-    Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[]) hits.toArray(result);
-  }
-
-  public Statistics[] findStatisticsByTextId(final String textId) {
-    final ArrayList hits = new ArrayList();
-    visitStatistics(new StatisticsVisitor() {
-      public void visit(Statistics s) {
-        if (s.getTextId().equals(textId)) {
-          hits.add(s);
-        }
-      }
-    });
-    Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[]) hits.toArray(result);
-  }
-
-  public Statistics[] findStatisticsByNumericId(final long numericId) {
-    final ArrayList hits = new ArrayList();
-    visitStatistics(new StatisticsVisitor() {
-      public void visit(Statistics s) {
-        if (numericId == s.getNumericId()) {
-          hits.add(s);
-        }
-      }
-    });
-    Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[]) hits.toArray(result);
-  }
-
-  public Statistics findStatisticsByUniqueId(final long uniqueId) {
-    for (Statistics s : this.statsList) {
-      if (uniqueId == s.getUniqueId()) {
-        return s;
-      }
-    }
-    return null;
-  }
-
-  /**
-   * for internal use only. Its called by {@link LocalStatisticsImpl#close}.
-   */
-  public void destroyStatistics(Statistics stats) {
-    synchronized (statsList) {
-      if (statsList.remove(stats)) {
-        statsListModCount++;
-      }
-    }
-  }
-
-  public Statistics createAtomicStatistics(StatisticsType type) {
-    return createAtomicStatistics(type, null, 0);
-  }
-
-  public Statistics createAtomicStatistics(StatisticsType type, String textId) {
-    return createAtomicStatistics(type, textId, 0);
-  }
-
-  public Statistics createAtomicStatistics(StatisticsType type, String textId, long numericId) {
-    if (this.statsDisabled) {
-      return new DummyStatisticsImpl(type, textId, numericId);
-    }
-
-    long myUniqueId = statsListUniqueId.getAndIncrement();
-    Statistics result = StatisticsImpl.createAtomicNoOS(type, textId, numericId, myUniqueId, this);
-    synchronized (statsList) {
-      statsList.add(result);
-      statsListModCount++;
-    }
-    return result;
-  }
-
-
-  // StatisticsTypeFactory methods
-  private static final StatisticsTypeFactory tf = StatisticsTypeFactoryImpl.singleton();
-
-  /**
-   * Creates or finds a StatisticType for the given shared class.
-   */
-  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);
-  }
-
   public long getStartTime() {
     return this.startTime;
   }
@@ -2070,7 +1782,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Makes note of a <code>ConnectListener</code> whose <code>onConnect</code> method will be
    * invoked when a connection is created to a distributed system.
-   *
    * @return set of currently existing system connections
    */
   public static List addConnectListener(ConnectListener listener) {
@@ -2102,7 +1813,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Removes a <code>ConnectListener</code> from the list of listeners that will be notified when a
    * connection is created to a distributed system.
-   *
    * @return true if listener was in the list
    */
   public static boolean removeConnectListener(ConnectListener listener) {
@@ -2117,7 +1827,7 @@ public class InternalDistributedSystem extends DistributedSystem
    */
   private static void notifyConnectListeners(InternalDistributedSystem sys) {
     synchronized (connectListeners) {
-      for (Iterator iter = connectListeners.iterator(); iter.hasNext();) {
+      for (Iterator iter = connectListeners.iterator(); iter.hasNext(); ) {
         try {
           ConnectListener listener = (ConnectListener) iter.next();
           listener.onConnect(sys);
@@ -2155,7 +1865,7 @@ public class InternalDistributedSystem extends DistributedSystem
    * system has been recreated.
    */
   private static void notifyReconnectListeners(InternalDistributedSystem oldsys,
-      InternalDistributedSystem newsys, boolean starting) {
+                                               InternalDistributedSystem newsys, boolean starting) {
     List<ReconnectListener> listeners;
     synchronized (reconnectListeners) {
       listeners = new ArrayList<ReconnectListener>(reconnectListeners);
@@ -2191,7 +1901,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Notifies all resource event listeners. All exceptions are caught here and only a warning
    * message is printed in the log
-   *
    * @param event Enumeration depicting particular resource event
    * @param resource the actual resource object.
    */
@@ -2257,7 +1966,6 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Removes a <code>DisconnectListener</code> from the list of listeners that will be notified when
    * this connection to the distributed system is disconnected.
-   *
    * @return true if listener was in the list
    */
   public boolean removeDisconnectListener(DisconnectListener listener) {
@@ -2298,7 +2006,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Fires an "informational" <code>SystemMembershipEvent</code> in admin VMs.
-   *
    * @since GemFire 4.0
    */
   public void fireInfoEvent(Object callback) {
@@ -2364,7 +2071,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
     /**
      * Invoked before a connection to the distributed system is disconnected.
-     *
      * @param sys the the system we are disconnecting from process should take before returning.
      */
     void onDisconnect(InternalDistributedSystem sys);
@@ -2378,15 +2084,13 @@ public class InternalDistributedSystem extends DistributedSystem
 
     /**
      * Invoked when reconnect attempts are initiated
-     *
      * @param oldSystem the old DS, which is in a partially disconnected state and cannot be used
-     *        for messaging
+     * for messaging
      */
     void reconnecting(InternalDistributedSystem oldSystem);
 
     /**
      * Invoked after a reconnect to the distributed system
-     *
      * @param oldSystem the old DS
      * @param newSystem the new DS
      */
@@ -2400,7 +2104,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
     /**
      * Invoked after the connection to the distributed system has been disconnected
-     *
      */
     void onShutdown(InternalDistributedSystem sys);
   }
@@ -2523,7 +2226,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * Tries to reconnect to the distributed system on role loss if configure to reconnect.
-   *
    * @param oldCache cache that has apparently failed
    */
   public boolean tryReconnect(boolean forcedDisconnect, String reason, InternalCache oldCache) {
@@ -2532,7 +2234,7 @@ public class InternalDistributedSystem extends DistributedSystem
       return false;
     }
     synchronized (CacheFactory.class) { // bug #51335 - deadlock with app thread trying to create a
-                                        // cache
+      // cache
       synchronized (GemFireCacheImpl.class) {
         // bug 39329: must lock reconnectLock *after* the cache
         synchronized (this.reconnectLock) {
@@ -2706,9 +2408,8 @@ public class InternalDistributedSystem extends DistributedSystem
           return;
         }
 
-
         logger.info(LocalizedMessage.create(LocalizedStrings.DISTRIBUTED_SYSTEM_RECONNECTING,
-            new Object[] {reconnectAttemptCounter}));
+            new Object[]{reconnectAttemptCounter}));
 
         int savNumOfTries = reconnectAttemptCounter;
         try {
@@ -2785,7 +2486,6 @@ public class InternalDistributedSystem extends DistributedSystem
           reconnectAttemptCounter = savNumOfTries;
         }
 
-
         DistributionManager newDM = this.reconnectDS.getDistributionManager();
         if (newDM instanceof ClusterDistributionManager) {
           // Admin systems don't carry a cache, but for others we can now create
@@ -2885,7 +2585,7 @@ public class InternalDistributedSystem extends DistributedSystem
    * after an auto-reconnect we may need to recreate a cache server and start it
    */
   public void createAndStartCacheServers(List<CacheServerCreation> cacheServerCreation,
-      InternalCache cache) {
+                                         InternalCache cache) {
 
     List<CacheServer> servers = cache.getCacheServers();
 
@@ -2916,9 +2616,7 @@ public class InternalDistributedSystem extends DistributedSystem
   /**
    * Validates that the configuration provided is the same as the configuration for this
    * InternalDistributedSystem
-   *
    * @param propsToCheck the Properties instance to compare with the existing Properties
-   *
    * @throws IllegalStateException when the configuration is not the same other returns
    */
   public void validateSameProperties(Properties propsToCheck, boolean isConnected) {
@@ -3022,7 +2720,6 @@ public class InternalDistributedSystem extends DistributedSystem
 
   /**
    * see {@link org.apache.geode.admin.AdminDistributedSystemFactory}
-   *
    * @since GemFire 5.7
    */
   public static void setEnableAdministrationOnly(boolean adminOnly) {
@@ -3042,7 +2739,6 @@ public class InternalDistributedSystem extends DistributedSystem
    * distributed system. GemFire distributed system coordinator adjusts each member's time by an
    * offset. This offset for each member is calculated based on Berkeley Time Synchronization
    * algorithm.
-   *
    * @return time in milliseconds.
    */
   public long systemTimeMillis() {
@@ -3084,6 +2780,11 @@ public class InternalDistributedSystem extends DistributedSystem
   }
 
   @Override
+  public StatisticsFactory getStatisticsFactory() {
+    return getInternalDistributedSystemStats();
+  }
+
+  @Override
   public void stopReconnecting() {
     // (new ManagerLogWriter(LogWriterImpl.FINE_LEVEL, System.out)).fine("stopReconnecting invoked",
     // new Exception("stack trace"));
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
index 2ed7b9a..3e14fba 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
@@ -1267,7 +1267,7 @@ public class InternalLocator extends Locator implements ConnectListener {
   @Override
   public void onConnect(InternalDistributedSystem sys) {
     try {
-      this.stats.hookupStats(sys,
+      this.stats.hookupStats(sys.getStatisticsFactory(),
           SocketCreator.getLocalHost().getCanonicalHostName() + '-' + this.server.getBindAddress());
     } catch (UnknownHostException e) {
       logger.warn(e);
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/LocatorStats.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/LocatorStats.java
index 307b207..37a8b48 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/LocatorStats.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/LocatorStats.java
@@ -19,11 +19,11 @@ import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
index 3e0b201..47d08d7 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
@@ -36,7 +36,7 @@ import org.apache.logging.log4j.Logger;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
 import org.apache.geode.InternalGemFireException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.distributed.DistributedLockService;
 import org.apache.geode.distributed.DistributedSystem;
@@ -2923,10 +2923,10 @@ public class DLockService extends DistributedLockService {
   }
 
   /** Get or create static dlock stats */
-  protected static synchronized DistributedLockStats getOrCreateStats(DistributedSystem ds) {
+  protected static synchronized DistributedLockStats getOrCreateStats(DistributedSystem distributedSystem) {
     if (stats == DUMMY_STATS) {
-      Assert.assertTrue(ds != null, "Need an instance of InternalDistributedSystem");
-      StatisticsFactory statFactory = ds;
+      Assert.assertTrue(distributedSystem != null, "Need an instance of InternalDistributedSystem");
+      StatisticsFactory statFactory = distributedSystem.getStatisticsFactory();
       long statId = OSProcess.getId();
       stats = new DLockStats(statFactory, statId);
     }
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockStats.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockStats.java
index e84e1a8..8fb94c0 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockStats.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockStats.java
@@ -15,11 +15,11 @@
 
 package org.apache.geode.distributed.internal.locks;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.distributed.internal.PoolStatHelper;
 import org.apache.geode.distributed.internal.QueueStatHelper;
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
index 608c63d..17c2c14 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
@@ -524,7 +524,7 @@ public class TcpServer {
     try {
       ClientProtocolService clientProtocolService = clientProtocolServiceLoader.lookupService();
       clientProtocolService.initializeStatistics("LocatorStats",
-          internalLocator.getDistributedSystem());
+          internalLocator.getDistributedSystem().getStatisticsFactory());
       try (ClientProtocolProcessor pipeline = clientProtocolService.createProcessorForLocator(
           internalLocator, internalLocator.getCache().getSecurityService())) {
         while (!pipeline.socketProcessingIsFinished()) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/HistogramStats.java b/geode-core/src/main/java/org/apache/geode/internal/HistogramStats.java
index c99833d..99a3f30 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/HistogramStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/HistogramStats.java
@@ -14,10 +14,10 @@
  */
 package org.apache.geode.internal;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 
 
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/ClientStatsManager.java b/geode-core/src/main/java/org/apache/geode/internal/admin/ClientStatsManager.java
index c333906..3115161 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/ClientStatsManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/ClientStatsManager.java
@@ -20,8 +20,9 @@ import java.util.Map.Entry;
 
 import org.apache.commons.lang.exception.ExceptionUtils;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.internal.statistics.InternalDistributedSystemStats;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.cache.CacheWriterException;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.client.internal.PoolImpl;
@@ -126,7 +127,10 @@ public class ClientStatsManager {
       return false;
     }
     LogWriterI18n logger = currentCache.getLoggerI18n();
-    InternalDistributedSystem ds = (InternalDistributedSystem) currentCache.getDistributedSystem();
+    InternalDistributedSystem distributedSystem = (InternalDistributedSystem) currentCache.getDistributedSystem();
+    InternalDistributedSystemStats
+        internalDistributedSystemStats =
+        distributedSystem.getInternalDistributedSystemStats();
     if (currentCache.isClosed()) {
       return false;
     }
@@ -144,9 +148,9 @@ public class ClientStatsManager {
     }
 
     if (cachePerfStats == null) {
-      StatisticsType type = ds.findType("CachePerfStats");
+      StatisticsType type = internalDistributedSystemStats.findType("CachePerfStats");
       if (type != null) {
-        Statistics[] statistics = ds.findStatisticsByType(type);
+        Statistics[] statistics = internalDistributedSystemStats.findStatisticsByType(type);
         if (statistics != null && statistics.length > 0) {
           cachePerfStats = statistics[0];
         }
@@ -154,9 +158,9 @@ public class ClientStatsManager {
     }
 
     if (vmStats == null) {
-      StatisticsType type = ds.findType("VMStats");
+      StatisticsType type = internalDistributedSystemStats.findType("VMStats");
       if (type != null) {
-        Statistics[] statistics = ds.findStatisticsByType(type);
+        Statistics[] statistics = internalDistributedSystemStats.findStatisticsByType(type);
         if (statistics != null && statistics.length > 0) {
           vmStats = statistics[0];
         }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertDefinition.java b/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertDefinition.java
index 3886112..34540a2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertDefinition.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertDefinition.java
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.admin;
 
 import org.apache.geode.DataSerializable;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.admin.statalerts.StatisticInfo;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertsManager.java b/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertsManager.java
index d127766..deb623a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertsManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertsManager.java
@@ -26,9 +26,9 @@ import java.util.TimerTask;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelException;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.admin.jmx.internal.StatAlertsAggregator;
 import org.apache.geode.distributed.internal.ClusterDistributionManager;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
@@ -276,7 +276,7 @@ public class StatAlertsManager {
         textId = statInfos[ii].getStatisticsTextId();
 
         // TODO If none by TextID, use StatType and getAll.
-        statistics = dm.getSystem().findStatisticsByTextId(textId);
+        statistics = dm.getSystem().getInternalDistributedSystemStats().findStatisticsByTextId(textId);
         if (statistics.length == 0) {
           logger.error(LocalizedMessage.create(
               LocalizedStrings.StatAlertsManager_STATALERTSMANAGER_CREATEMEMBERSTATALERTDEFINITION_STATISTICS_WITH_GIVEN_TEXTID_0_NOT_FOUND,
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchResourceAttributesResponse.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchResourceAttributesResponse.java
index 333a300..789dc03 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchResourceAttributesResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchResourceAttributesResponse.java
@@ -19,9 +19,10 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.internal.statistics.InternalDistributedSystemStats;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
@@ -30,25 +31,26 @@ public class FetchResourceAttributesResponse extends AdminResponse {
 
   private RemoteStat[] stats;
 
-  public static FetchResourceAttributesResponse create(DistributionManager dm,
+  public static FetchResourceAttributesResponse create(DistributionManager distributionManager,
       InternalDistributedMember recipient, long rsrcUniqueId) {
-    FetchResourceAttributesResponse m = new FetchResourceAttributesResponse();
-    m.setRecipient(recipient);
-    Statistics s = null;
-    InternalDistributedSystem ds = dm.getSystem();
-    s = ds.findStatisticsByUniqueId(rsrcUniqueId);
-    if (s != null) {
-      StatisticsType type = s.getType();
-      StatisticDescriptor[] tmp = type.getStatistics();
-      m.stats = new RemoteStat[tmp.length];
-      for (int i = 0; i < tmp.length; i++) {
-        m.stats[i] = new RemoteStat(s, tmp[i]);
+    FetchResourceAttributesResponse attributesResponse = new FetchResourceAttributesResponse();
+    attributesResponse.setRecipient(recipient);
+    Statistics statistics = null;
+    InternalDistributedSystemStats internalDistributedSystemStats =
+        distributionManager.getSystem().getInternalDistributedSystemStats();
+    statistics = internalDistributedSystemStats.findStatisticsByUniqueId(rsrcUniqueId);
+    if (statistics != null) {
+      StatisticsType type = statistics.getType();
+      StatisticDescriptor[] statisticDescriptors = type.getStatistics();
+      attributesResponse.stats = new RemoteStat[statisticDescriptors.length];
+      for (int i = 0; i < statisticDescriptors.length; i++) {
+        attributesResponse.stats[i] = new RemoteStat(statistics, statisticDescriptors[i]);
       }
     }
-    if (m.stats == null) {
-      m.stats = new RemoteStat[0];
+    if (attributesResponse.stats == null) {
+      attributesResponse.stats = new RemoteStat[0];
     }
-    return m;
+    return attributesResponse;
   }
 
   public RemoteStat[] getStats() {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchStatsResponse.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchStatsResponse.java
index 27ad78f..07b7d1a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchStatsResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/FetchStatsResponse.java
@@ -21,7 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.InternalDistributedSystem.StatisticsVisitor;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
@@ -42,29 +42,23 @@ public class FetchStatsResponse extends AdminResponse {
    */
   public static FetchStatsResponse create(DistributionManager dm,
       InternalDistributedMember recipient, final String statisticsTypeName) {
-    FetchStatsResponse m = new FetchStatsResponse();
-    m.setRecipient(recipient);
+    FetchStatsResponse fetchStatsResponse = new FetchStatsResponse();
+    fetchStatsResponse.setRecipient(recipient);
     List<RemoteStatResource> statList = new ArrayList<RemoteStatResource>();
     // get vm-local stats
     // call visitStatistics to fix for bug 40358
     if (statisticsTypeName == null) {
-      dm.getSystem().visitStatistics(new StatisticsVisitor() {
-        public void visit(Statistics s) {
-          statList.add(new RemoteStatResource(s));
-        }
-      });
+      dm.getSystem().visitStatistics(s -> statList.add(new RemoteStatResource(s)));
     } else {
-      dm.getSystem().visitStatistics(new StatisticsVisitor() {
-        public void visit(Statistics s) {
-          if (s.getType().getName().equals(statisticsTypeName)) {
-            statList.add(new RemoteStatResource(s));
-          }
+      dm.getSystem().visitStatistics(s -> {
+        if (s.getType().getName().equals(statisticsTypeName)) {
+          statList.add(new RemoteStatResource(s));
         }
       });
     }
-    m.stats = new RemoteStatResource[statList.size()];
-    m.stats = (RemoteStatResource[]) statList.toArray(m.stats);
-    return m;
+    fetchStatsResponse.stats = new RemoteStatResource[statList.size()];
+    fetchStatsResponse.stats = statList.toArray(fetchStatsResponse.stats);
+    return fetchStatsResponse;
   }
 
   @Override
@@ -85,7 +79,7 @@ public class FetchStatsResponse extends AdminResponse {
   @Override
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     super.fromData(in);
-    stats = (RemoteStatResource[]) DataSerializer.readObject(in);
+    stats = DataSerializer.readObject(in);
   }
 
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStat.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStat.java
index 4a7db45..e2ac540 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStat.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStat.java
@@ -21,8 +21,8 @@ import java.io.IOException;
 
 import org.apache.geode.DataSerializable;
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.admin.Stat;
 import org.apache.geode.internal.statistics.StatisticDescriptorImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStatResource.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStatResource.java
index 286ef3e..485fca0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStatResource.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteStatResource.java
@@ -21,7 +21,7 @@ import java.io.IOException;
 
 import org.apache.geode.DataSerializable;
 import org.apache.geode.DataSerializer;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.admin.GemFireVM;
 import org.apache.geode.internal.admin.Stat;
 import org.apache.geode.internal.admin.StatResource;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/BaseDecoratorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/BaseDecoratorImpl.java
index 6cf290e..94c95bc 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/BaseDecoratorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/BaseDecoratorImpl.java
@@ -19,7 +19,7 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.internal.admin.StatAlert;
 import org.apache.geode.internal.admin.StatAlertDefinition;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/DummyStatisticInfoImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/DummyStatisticInfoImpl.java
index 0326563..143aea5 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/DummyStatisticInfoImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/DummyStatisticInfoImpl.java
@@ -18,8 +18,8 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.admin.StatAlertsManager;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/FunctionDecoratorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/FunctionDecoratorImpl.java
index ee6e97a..fa7e00f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/FunctionDecoratorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/FunctionDecoratorImpl.java
@@ -19,7 +19,7 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.admin.StatAlert;
 import org.apache.geode.internal.admin.StatAlertDefinition;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/GaugeThresholdDecoratorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/GaugeThresholdDecoratorImpl.java
index db5ee5a..2b54d54 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/GaugeThresholdDecoratorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/GaugeThresholdDecoratorImpl.java
@@ -19,7 +19,7 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.DataSerializableFixedID;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.admin.StatAlert;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/MultiAttrDefinitionImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/MultiAttrDefinitionImpl.java
index 36bf73a..786fafe 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/MultiAttrDefinitionImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/MultiAttrDefinitionImpl.java
@@ -19,9 +19,9 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.admin.StatAlert;
 import org.apache.geode.internal.admin.StatAlertDefinition;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/NumberThresholdDecoratorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/NumberThresholdDecoratorImpl.java
index deaa243..e829462 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/NumberThresholdDecoratorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/NumberThresholdDecoratorImpl.java
@@ -19,7 +19,7 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.DataSerializableFixedID;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.admin.StatAlert;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/SingleAttrDefinitionImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/SingleAttrDefinitionImpl.java
index 59de3a2..d162ff0 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/SingleAttrDefinitionImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/SingleAttrDefinitionImpl.java
@@ -19,9 +19,9 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.admin.StatAlert;
 import org.apache.geode.internal.admin.StatAlertDefinition;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfo.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfo.java
index b7e7067..3afd59c 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfo.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfo.java
@@ -15,9 +15,9 @@
 package org.apache.geode.internal.admin.statalerts;
 
 import org.apache.geode.DataSerializable;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * Provides informations of the statistic
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfoImpl.java b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfoImpl.java
index 23d5ce3..6a8f9cd 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfoImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/statalerts/StatisticInfoImpl.java
@@ -20,10 +20,10 @@ import java.io.IOException;
 
 import org.apache.commons.lang.StringUtils;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.admin.Statistic;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegion.java
index ed9b0bc..5963127 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegion.java
@@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicLong;
 import joptsimple.internal.Strings;
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.EvictionAction;
 import org.apache.geode.cache.EvictionAlgorithm;
 import org.apache.geode.cache.EvictionAttributes;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
index 35ff366..cd19917 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
@@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicLong;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.annotations.TestingOnly;
 import org.apache.geode.cache.AttributesMutator;
 import org.apache.geode.cache.CacheCallback;
@@ -1749,7 +1749,7 @@ public abstract class AbstractRegion implements InternalRegion, AttributesMutato
 
   @Override
   public StatisticsFactory getStatisticsFactory() {
-    return getSystem();
+    return getSystem().getStatisticsFactory();
   }
 
   @Override
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
index ed36543..9ecb440 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
@@ -15,11 +15,11 @@
 
 package org.apache.geode.internal.cache;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.PoolStatHelper;
 import org.apache.geode.distributed.internal.QueueStatHelper;
 import org.apache.geode.internal.NanoTimer;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DirectoryHolder.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DirectoryHolder.java
index 335aa1a..745b36e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DirectoryHolder.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DirectoryHolder.java
@@ -17,7 +17,7 @@ package org.apache.geode.internal.cache;
 import java.io.File;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 
 /**
  * A holder for a disk Directory. Used for maintaining the available space and updating disk
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskDirectoryStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskDirectoryStats.java
index 9e2e110..039f507 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskDirectoryStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskDirectoryStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskRegionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskRegionStats.java
index ef3596b..3a91a8a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskRegionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskRegionStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
index d64591c..272e89e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
@@ -72,7 +72,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheClosedException;
@@ -418,7 +418,7 @@ public class DiskStoreImpl implements DiskStore {
     this.criticalPercent = props.getDiskUsageCriticalPercentage();
 
     this.cache = cache;
-    StatisticsFactory factory = cache.getDistributedSystem();
+    StatisticsFactory factory = cache.getDistributedSystem().getStatisticsFactory();
     this.stats = new DiskStoreStats(factory, getName());
 
     // start simple init
@@ -4589,7 +4589,7 @@ public class DiskStoreImpl implements DiskStore {
   }
 
   public StatisticsFactory getStatisticsFactory() {
-    return this.cache.getDistributedSystem();
+    return this.cache.getDistributedSystem().getStatisticsFactory();
   }
 
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreStats.java
index d5a8572..fbc90ee 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java
index 080e88c..d74b77e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.distributed.internal.PoolStatHelper;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/EvictableRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/EvictableRegion.java
index 0e85679..7d588e0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/EvictableRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/EvictableRegion.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.EvictionAttributes;
 import org.apache.geode.internal.cache.eviction.EvictionController;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index c2974c3..f8a70bc 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -891,7 +891,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
       this.cqService = CqServiceProvider.create(this);
 
       // Create the CacheStatistics
-      this.cachePerfStats = new CachePerfStats(system);
+      this.cachePerfStats = new CachePerfStats(system.getStatisticsFactory());
       CachePerfStats.enableClockStats = this.system.getConfig().getEnableTimeStatistics();
 
       this.transactionManager = new TXManagerImpl(this.cachePerfStats, this);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java
index 8b887ef..29f7799 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java
@@ -21,7 +21,7 @@ import java.util.Set;
 import java.util.concurrent.locks.Lock;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.CacheWriter;
 import org.apache.geode.cache.CacheWriterException;
 import org.apache.geode.cache.EntryNotFoundException;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 1642a8a..078ca73 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -66,7 +66,7 @@ import org.apache.geode.DeltaSerializationException;
 import org.apache.geode.InternalGemFireError;
 import org.apache.geode.InternalGemFireException;
 import org.apache.geode.LogWriter;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.admin.internal.SystemMemberCacheEventProcessor;
 import org.apache.geode.cache.AttributesMutator;
@@ -7654,7 +7654,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     if (this instanceof BucketRegion) {
       stats = internalRegionArgs.getPartitionedRegion().getDiskRegionStats();
     } else {
-      stats = new DiskRegionStats(getCache().getDistributedSystem(), getFullPath());
+      stats = new DiskRegionStats(getCache().getDistributedSystem().getStatisticsFactory(), getFullPath());
     }
 
     EnumSet<DiskRegionFlag> diskFlags = EnumSet.noneOf(DiskRegionFlag.class);
@@ -10983,7 +10983,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     CachePerfStats cachePerfStats;
 
     RegionPerfStats(InternalCache cache, CachePerfStats superStats, String regionName) {
-      super(cache.getDistributedSystem(), regionName);
+      super(cache.getDistributedSystem().getStatisticsFactory(), regionName);
       this.cachePerfStats = superStats;
     }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/OfflineCompactionDiskRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/OfflineCompactionDiskRegion.java
index 114bc21..cffb851 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/OfflineCompactionDiskRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/OfflineCompactionDiskRegion.java
@@ -27,7 +27,7 @@ import org.apache.geode.internal.cache.persistence.DiskRegionView;
 public class OfflineCompactionDiskRegion extends DiskRegion implements DiskRecoveryStore {
   private OfflineCompactionDiskRegion(DiskStoreImpl ds, DiskRegionView drv) {
     super(ds, drv.getName(), drv.isBucket(), true, false, true,
-        new DiskRegionStats(ds.getCache().getDistributedSystem(), drv.getName()),
+        new DiskRegionStats(ds.getCache().getDistributedSystem().getStatisticsFactory(), drv.getName()),
         new DummyCancelCriterion(), new DummyDiskExceptionHandler(), null, drv.getFlags(),
         drv.getPartitionName(), drv.getStartingBucketId(), drv.getCompressorClassName(),
         drv.getOffHeap());
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index da3fcad..7a54494 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -53,7 +53,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelException;
 import org.apache.geode.InternalGemFireException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.AttributesMutator;
@@ -740,7 +740,7 @@ public class PartitionedRegion extends LocalRegion
     super(regionName, regionAttributes, parentRegion, cache, internalRegionArgs);
 
     this.node = initializeNode();
-    this.prStats = new PartitionedRegionStats(cache.getDistributedSystem(), getFullPath());
+    this.prStats = new PartitionedRegionStats(cache.getDistributedSystem().getStatisticsFactory(), getFullPath());
     this.regionIdentifier = getFullPath().replace('/', '#');
 
     if (logger.isDebugEnabled()) {
@@ -831,7 +831,7 @@ public class PartitionedRegion extends LocalRegion
         && !this.getEvictionAttributes().getAlgorithm().isNone()
         && this.getEvictionAttributes().getAction().isOverflowToDisk())
         || this.getDataPolicy().withPersistence()) {
-      StatisticsFactory sf = this.getCache().getDistributedSystem();
+      StatisticsFactory sf = this.getCache().getDistributedSystem().getStatisticsFactory();
       this.diskRegionStats = new DiskRegionStats(sf, getFullPath());
     } else {
       this.diskRegionStats = null;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
index 777edd4..640b80c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
@@ -259,11 +259,8 @@ public class PartitionedRegionHelper {
 
       RegionAttributes ra = factory.create();
       // Create anonymous stats holder for Partitioned Region meta data
-      final HasCachePerfStats prMetaStatsHolder = new HasCachePerfStats() {
-        public CachePerfStats getCachePerfStats() {
-          return new CachePerfStats(cache.getDistributedSystem(), "partitionMetaData");
-        }
-      };
+      final HasCachePerfStats prMetaStatsHolder =
+          () -> new CachePerfStats(cache.getDistributedSystem().getStatisticsFactory(), "partitionMetaData");
 
       try {
         root = (DistributedRegion) cache.createVMRegion(PR_ROOT_REGION_NAME, ra,
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java
index f586220..12cc5fd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java
@@ -19,11 +19,11 @@ import java.util.Collections;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.cache.Region;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PoolStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PoolStats.java
index 41b3a7d..a05c23e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PoolStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PoolStats.java
@@ -16,11 +16,11 @@ package org.apache.geode.internal.cache;
 
 import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ValidatingDiskRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ValidatingDiskRegion.java
index 0823c7d..a8d1f4c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ValidatingDiskRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ValidatingDiskRegion.java
@@ -47,16 +47,16 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
  * @since GemFire prPersistSprint3
  */
 public class ValidatingDiskRegion extends DiskRegion implements DiskRecoveryStore {
-  protected ValidatingDiskRegion(DiskStoreImpl ds, DiskRegionView drv) {
-    super(ds, drv.getName(), drv.isBucket(), true, false, true,
-        new DiskRegionStats(ds.getCache().getDistributedSystem(), drv.getName()),
-        new DummyCancelCriterion(), new DummyDiskExceptionHandler(), null, drv.getFlags(),
-        drv.getPartitionName(), drv.getStartingBucketId(), drv.getCompressorClassName(),
-        drv.getOffHeap());
-    setConfig(drv.getLruAlgorithm(), drv.getLruAction(), drv.getLruLimit(),
-        drv.getConcurrencyLevel(), drv.getInitialCapacity(), drv.getLoadFactor(),
-        drv.getStatisticsEnabled(), drv.isBucket(), drv.getFlags(), drv.getPartitionName(),
-        drv.getStartingBucketId(), drv.getCompressorClassName(), drv.getOffHeap());
+  protected ValidatingDiskRegion(DiskStoreImpl diskStore, DiskRegionView diskRegionView) {
+    super(diskStore, diskRegionView.getName(), diskRegionView.isBucket(), true, false, true,
+        new DiskRegionStats(diskStore.getCache().getDistributedSystem().getStatisticsFactory(), diskRegionView.getName()),
+        new DummyCancelCriterion(), new DummyDiskExceptionHandler(), null, diskRegionView.getFlags(),
+        diskRegionView.getPartitionName(), diskRegionView.getStartingBucketId(), diskRegionView.getCompressorClassName(),
+        diskRegionView.getOffHeap());
+    setConfig(diskRegionView.getLruAlgorithm(), diskRegionView.getLruAction(), diskRegionView.getLruLimit(),
+        diskRegionView.getConcurrencyLevel(), diskRegionView.getInitialCapacity(), diskRegionView.getLoadFactor(),
+        diskRegionView.getStatisticsEnabled(), diskRegionView.isBucket(), diskRegionView.getFlags(), diskRegionView.getPartitionName(),
+        diskRegionView.getStartingBucketId(), diskRegionView.getCompressorClassName(), diskRegionView.getOffHeap());
   }
 
   static ValidatingDiskRegion create(DiskStoreImpl dsi, DiskRegionView drv) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java
index 855cb09..8e4d979 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java
@@ -15,7 +15,7 @@
 
 package org.apache.geode.internal.cache.client.protocol;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.security.SecurityService;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
index f187f2e..d90b948 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
@@ -303,15 +303,15 @@ public class HeapMemoryMonitor implements NotificationListener, MemoryMonitor {
     try {
       sampler.waitForInitialization();
       String tenuredPoolName = getTenuredMemoryPoolMXBean().getName();
-      List list = this.cache.getInternalDistributedSystem().getStatsList();
+      List list = this.cache.getInternalDistributedSystem().getInternalDistributedSystemStats().getStatsList();
       for (Object o : list) {
         if (o instanceof StatisticsImpl) {
-          StatisticsImpl si = (StatisticsImpl) o;
-          if (si.getTextId().contains(tenuredPoolName)
-              && si.getType().getName().contains("PoolStats")) {
-            sampler.addLocalStatListener(this.statListener, si, "currentUsedMemory");
+          StatisticsImpl statisticsImpl = (StatisticsImpl) o;
+          if (statisticsImpl.getTextId().contains(tenuredPoolName)
+              && statisticsImpl.getType().getName().contains("PoolStats")) {
+            sampler.addLocalStatListener(this.statListener, statisticsImpl, "currentUsedMemory");
             if (this.cache.getLoggerI18n().fineEnabled()) {
-              this.cache.getLoggerI18n().fine("Registered stat listener for " + si.getTextId());
+              this.cache.getLoggerI18n().fine("Registered stat listener for " + statisticsImpl.getTextId());
             }
 
             return true;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
index 0c6fb77..c0bd9e4 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
@@ -112,7 +112,7 @@ public class InternalResourceManager implements ResourceManager {
   private InternalResourceManager(InternalCache cache) {
     this.cache = cache;
     this.resourceAdvisor = (ResourceAdvisor) cache.getDistributionAdvisor();
-    this.stats = new ResourceManagerStats(cache.getDistributedSystem());
+    this.stats = new ResourceManagerStats(cache.getDistributedSystem().getStatisticsFactory());
 
     // Create a new executor that other classes may use for handling resource
     // related tasks
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/control/ResourceManagerStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/control/ResourceManagerStats.java
index 39bc9ed..0ab07d9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/control/ResourceManagerStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/control/ResourceManagerStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.control;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.PoolStatHelper;
 import org.apache.geode.distributed.internal.QueueStatHelper;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/AbstractEvictionController.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/AbstractEvictionController.java
index 85be05e..64018ce 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/AbstractEvictionController.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/AbstractEvictionController.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.EvictionAction;
 import org.apache.geode.cache.EvictionAlgorithm;
 import org.apache.geode.cache.EvictionAttributes;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/CountLRUStatistics.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/CountLRUStatistics.java
index 53439b9..6059c79 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/CountLRUStatistics.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/CountLRUStatistics.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class CountLRUStatistics implements EvictionStats {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/DisabledEvictionCounters.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/DisabledEvictionCounters.java
index 93f29fb..634b304 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/DisabledEvictionCounters.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/DisabledEvictionCounters.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 class DisabledEvictionCounters implements EvictionCounters {
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCounters.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCounters.java
index 8fd7be0..92111ee 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCounters.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCounters.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 public interface EvictionCounters {
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCountersImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCountersImpl.java
index 8033bcf..c8ff11d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCountersImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionCountersImpl.java
@@ -16,7 +16,7 @@ package org.apache.geode.internal.cache.eviction;
 
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 class EvictionCountersImpl implements EvictionCounters {
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionStats.java
index d4b286b..5359d5a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/EvictionStats.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 public interface EvictionStats {
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/HeapLRUStatistics.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/HeapLRUStatistics.java
index 9582f67..ba9bfbb 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/HeapLRUStatistics.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/HeapLRUStatistics.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class HeapLRUStatistics implements EvictionStats {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/MemoryLRUStatistics.java b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/MemoryLRUStatistics.java
index 4f76645..fa7a5ef 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/MemoryLRUStatistics.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/eviction/MemoryLRUStatistics.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.eviction;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class MemoryLRUStatistics implements EvictionStats {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionServiceStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionServiceStats.java
index b03b99e..5ff434c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionServiceStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionServiceStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.execute;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.statistics.DummyStatisticsImpl;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionStats.java
index 2f743c6..6ae8f6e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/FunctionStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.execute;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
@@ -229,7 +229,7 @@ public class FunctionStats {
    */
   public FunctionStats(StatisticsFactory factory, String name) {
     this._stats = factory.createAtomicStatistics(_type, name);
-    aggregateStats = ((InternalDistributedSystem) factory).getFunctionServiceStats();
+    aggregateStats = ((InternalDistributedSystem) factory).getInternalDistributedSystemStats().getFunctionServiceStats();
   }
 
   /**
@@ -462,14 +462,14 @@ public class FunctionStats {
    * Returns the Function Stats for the given function
    *
    * @param functionID represents the function for which we are returning the function Stats
-   * @param ds represents the Distributed System
+   * @param distributedSystem represents the Distributed System
    * @return object of the FunctionStats
    */
-  public static FunctionStats getFunctionStats(String functionID, InternalDistributedSystem ds) {
+  public static FunctionStats getFunctionStats(String functionID, InternalDistributedSystem distributedSystem) {
     if (isDisabled()) {
       return dummy;
     } else {
-      return ds.getFunctionStats(functionID);
+      return distributedSystem.getInternalDistributedSystemStats().getFunctionStats(functionID);
     }
   }
 
@@ -477,8 +477,8 @@ public class FunctionStats {
     if (isDisabled()) {
       return dummy;
     } else {
-      InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance();
-      return ds.getFunctionStats(functionID);
+      InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
+      return distributedSystem.getInternalDistributedSystemStats().getFunctionStats(functionID);
     }
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
index 6928b8d..9d63eae 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
@@ -50,7 +50,7 @@ import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
 import org.apache.geode.InternalGemFireError;
 import org.apache.geode.InternalGemFireException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.CacheException;
@@ -369,7 +369,7 @@ public class HARegionQueue implements RegionQueue {
     String processedRegionName = createRegionName(regionName);
 
     // Initialize the statistics
-    StatisticsFactory factory = cache.getDistributedSystem();
+    StatisticsFactory factory = cache.getDistributedSystem().getStatisticsFactory();
     createHARegion(processedRegionName, cache);
 
     initializeHARegionQueue(processedRegionName, this.region, haContainer, clientProxyId,
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueueStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueueStats.java
index e7100f5..ccd3d50 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueueStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueueStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.ha;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java
index 43fa076..d8cb13c 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java
@@ -48,7 +48,7 @@ import org.apache.geode.CancelException;
 import org.apache.geode.DataSerializer;
 import org.apache.geode.Instantiator;
 import org.apache.geode.InternalGemFireError;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.CacheEvent;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.InterestRegistrationEvent;
@@ -1916,7 +1916,7 @@ public class CacheClientNotifier {
     if (isGatewayReceiver) {
       factory = new DummyStatisticsFactory();
     } else {
-      factory = this.getCache().getDistributedSystem();
+      factory = this.getCache().getDistributedSystem().getStatisticsFactory();
     }
     this.statistics = new CacheClientNotifierStats(factory);
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifierStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifierStats.java
index 2e1a3b4..152e3b9 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifierStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifierStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.tier.sockets;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
index 15317da..60ba65f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
@@ -44,7 +44,7 @@ import org.apache.shiro.util.ThreadState;
 
 import org.apache.geode.CancelException;
 import org.apache.geode.DataSerializer;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.ClientSession;
@@ -347,7 +347,7 @@ public class CacheClientProxy implements ClientSession {
     this._messageTimeToLive = ccn.getMessageTimeToLive();
     this._acceptorId = acceptorId;
     this.notifyBySubscription = notifyBySubscription;
-    StatisticsFactory factory = this._cache.getDistributedSystem();
+    StatisticsFactory factory = this._cache.getDistributedSystem().getStatisticsFactory();
     this._statistics =
         new CacheClientProxyStats(factory, "id_" + this.proxyID.getDistributedMember().getId()
             + "_at_" + this._remoteHostAddress + ":" + this._socket.getPort());
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyStats.java
index d8f164d..503943d 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyStats.java
@@ -15,11 +15,11 @@
 
 package org.apache.geode.internal.cache.tier.sockets;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientUpdater.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientUpdater.java
index ff3abf1..042c5f1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientUpdater.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientUpdater.java
@@ -37,10 +37,10 @@ import org.apache.logging.log4j.Logger;
 import org.apache.geode.CancelException;
 import org.apache.geode.DataSerializer;
 import org.apache.geode.InvalidDeltaException;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.cache.EntryNotFoundException;
 import org.apache.geode.cache.InterestResultPolicy;
 import org.apache.geode.cache.Operation;
@@ -1869,9 +1869,9 @@ public class CacheClientUpdater extends Thread implements ClientUpdater, Disconn
     // instance fields
     private final Statistics stats;
 
-    CCUStats(DistributedSystem ids, ServerLocation location) {
+    CCUStats(DistributedSystem distributedSystem, ServerLocation location) {
       // no need for atomic since only a single thread will be writing these
-      this.stats = ids.createStatistics(type, "CacheClientUpdater-" + location);
+      this.stats = distributedSystem.getStatisticsFactory().createStatistics(type, "CacheClientUpdater-" + location);
     }
 
     public void close() {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerStats.java
index c25233b..2780d33 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerStats.java
@@ -14,10 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.cache.server.ServerLoad;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.PoolStatHelper;
@@ -225,7 +225,7 @@ public class CacheServerStats implements MessageStats {
   protected StatisticsType statType;
 
   public CacheServerStats(String ownerName) {
-    this(InternalDistributedSystem.getAnyInstance(), ownerName, typeName, null);
+    this(InternalDistributedSystem.getAnyInstance().getStatisticsFactory(), ownerName, typeName, null);
   }
 
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
index 16e1eb3..2c519a3 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
@@ -20,7 +20,7 @@ import static org.apache.geode.internal.cache.tier.CommunicationMode.ProtobufCli
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.client.protocol.ClientProtocolService;
@@ -80,7 +80,7 @@ public class ServerConnectionFactory {
       String communicationModeStr, byte communicationMode, Acceptor acceptor,
       SecurityService securityService) throws IOException {
     ClientProtocolService service =
-        getClientProtocolService(cache.getDistributedSystem(), acceptor.getServerName());
+        getClientProtocolService(cache.getDistributedSystem().getStatisticsFactory(), acceptor.getServerName());
 
     ClientProtocolProcessor processor = service.createProcessorForCache(cache, securityService);
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
index 149fa48..258ac30 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
@@ -266,7 +266,7 @@ public abstract class AbstractGatewaySender implements GatewaySender, Distributi
       this.stopper = new Stopper(cache.getCancelCriterion());
       this.senderAdvisor = GatewaySenderAdvisor.createGatewaySenderAdvisor(this);
       if (!this.isForInternalUse()) {
-        this.statistics = new GatewaySenderStats(cache.getDistributedSystem(), id);
+        this.statistics = new GatewaySenderStats(cache.getDistributedSystem().getStatisticsFactory(), id);
       }
       initializeEventIdIndex();
     }
@@ -1205,7 +1205,7 @@ public abstract class AbstractGatewaySender implements GatewaySender, Distributi
       // Create a stats holder for the meta data stats
       final HasCachePerfStats statsHolder = new HasCachePerfStats() {
         public CachePerfStats getCachePerfStats() {
-          return new CachePerfStats(cache.getDistributedSystem(), META_DATA_REGION_NAME);
+          return new CachePerfStats(cache.getDistributedSystem().getStatisticsFactory(), META_DATA_REGION_NAME);
         }
       };
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewayReceiverStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewayReceiverStats.java
index 1c6c202..772d4e7 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewayReceiverStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewayReceiverStats.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.cache.wan;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -95,31 +95,31 @@ public class GatewayReceiverStats extends CacheServerStats {
   // ///////////////////// Constructors ///////////////////////
 
   public static GatewayReceiverStats createGatewayReceiverStats(String ownerName) {
-    StatisticsFactory f = InternalDistributedSystem.getAnyInstance();
+    StatisticsFactory statisticsFactory = InternalDistributedSystem.getAnyInstance().getStatisticsFactory();
     StatisticDescriptor[] descriptors = new StatisticDescriptor[] {
-        f.createIntCounter(DUPLICATE_BATCHES_RECEIVED,
+        statisticsFactory.createIntCounter(DUPLICATE_BATCHES_RECEIVED,
             "number of batches which have already been seen by this GatewayReceiver",
             "nanoseconds"),
-        f.createIntCounter(OUT_OF_ORDER_BATCHES_RECEIVED,
+        statisticsFactory.createIntCounter(OUT_OF_ORDER_BATCHES_RECEIVED,
             "number of batches which are out of order on this GatewayReceiver", "operations"),
-        f.createIntCounter(EARLY_ACKS, "number of early acknowledgements sent to gatewaySenders",
+        statisticsFactory.createIntCounter(EARLY_ACKS, "number of early acknowledgements sent to gatewaySenders",
             "operations"),
-        f.createIntCounter(EVENTS_RECEIVED,
+        statisticsFactory.createIntCounter(EVENTS_RECEIVED,
             "total number events across the batched received by this GatewayReceiver",
             "operations"),
-        f.createIntCounter(CREAT_REQUESTS,
+        statisticsFactory.createIntCounter(CREAT_REQUESTS,
             "total number of create operations received by this GatewayReceiver", "operations"),
-        f.createIntCounter(UPDATE_REQUESTS,
+        statisticsFactory.createIntCounter(UPDATE_REQUESTS,
             "total number of update operations received by this GatewayReceiver", "operations"),
-        f.createIntCounter(DESTROY_REQUESTS,
+        statisticsFactory.createIntCounter(DESTROY_REQUESTS,
             "total number of destroy operations received by this GatewayReceiver", "operations"),
-        f.createIntCounter(UNKNOWN_OPERATIONS_RECEIVED,
+        statisticsFactory.createIntCounter(UNKNOWN_OPERATIONS_RECEIVED,
             "total number of unknown operations received by this GatewayReceiver", "operations"),
-        f.createIntCounter(EXCEPTIONS_OCCURRED,
+        statisticsFactory.createIntCounter(EXCEPTIONS_OCCURRED,
             "number of exceptions occurred while porcessing the batches", "operations"),
-        f.createIntCounter(EVENTS_RETRIED,
+        statisticsFactory.createIntCounter(EVENTS_RETRIED,
             "total number events retried by this GatewayReceiver due to exceptions", "operations")};
-    return new GatewayReceiverStats(f, ownerName, typeName, descriptors);
+    return new GatewayReceiverStats(statisticsFactory, ownerName, typeName, descriptors);
 
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderStats.java
index 220e0de..fe4e5d6 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.cache.wan;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.internal.DistributionStats;
 import org.apache.geode.internal.cache.CachePerfStats;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/concurrent/Atomics.java b/geode-core/src/main/java/org/apache/geode/internal/concurrent/Atomics.java
index 3e9c036..a82ef4d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/concurrent/Atomics.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/concurrent/Atomics.java
@@ -17,8 +17,8 @@ package org.apache.geode.internal.concurrent;
 
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.statistics.LocalStatisticsImpl;
 import org.apache.geode.internal.statistics.StatisticsManager;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapMemoryStats.java b/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapMemoryStats.java
index 08e716d..ee1f57a 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapMemoryStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapMemoryStats.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.offheap;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * Statistics for off-heap memory storage.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapStorage.java b/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapStorage.java
index 135f2b8..29f954c 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapStorage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapStorage.java
@@ -16,11 +16,11 @@ package org.apache.geode.internal.offheap;
 
 import java.lang.reflect.Method;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.distributed.internal.DistributionConfig;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
index 22343e0..c1a5864 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
@@ -21,11 +21,11 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/CallbackSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/CallbackSampler.java
index 0e51c92..f77b83b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/CallbackSampler.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/CallbackSampler.java
@@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.internal.logging.LogService;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsFactory.java
index c661143..68e3447 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsFactory.java
@@ -18,10 +18,10 @@ package org.apache.geode.internal.statistics;
 import java.io.IOException;
 import java.io.Reader;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * A StatisticsFactory that creates disconnected statistics
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java
index adafe56..cddacf6 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java
@@ -18,9 +18,9 @@ import java.util.function.DoubleSupplier;
 import java.util.function.IntSupplier;
 import java.util.function.LongSupplier;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * An implementation of {@link Statistics} that does nothing. Setting the "gemfire.statsDisabled" to
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java
index 5eb8e8a..439f110 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java
@@ -25,7 +25,7 @@ import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.GemFireVersion;
@@ -44,7 +44,6 @@ import org.apache.geode.internal.statistics.platform.ProcessStats;
  * GemFireStatSampler adds listeners and rolling archives to HostStatSampler.
  * <p>
  * The StatisticsManager is implemented by DistributedSystem.
- *
  */
 public class GemFireStatSampler extends HostStatSampler {
 
@@ -60,22 +59,23 @@ public class GemFireStatSampler extends HostStatSampler {
   private final Map<InternalDistributedMember, List<RemoteStatListenerImpl>> recipientToListeners =
       new HashMap<InternalDistributedMember, List<RemoteStatListenerImpl>>();
 
-  private final InternalDistributedSystem con;
+  private final InternalDistributedSystem internalDistributedSystem;
 
   private int nextListenerId = 1;
   private ProcessStats processStats = null;
 
   ////////////////////// Constructors //////////////////////
 
-  public GemFireStatSampler(InternalDistributedSystem con) {
-    super(con.getCancelCriterion(), new StatSamplerStats(con, con.getId()));
-    this.con = con;
+  public GemFireStatSampler(InternalDistributedSystem internalDistributedSystem) {
+    super(internalDistributedSystem.getCancelCriterion(),
+        new StatSamplerStats(internalDistributedSystem.getInternalDistributedSystemStats(),
+            internalDistributedSystem.getId()));
+    this.internalDistributedSystem = internalDistributedSystem;
   }
 
   /**
    * 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 ProcessStats getProcessStats() {
@@ -158,16 +158,17 @@ public class GemFireStatSampler extends HostStatSampler {
 
   @Override
   public File getArchiveFileName() {
-    return this.con.getConfig().getStatisticArchiveFile();
+    return this.internalDistributedSystem.getConfig().getStatisticArchiveFile();
   }
 
   @Override
   public long getArchiveFileSizeLimit() {
     if (fileSizeLimitInKB()) {
       // use KB instead of MB to speed up rolling for testing
-      return ((long) this.con.getConfig().getArchiveFileSizeLimit()) * (1024);
+      return ((long) this.internalDistributedSystem.getConfig().getArchiveFileSizeLimit()) * (1024);
     } else {
-      return ((long) this.con.getConfig().getArchiveFileSizeLimit()) * (1024 * 1024);
+      return ((long) this.internalDistributedSystem.getConfig().getArchiveFileSizeLimit()) * (1024
+          * 1024);
     }
   }
 
@@ -175,9 +176,11 @@ public class GemFireStatSampler extends HostStatSampler {
   public long getArchiveDiskSpaceLimit() {
     if (fileSizeLimitInKB()) {
       // use KB instead of MB to speed up removal for testing
-      return ((long) this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024);
+      return ((long) this.internalDistributedSystem.getConfig().getArchiveDiskSpaceLimit())
+          * (1024);
     } else {
-      return ((long) this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024 * 1024);
+      return ((long) this.internalDistributedSystem.getConfig().getArchiveDiskSpaceLimit()) * (1024
+          * 1024);
     }
   }
 
@@ -192,8 +195,9 @@ public class GemFireStatSampler extends HostStatSampler {
       Iterator<Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>>> it1 =
           recipientToListeners.entrySet().iterator();
       while (it1.hasNext()) {
-        if (stopRequested())
+        if (stopRequested()) {
           return;
+        }
         Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>> me = it1.next();
         List<RemoteStatListenerImpl> l = me.getValue();
         if (l.size() > 0) {
@@ -209,7 +213,7 @@ public class GemFireStatSampler extends HostStatSampler {
               msg.addChange(-statListener.getListenerId(), 0);
             }
           }
-          this.con.getDistributionManager().putOutgoing(msg);
+          this.internalDistributedSystem.getDistributionManager().putOutgoing(msg);
         }
       }
     }
@@ -217,22 +221,22 @@ public class GemFireStatSampler extends HostStatSampler {
 
   @Override
   protected int getSampleRate() {
-    return this.con.getConfig().getStatisticSampleRate();
+    return this.internalDistributedSystem.getConfig().getStatisticSampleRate();
   }
 
   @Override
   public boolean isSamplingEnabled() {
-    return this.con.getConfig().getStatisticSamplingEnabled();
+    return this.internalDistributedSystem.getConfig().getStatisticSamplingEnabled();
   }
 
   @Override
   protected StatisticsManager getStatisticsManager() {
-    return this.con;
+    return this.internalDistributedSystem.getInternalDistributedSystemStats();
   }
 
   @Override
   protected OsStatisticsFactory getOsStatisticsFactory() {
-    return this.con;
+    return this.internalDistributedSystem.getInternalDistributedSystemStats();
   }
 
   @Override
@@ -277,13 +281,15 @@ public class GemFireStatSampler extends HostStatSampler {
     if (l == null) {
       return;
     }
-    if (stopRequested())
+    if (stopRequested()) {
       return;
+    }
     HostStatHelper.readyRefreshOSStats();
     Iterator<Statistics> it = l.iterator();
     while (it.hasNext()) {
-      if (stopRequested())
+      if (stopRequested()) {
         return;
+      }
       StatisticsImpl s = (StatisticsImpl) it.next();
       if (s.usesSystemCalls()) {
         HostStatHelper.refresh((LocalStatisticsImpl) s);
@@ -440,7 +446,8 @@ public class GemFireStatSampler extends HostStatSampler {
     }
 
     static RemoteStatListenerImpl create(int listenerId, InternalDistributedMember recipient,
-        long resourceId, String statName, HostStatSampler sampler) {
+                                         long resourceId, String statName,
+                                         HostStatSampler sampler) {
       RemoteStatListenerImpl result = null;
       Statistics stats = sampler.getStatisticsManager().findStatistics(resourceId);
       StatisticDescriptorImpl stat = (StatisticDescriptorImpl) stats.nameToDescriptor(statName);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java
index 75fa7de..c7d3e12 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java
@@ -18,7 +18,7 @@ import java.net.InetAddress;
 import java.net.UnknownHostException;
 
 import org.apache.geode.InternalGemFireException;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.PureJavaMode;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.net.SocketCreator;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
index 14e3c29..89a684e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
@@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.NanoTimer;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java
old mode 100755
new mode 100644
similarity index 53%
copy from geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
copy to geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java
index 22343e0..221d3c1
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java
@@ -1,106 +1,80 @@
-/*
- * 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 org.apache.geode.internal.statistics;
 
 import java.io.IOException;
 import java.io.Reader;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.internal.cache.execute.FunctionServiceStats;
+import org.apache.geode.internal.cache.execute.FunctionStats;
 import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 
-/**
- * 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;
+public class InternalDistributedSystemStats
+    implements StatisticsFactory, StatisticsManager, OsStatisticsFactory {
+
+  private final CopyOnWriteArrayList<Statistics> statsList = new CopyOnWriteArrayList<>();
   private int statsListModCount = 0;
-  private long statsListUniqueId = 1;
-  private final Object statsListUniqueIdLock;
-  private final StatisticsTypeFactory tf;
-  private final long startTime;
+  private AtomicLong statsListUniqueId = new AtomicLong(1);
 
-  public AbstractStatisticsFactory(long id, String name, long startTime) {
-    this.id = id;
-    this.name = name;
-    this.startTime = startTime;
+  // As the function execution stats can be lot in number, its better to put
+  // them in a map so that it will be accessible immediately
+  private final ConcurrentHashMap<String, FunctionStats> functionExecutionStatsMap = new ConcurrentHashMap<String, FunctionStats>();
+  private FunctionServiceStats functionServiceStats;
 
-    this.statsList = new CopyOnWriteArrayList<Statistics>();
-    this.statsListUniqueIdLock = new Object();
-    this.tf = StatisticsTypeFactoryImpl.singleton();
-  }
+  private final boolean statsDisabled;
 
-  public void close() {}
+  public InternalDistributedSystemStats(boolean statsDisabled) {
+    this.statsDisabled = statsDisabled;
+    this.functionServiceStats = new FunctionServiceStats(this, "FunctionExecution");
+  }
 
   @Override
-  public String getName() {
-    return this.name;
+  public int getStatListModCount() {
+    return this.statsListModCount;
   }
 
   @Override
-  public long getId() {
-    return this.id;
+  public List<Statistics> getStatsList() {
+    return this.statsList;
   }
 
   @Override
-  public long getStartTime() {
-    return this.startTime;
+  public String getName() {
+    return null;
   }
 
   @Override
-  public int getStatListModCount() {
-    return this.statsListModCount;
+  public long getId() {
+    return 0;
   }
 
   @Override
-  public List<Statistics> getStatsList() {
-    return this.statsList;
+  public long getStartTime() {
+    return 0;
   }
 
   @Override
   public int getStatisticsCount() {
-    int result = 0;
-    List<Statistics> statsList = this.statsList;
-    if (statsList != null) {
-      result = statsList.size();
-    }
-    return result;
+    return ((List<Statistics>) this.statsList).size();
   }
 
   @Override
   public Statistics findStatistics(long id) {
     List<Statistics> statsList = this.statsList;
-    synchronized (statsList) {
-      for (Statistics s : statsList) {
-        if (s.getUniqueId() == id) {
-          return s;
-        }
+    for (Statistics s : statsList) {
+      if (s.getUniqueId() == id) {
+        return s;
       }
     }
     throw new RuntimeException(
@@ -121,32 +95,28 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
   @Override
   public Statistics[] getStatistics() {
     List<Statistics> statsList = this.statsList;
-    return (Statistics[]) statsList.toArray(new Statistics[statsList.size()]);
+    return statsList.toArray(new Statistics[0]);
   }
 
   // StatisticsFactory methods
-
-  @Override
   public Statistics createStatistics(StatisticsType type) {
     return createOsStatistics(type, null, 0, 0);
   }
 
-  @Override
   public Statistics createStatistics(StatisticsType type, String textId) {
     return createOsStatistics(type, textId, 0, 0);
   }
 
-  @Override
   public Statistics createStatistics(StatisticsType type, String textId, long numericId) {
-    return createOsStatistics(type, textId, 0, 0);
+    return createOsStatistics(type, textId, numericId, 0);
   }
 
-  protected Statistics createOsStatistics(StatisticsType type, String textId, long numericId,
-      int osStatFlags) {
-    long myUniqueId;
-    synchronized (statsListUniqueIdLock) {
-      myUniqueId = statsListUniqueId++; // fix for bug 30597
+  public Statistics createOsStatistics(StatisticsType type, String textId, long numericId,
+                                       int osStatFlags) {
+    if (this.statsDisabled) {
+      return new DummyStatisticsImpl(type, textId, numericId);
     }
+    long myUniqueId = statsListUniqueId.getAndIncrement();
     Statistics result =
         new LocalStatisticsImpl(type, textId, numericId, myUniqueId, false, osStatFlags, this);
     synchronized (statsList) {
@@ -156,52 +126,41 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
     return result;
   }
 
-  @Override
-  public 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);
+  public Statistics[] findStatisticsByType(final StatisticsType type) {
+    final ArrayList hits = new ArrayList();
+    visitStatistics(vistorStatistic -> {
+      if (type == vistorStatistic.getType()) {
+        hits.add(vistorStatistic);
       }
-    }
+    });
     Statistics[] result = new Statistics[hits.size()];
     return (Statistics[]) hits.toArray(result);
   }
 
-  @Override
-  public 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);
+  public Statistics[] findStatisticsByTextId(final String textId) {
+    final ArrayList hits = new ArrayList();
+    visitStatistics(vistorStatistic -> {
+      if (vistorStatistic.getTextId().equals(textId)) {
+        hits.add(vistorStatistic);
       }
-    }
+    });
     Statistics[] result = new Statistics[hits.size()];
     return (Statistics[]) hits.toArray(result);
   }
 
-  @Override
-  public 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);
+  public Statistics[] findStatisticsByNumericId(final long numericId) {
+    final ArrayList hits = new ArrayList();
+    visitStatistics(vistorStatistic -> {
+      if (numericId == vistorStatistic.getNumericId()) {
+        hits.add(vistorStatistic);
       }
-    }
+    });
     Statistics[] result = new Statistics[hits.size()];
     return (Statistics[]) hits.toArray(result);
   }
 
-  public Statistics findStatisticsByUniqueId(long uniqueId) {
-    Iterator<Statistics> it = statsList.iterator();
-    while (it.hasNext()) {
-      Statistics s = (Statistics) it.next();
+  public Statistics findStatisticsByUniqueId(final long uniqueId) {
+    for (Statistics s : this.statsList) {
       if (uniqueId == s.getUniqueId()) {
         return s;
       }
@@ -209,8 +168,9 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
     return null;
   }
 
-  /** for internal use only. Its called by {@link LocalStatisticsImpl#close}. */
-  @Override
+  /**
+   * for internal use only. Its called by {@link LocalStatisticsImpl#close}.
+   */
   public void destroyStatistics(Statistics stats) {
     synchronized (statsList) {
       if (statsList.remove(stats)) {
@@ -219,22 +179,20 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
     }
   }
 
-  @Override
   public Statistics createAtomicStatistics(StatisticsType type) {
     return createAtomicStatistics(type, null, 0);
   }
 
-  @Override
   public 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
+    if (this.statsDisabled) {
+      return new DummyStatisticsImpl(type, textId, numericId);
     }
+
+    long myUniqueId = statsListUniqueId.getAndIncrement();
     Statistics result = StatisticsImpl.createAtomicNoOS(type, textId, numericId, myUniqueId, this);
     synchronized (statsList) {
       statsList.add(result);
@@ -243,7 +201,9 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
     return result;
   }
 
+
   // StatisticsTypeFactory methods
+  private static final StatisticsTypeFactory tf = StatisticsTypeFactoryImpl.singleton();
 
   /**
    * Creates or finds a StatisticType for the given shared class.
@@ -295,37 +255,87 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
 
   @Override
   public StatisticDescriptor createIntCounter(String name, String description, String units,
-      boolean largerBetter) {
+                                              boolean largerBetter) {
     return tf.createIntCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createLongCounter(String name, String description, String units,
-      boolean largerBetter) {
+                                               boolean largerBetter) {
     return tf.createLongCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createDoubleCounter(String name, String description, String units,
-      boolean largerBetter) {
+                                                 boolean largerBetter) {
     return tf.createDoubleCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createIntGauge(String name, String description, String units,
-      boolean largerBetter) {
+                                            boolean largerBetter) {
     return tf.createIntGauge(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createLongGauge(String name, String description, String units,
-      boolean largerBetter) {
+                                             boolean largerBetter) {
     return tf.createLongGauge(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createDoubleGauge(String name, String description, String units,
-      boolean largerBetter) {
+                                               boolean largerBetter) {
     return tf.createDoubleGauge(name, description, units, largerBetter);
   }
+
+  public FunctionStats getFunctionStats(String textId) {
+    FunctionStats stats = functionExecutionStatsMap.get(textId);
+    if (stats == null) {
+      stats = new FunctionStats(this, textId);
+      FunctionStats oldStats = functionExecutionStatsMap.putIfAbsent(textId, stats);
+      if (oldStats != null) {
+        stats.close();
+        stats = oldStats;
+      }
+    }
+    return stats;
+  }
+
+
+  public FunctionServiceStats getFunctionServiceStats() {
+    if (functionServiceStats == null) {
+      synchronized (this) {
+        if (functionServiceStats == null) {
+
+        }
+      }
+    }
+    return functionServiceStats;
+  }
+
+  /**
+   * For every registered statistic instance call the specified visitor. This method was added to
+   * fix bug 40358
+   */
+  public void visitStatistics(InternalDistributedSystem.StatisticsVisitor visitor) {
+    for (Statistics s : this.statsList) {
+      visitor.visit(s);
+    }
+  }
+
+  public Set<String> getAllFunctionExecutionIds() {
+    return functionExecutionStatsMap.keySet();
+  }
+
+  public void closeFunctionStats() {
+    // closing the Aggregate stats
+    if (functionServiceStats != null) {
+      functionServiceStats.close();
+    }
+    // closing individual function stats
+    for (FunctionStats functionstats : functionExecutionStatsMap.values()) {
+      functionstats.close();
+    }
+  }
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsFactory.java
index b228997..44cae2c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsFactory.java
@@ -17,9 +17,9 @@ package org.apache.geode.internal.statistics;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java
index 19955f6..08bbc13 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.OSProcess;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/MapBasedStatisticsNotification.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/MapBasedStatisticsNotification.java
index 3a87e11..1bce7a3 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/MapBasedStatisticsNotification.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/MapBasedStatisticsNotification.java
@@ -18,9 +18,9 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * @since GemFire 7.0
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceInstance.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceInstance.java
index c83b051..f85a597 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceInstance.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceInstance.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * An instance of a Statistics resource. There may be zero, one or many instances depending on the
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceType.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceType.java
index f2905a1..a7bc71d 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceType.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/ResourceType.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * An instance of a StatisticsType which describes the individual stats for each ResourceInstance.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java
index 1713e23..ada43da 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java
@@ -28,9 +28,9 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.GemFireException;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.io.RollingFileHandler;
 import org.apache.geode.internal.logging.LogService;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java
index cce28bb..cefdb9e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * Identifies a specific instance of a stat as defined by a StatisticDescriptor.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java
index ab6333f..12c8827 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java
@@ -36,7 +36,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.GemFireIOException;
 import org.apache.geode.InternalGemFireException;
-import org.apache.geode.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticDescriptor;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.i18n.LocalizedStrings;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatSamplerStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatSamplerStats.java
index 7224aa4..5446868 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatSamplerStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatSamplerStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 
 /**
  * Statistics related to the statistic sampler.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java
index 51d36fd..e98ab0e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java
@@ -14,9 +14,9 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticId.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticId.java
index 475295e..64f9c46 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticId.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticId.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * Identifies a specific instance of a stat as defined by a StatisticDescriptor.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java
index 63547ad..6e0b005 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java
@@ -23,9 +23,9 @@ import java.util.function.LongSupplier;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.concurrent.Atomics;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsManager.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsManager.java
index b1a4247..5d5e33a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsManager.java
@@ -17,8 +17,8 @@ package org.apache.geode.internal.statistics;
 
 import java.util.List;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
 
 /**
  * Defines the contract that a statistics factory must implement for its Statistics instances. This
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsNotification.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsNotification.java
index 9a5fa26..45c4ef7 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsNotification.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsNotification.java
@@ -16,9 +16,9 @@ package org.apache.geode.internal.statistics;
 
 import java.util.Iterator;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * @since GemFire 7.0
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsSampler.java
index 9716346..106a0ea 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsSampler.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsSampler.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * Defines the minimal contract for a StatisticsSampler. This is used by classes that need to
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java
index 767f755..db850a3 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java
@@ -18,9 +18,9 @@ import java.io.IOException;
 import java.io.Reader;
 import java.util.HashMap;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java
index 8f042e7..4dbdd0d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java
@@ -18,10 +18,10 @@ import java.io.IOException;
 import java.io.Reader;
 import java.util.HashMap;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeXml.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeXml.java
index 72908d5..2cf213e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeXml.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeXml.java
@@ -35,9 +35,9 @@ import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXParseException;
 
 import org.apache.geode.GemFireConfigException;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.ClassPathLoader;
 import org.apache.geode.internal.i18n.LocalizedStrings;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStats.java
index b54d692..228b590 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStats.java
@@ -14,11 +14,11 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 
 /**
  * Statistics related to a Java VM. Currently they all come from {@link java.lang.Runtime}.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStatsContractFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStatsContractFactory.java
index edd26cb..a77b907 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStatsContractFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/VMStatsContractFactory.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.internal.stats50.VMStats50;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/ValueMonitor.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/ValueMonitor.java
index 0afed13..a37d6f3 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/ValueMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/ValueMonitor.java
@@ -18,8 +18,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.CopyOnWriteHashSet;
 
 /**
@@ -41,7 +41,7 @@ import org.apache.geode.internal.CopyOnWriteHashSet;
  * notify.getValue(statId)); } } }; }
  *
  * @since GemFire 7.0
- * @see org.apache.geode.Statistics
+ * @see Statistics
  */
 public class ValueMonitor extends StatisticsMonitor {
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/micrometer/MicrometerStatsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/micrometer/MicrometerStatsFactory.java
new file mode 100644
index 0000000..321ab6b
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/micrometer/MicrometerStatsFactory.java
@@ -0,0 +1,137 @@
+package org.apache.geode.internal.statistics.micrometer;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+
+public class MicrometerStatsFactory implements StatisticsFactory {
+  @Override
+  public Statistics createStatistics(StatisticsType type) {
+    return null;
+  }
+
+  @Override
+  public Statistics createStatistics(StatisticsType type, String textId) {
+    return null;
+  }
+
+  @Override
+  public Statistics createStatistics(StatisticsType type, String textId, long numericId) {
+    return null;
+  }
+
+  @Override
+  public Statistics createAtomicStatistics(StatisticsType type) {
+    return null;
+  }
+
+  @Override
+  public Statistics createAtomicStatistics(StatisticsType type, String textId) {
+    return null;
+  }
+
+  @Override
+  public Statistics createAtomicStatistics(StatisticsType type, String textId, long numericId) {
+    return null;
+  }
+
+  @Override
+  public Statistics[] findStatisticsByType(StatisticsType type) {
+    return new Statistics[0];
+  }
+
+  @Override
+  public Statistics[] findStatisticsByTextId(String textId) {
+    return new Statistics[0];
+  }
+
+  @Override
+  public Statistics[] findStatisticsByNumericId(long numericId) {
+    return new Statistics[0];
+  }
+
+  @Override
+  public StatisticDescriptor createIntCounter(String name, String description, String units) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createLongCounter(String name, String description, String units) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createDoubleCounter(String name, String description, String units) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createIntGauge(String name, String description, String units) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createLongGauge(String name, String description, String units) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createDoubleGauge(String name, String description, String units) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createIntCounter(String name, String description, String units,
+                                              boolean largerBetter) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createLongCounter(String name, String description, String units,
+                                               boolean largerBetter) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createDoubleCounter(String name, String description, String units,
+                                                 boolean largerBetter) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createIntGauge(String name, String description, String units,
+                                            boolean largerBetter) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createLongGauge(String name, String description, String units,
+                                             boolean largerBetter) {
+    return null;
+  }
+
+  @Override
+  public StatisticDescriptor createDoubleGauge(String name, String description, String units,
+                                               boolean largerBetter) {
+    return null;
+  }
+
+  @Override
+  public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) {
+    return null;
+  }
+
+  @Override
+  public StatisticsType findType(String name) {
+    return null;
+  }
+
+  @Override
+  public StatisticsType[] createTypesFromXml(Reader reader) throws IOException {
+    return new StatisticsType[0];
+  }
+}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java
index c57e3df..554bf35 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java
@@ -15,10 +15,10 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.HostStatHelper;
 import org.apache.geode.internal.statistics.LocalStatisticsImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxSystemStats.java
index 662c95f..bae1785 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxSystemStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxSystemStats.java
@@ -15,9 +15,9 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java
index 8a53ed3..87a67b1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java
@@ -15,10 +15,10 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.HostStatHelper;
 import org.apache.geode.internal.statistics.LocalStatisticsImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java
index 218e9f0..84856d3 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java
@@ -15,9 +15,9 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OsStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OsStatisticsFactory.java
index a8166ae..651f13c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OsStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OsStatisticsFactory.java
@@ -14,12 +14,12 @@
  */
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 
 /**
  * Instances of this interface provide methods that create operating system instances of
- * {@link org.apache.geode.Statistics}. Its for internal use only.
+ * {@link Statistics}. Its for internal use only.
  *
  * {@link org.apache.geode.distributed.DistributedSystem} is an OS statistics factory.
  * <P>
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java
index 690b514..46d033e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * Abstracts the process statistics that are common on all platforms. This is necessary for
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java
index 831356c..f17615a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java
@@ -15,10 +15,10 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.HostStatHelper;
 import org.apache.geode.internal.statistics.LocalStatisticsImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java
index 04def16..f08b1cb 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java
@@ -15,9 +15,9 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java
index dbddd39..90b4855 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java
@@ -15,10 +15,10 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.HostStatHelper;
 import org.apache.geode.internal.statistics.LocalStatisticsImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java
index 4cf9813..b863de3 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java
@@ -15,9 +15,9 @@
 
 package org.apache.geode.internal.statistics.platform;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java
index 04fc8ae..cd608cc 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java
@@ -20,8 +20,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicIntegerArray;
 import java.util.concurrent.atomic.AtomicLongArray;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.OSProcess;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.statistics.StatisticsImpl;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/stats50/VMStats50.java b/geode-core/src/main/java/org/apache/geode/internal/stats50/VMStats50.java
index b52f908..3632ea4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/stats50/VMStats50.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/stats50/VMStats50.java
@@ -33,11 +33,11 @@ import java.util.Map;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.ClassPathLoader;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/FederatingManager.java b/geode-core/src/main/java/org/apache/geode/management/internal/FederatingManager.java
index fde2cd0..ff97c79 100755
--- a/geode-core/src/main/java/org/apache/geode/management/internal/FederatingManager.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/FederatingManager.java
@@ -58,7 +58,6 @@ import org.apache.geode.management.ManagementException;
  * controls the JMX server endpoints for JMX clients to connect, such as an RMI server.
  *
  * The FederatingManager is only appropriate for a peer or server in a GemFire distributed system.
- *
  * @since GemFire 7.0
  */
 public class FederatingManager extends Manager {
@@ -92,7 +91,8 @@ public class FederatingManager extends Manager {
    * @param service SystemManagement Service
    */
   public FederatingManager(MBeanJMXAdapter jmxAdapter, ManagementResourceRepo repo,
-      InternalDistributedSystem system, SystemManagementService service, InternalCache cache) {
+                           InternalDistributedSystem system, SystemManagementService service,
+                           InternalCache cache) {
     super(repo, system, cache);
     this.service = service;
     this.proxyFactory = new MBeanProxyFactory(jmxAdapter, service);
@@ -249,7 +249,7 @@ public class FederatingManager extends Manager {
    * listener
    */
   public void suspectMember(DistributedMember member, InternalDistributedMember whoSuspected,
-      String reason) {
+                            String reason) {
     service.memberSuspect((InternalDistributedMember) member, whoSuspected, reason);
   }
 
@@ -381,11 +381,9 @@ public class FederatingManager extends Manager {
             internalArgs.setIsUsedForMetaRegion(true);
 
             // Create anonymous stats holder for Management Regions
-            final HasCachePerfStats monitoringRegionStats = new HasCachePerfStats() {
-              public CachePerfStats getCachePerfStats() {
-                return new CachePerfStats(cache.getDistributedSystem(), "managementRegionStats");
-              }
-            };
+            final HasCachePerfStats monitoringRegionStats =
+                () -> new CachePerfStats(cache.getDistributedSystem().getStatisticsFactory(),
+                    "managementRegionStats");
 
             internalArgs.setCachePerfStatsHolder(monitoringRegionStats);
 
@@ -509,7 +507,6 @@ public class FederatingManager extends Manager {
 
   /**
    * This will return the last updated time of the proxyMBean
-   *
    * @param objectName {@link javax.management.ObjectName} of the MBean
    * @return last updated time of the proxy
    */
@@ -518,11 +515,9 @@ public class FederatingManager extends Manager {
   }
 
   /**
-   * Find a particular proxy instance for a {@link javax.management.ObjectName} ,
-   * {@link org.apache.geode.distributed.DistributedMember} and interface class If the proxy
-   * interface does not implement the given interface class a {@link java.lang.ClassCastException}.
-   * will be thrown
-   *
+   * Find a particular proxy instance for a {@link javax.management.ObjectName} , {@link
+   * org.apache.geode.distributed.DistributedMember} and interface class If the proxy interface does
+   * not implement the given interface class a {@link java.lang.ClassCastException}. will be thrown
    * @param objectName {@link javax.management.ObjectName} of the MBean
    * @param interfaceClass interface class implemented by proxy
    * @return an instance of proxy exposing the given interface
@@ -533,7 +528,6 @@ public class FederatingManager extends Manager {
 
   /**
    * Find a set of proxies given a {@link org.apache.geode.distributed.DistributedMember}
-   *
    * @param member {@link org.apache.geode.distributed.DistributedMember}
    * @return a set of {@link javax.management.ObjectName}
    */
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java b/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
index 8028dd7..8bdec89 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
@@ -136,7 +136,7 @@ public class LocalManager extends Manager {
         // Create anonymous stats holder for Management Regions
         final HasCachePerfStats monitoringRegionStats = new HasCachePerfStats() {
           public CachePerfStats getCachePerfStats() {
-            return new CachePerfStats(cache.getDistributedSystem(), "managementRegionStats");
+            return new CachePerfStats(cache.getDistributedSystem().getStatisticsFactory(), "managementRegionStats");
           }
         };
 
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/AsyncEventQueueMBeanBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/AsyncEventQueueMBeanBridge.java
index f7acd3d..ab69ff6 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/AsyncEventQueueMBeanBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/AsyncEventQueueMBeanBridge.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.management.internal.beans;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
 import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueStats;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/GatewaySenderMBeanBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/GatewaySenderMBeanBridge.java
index ecb219a..a706d37 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/GatewaySenderMBeanBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/GatewaySenderMBeanBridge.java
@@ -16,7 +16,7 @@ package org.apache.geode.management.internal.beans;
 
 import java.util.List;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.wan.GatewayEventFilter;
 import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.cache.wan.GatewayTransportFilter;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
index c137a89..fa0d7fc 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
@@ -41,8 +41,9 @@ import javax.management.ObjectName;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.internal.statistics.InternalDistributedSystemStats;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.cache.DiskStore;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.execute.FunctionService;
@@ -421,7 +422,9 @@ public class MemberMBeanBridge {
   public MemberMBeanBridge init() {
     CachePerfStats cachePerfStats = this.cache.getCachePerfStats();
     addCacheStats(cachePerfStats);
-    addFunctionStats(system.getFunctionServiceStats());
+    InternalDistributedSystemStats internalDistributedSystemStats =
+        system.getInternalDistributedSystemStats();
+    addFunctionStats(internalDistributedSystemStats.getFunctionServiceStats());
 
     if (system.getDistributionManager().getStats() instanceof DistributionStats) {
       DistributionStats distributionStats =
@@ -433,13 +436,13 @@ public class MemberMBeanBridge {
       Statistics[] systemStats = null;
 
       if (HostStatHelper.isSolaris()) {
-        systemStats = system.findStatisticsByType(SolarisSystemStats.getType());
+        systemStats = internalDistributedSystemStats.findStatisticsByType(SolarisSystemStats.getType());
       } else if (HostStatHelper.isLinux()) {
-        systemStats = system.findStatisticsByType(LinuxSystemStats.getType());
+        systemStats = internalDistributedSystemStats.findStatisticsByType(LinuxSystemStats.getType());
       } else if (HostStatHelper.isOSX()) {
         systemStats = null;// @TODO once OSX stats are implemented
       } else if (HostStatHelper.isWindows()) {
-        systemStats = system.findStatisticsByType(WindowsSystemStats.getType());
+        systemStats = internalDistributedSystemStats.findStatisticsByType(WindowsSystemStats.getType());
       }
 
       if (systemStats != null) {
@@ -574,6 +577,8 @@ public class MemberMBeanBridge {
 
   public void addSystemStats() {
     GemFireStatSampler sampler = system.getStatSampler();
+    InternalDistributedSystemStats internalDistributedSystemStats =
+        system.getInternalDistributedSystemStats();
 
     ProcessStats processStats = sampler.getProcessStats();
 
@@ -588,7 +593,8 @@ public class MemberMBeanBridge {
 
   public void addVMStats() {
     VMStatsContract vmStatsContract = system.getStatSampler().getVMStats();
-
+    InternalDistributedSystemStats internalDistributedSystemStats =
+        system.getInternalDistributedSystemStats();
     if (vmStatsContract != null && vmStatsContract instanceof VMStats50) {
       VMStats50 vmStats50 = (VMStats50) vmStatsContract;
       Statistics vmStats = vmStats50.getVMStats();
@@ -603,7 +609,7 @@ public class MemberMBeanBridge {
 
       StatisticsType gcType = VMStats50.getGCType();
       if (gcType != null) {
-        Statistics[] gcStats = system.findStatisticsByType(gcType);
+        Statistics[] gcStats = internalDistributedSystemStats.findStatisticsByType(gcType);
         if (gcStats != null && gcStats.length > 0) {
           for (Statistics gcStat : gcStats) {
             if (gcStat != null) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/RegionMBeanBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/RegionMBeanBridge.java
index 2d9e964..fc33df3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/RegionMBeanBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/RegionMBeanBridge.java
@@ -18,7 +18,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.EvictionAttributes;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/AggregateRegionStatsMonitor.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/AggregateRegionStatsMonitor.java
index 5a58a9f..f57ad2c 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/AggregateRegionStatsMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/AggregateRegionStatsMonitor.java
@@ -17,14 +17,13 @@ package org.apache.geode.management.internal.beans.stats;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.statistics.StatisticId;
 import org.apache.geode.internal.statistics.StatisticNotFoundException;
 import org.apache.geode.internal.statistics.StatisticsListener;
 import org.apache.geode.internal.statistics.StatisticsNotification;
 import org.apache.geode.internal.statistics.ValueMonitor;
-import org.apache.geode.management.internal.beans.stats.MBeanStatsMonitor.DefaultHashMap;
 
 
 public class AggregateRegionStatsMonitor extends MBeanStatsMonitor {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GCStatsMonitor.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GCStatsMonitor.java
index e0da0a8..079cc7c 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GCStatsMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GCStatsMonitor.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.management.internal.beans.stats;
 
-import org.apache.geode.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticDescriptor;
 import org.apache.geode.internal.statistics.StatisticId;
 import org.apache.geode.internal.statistics.StatisticNotFoundException;
 import org.apache.geode.internal.statistics.StatisticsNotification;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GatewaySenderOverflowMonitor.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GatewaySenderOverflowMonitor.java
index b46531b..09ed1df 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GatewaySenderOverflowMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/GatewaySenderOverflowMonitor.java
@@ -17,8 +17,8 @@ package org.apache.geode.management.internal.beans.stats;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.statistics.StatisticId;
 import org.apache.geode.internal.statistics.StatisticNotFoundException;
 import org.apache.geode.internal.statistics.StatisticsListener;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitor.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitor.java
index c1744f9..e853332 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitor.java
@@ -19,9 +19,9 @@ import java.util.Map;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.statistics.StatisticId;
 import org.apache.geode.internal.statistics.StatisticNotFoundException;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MemberLevelDiskMonitor.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MemberLevelDiskMonitor.java
index 3415606..09335a2 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MemberLevelDiskMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/MemberLevelDiskMonitor.java
@@ -17,14 +17,13 @@ package org.apache.geode.management.internal.beans.stats;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.statistics.StatisticId;
 import org.apache.geode.internal.statistics.StatisticNotFoundException;
 import org.apache.geode.internal.statistics.StatisticsListener;
 import org.apache.geode.internal.statistics.StatisticsNotification;
 import org.apache.geode.internal.statistics.ValueMonitor;
-import org.apache.geode.management.internal.beans.stats.MBeanStatsMonitor.DefaultHashMap;
 
 public class MemberLevelDiskMonitor extends MBeanStatsMonitor {
 
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/VMStatsMonitor.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/VMStatsMonitor.java
index a21eb81..b979bbb 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/VMStatsMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/VMStatsMonitor.java
@@ -16,7 +16,7 @@ package org.apache.geode.management.internal.beans.stats;
 
 import java.lang.management.ManagementFactory;
 
-import org.apache.geode.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticDescriptor;
 import org.apache.geode.internal.statistics.StatisticId;
 import org.apache.geode.internal.statistics.StatisticNotFoundException;
 import org.apache.geode.internal.statistics.StatisticsNotification;
diff --git a/geode-core/src/main/java/org/apache/geode/package.html b/geode-core/src/main/java/org/apache/geode/package.html
index d7613e3..30798f2 100644
--- a/geode-core/src/main/java/org/apache/geode/package.html
+++ b/geode-core/src/main/java/org/apache/geode/package.html
@@ -47,22 +47,22 @@ The statistics may be
 monitored at runtime using the Admin API or GemFire JMX Agent.</P>
 
 <P>Each application statistic is described by a
-{@link org.apache.geode.StatisticDescriptor} instance.
-Logical groupings of application statistics are described by a
-{@link org.apache.geode.StatisticsType} instance that contains the name
-and description of each statistic.  Each instance of an type
-is represented by an instance of
-{@link org.apache.geode.Statistics}.
-The {@link org.apache.geode.StatisticDescriptor descriptors},
-{@link org.apache.geode.StatisticsType types}, and
-{@link org.apache.geode.Statistics instances} are created using an
-instance of the {@link org.apache.geode.StatisticsFactory} interface.
-Each statistics instance
-(there may be multiple instances of a statistics type) can be identified
-by a {@link org.apache.geode.Statistics#getTextId text id}
-and/or a {@link org.apache.geode.Statistics#getNumericId numeric id}.
-The name, description, etc. of the statistic and its type
-are available in the Admin API or GemFire JMX Agent.</P>
+   {@link org.apache.geode.StatisticDescriptor} instance.
+   Logical groupings of application statistics are described by a
+   {@link org.apache.geode.StatisticsType} instance that contains the name
+   and description of each statistic. Each instance of an type
+   is represented by an instance of
+   {@link org.apache.geode.Statistics}.
+   The {@link org.apache.geode.statistics.StatisticDescriptor descriptors},
+   {@link org.apache.geode.statistics.StatisticsType types}, and
+   {@link org.apache.geode.statistics.Statistics instances} are created using an
+   instance of the {@link org.apache.geode.StatisticsFactory} interface.
+   Each statistics instance
+   (there may be multiple instances of a statistics type) can be identified
+   by a {@link org.apache.geode.Statistics#getTextId text id}
+   and/or a {@link org.apache.geode.Statistics#getNumericId numeric id}.
+   The name, description, etc. of the statistic and its type
+   are available in the Admin API or GemFire JMX Agent.</P>
 
 <P>An application can get, set, and increment the value of a statistic
 using methods of the <code>Statistics</code> interface.  If statistics
diff --git a/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java b/geode-core/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
similarity index 98%
rename from geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java
rename to geode-core/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
index fa3d827..ef176b5 100644
--- a/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java
+++ b/geode-core/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode;
+package org.apache.geode.statistics;
 
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/Statistics.java b/geode-core/src/main/java/org/apache/geode/statistics/Statistics.java
similarity index 99%
rename from geode-core/src/main/java/org/apache/geode/Statistics.java
rename to geode-core/src/main/java/org/apache/geode/statistics/Statistics.java
index b368fad..fafe650 100644
--- a/geode-core/src/main/java/org/apache/geode/Statistics.java
+++ b/geode-core/src/main/java/org/apache/geode/statistics/Statistics.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode;
+package org.apache.geode.statistics;
 
 
 import java.util.function.DoubleSupplier;
diff --git a/geode-core/src/main/java/org/apache/geode/StatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
similarity index 99%
rename from geode-core/src/main/java/org/apache/geode/StatisticsFactory.java
rename to geode-core/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
index ae952b2..fb93129 100644
--- a/geode-core/src/main/java/org/apache/geode/StatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode;
+package org.apache.geode.statistics;
 
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/StatisticsType.java b/geode-core/src/main/java/org/apache/geode/statistics/StatisticsType.java
similarity index 98%
rename from geode-core/src/main/java/org/apache/geode/StatisticsType.java
rename to geode-core/src/main/java/org/apache/geode/statistics/StatisticsType.java
index 076c2d5..6bbd04b 100644
--- a/geode-core/src/main/java/org/apache/geode/StatisticsType.java
+++ b/geode-core/src/main/java/org/apache/geode/statistics/StatisticsType.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode;
+package org.apache.geode.statistics;
 
 
 /**
diff --git a/geode-core/src/main/java/org/apache/geode/StatisticsTypeFactory.java b/geode-core/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
similarity index 99%
rename from geode-core/src/main/java/org/apache/geode/StatisticsTypeFactory.java
rename to geode-core/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
index 563e1ea..449dbab 100644
--- a/geode-core/src/main/java/org/apache/geode/StatisticsTypeFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode;
+package org.apache.geode.statistics;
 
 import java.io.IOException;
 import java.io.Reader;
diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
index f1cac4b..a58a82d 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
@@ -99,9 +99,9 @@ public class AutoConnectionSourceImplJUnitTest {
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "");
 
-    DistributedSystem ds = DistributedSystem.connect(props);
-    cache = CacheFactory.create(ds);
-    poolStats = new PoolStats(ds, "pool");
+    DistributedSystem distributedSystem = DistributedSystem.connect(props);
+    cache = CacheFactory.create(distributedSystem);
+    poolStats = new PoolStats(distributedSystem.getStatisticsFactory(), "pool");
     port = AvailablePortHelper.getRandomAvailableTCPPort();
 
     handler = new FakeHandler();
diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/QueueManagerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/client/internal/QueueManagerJUnitTest.java
index b6cdb40..4a80613 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/QueueManagerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/client/internal/QueueManagerJUnitTest.java
@@ -69,7 +69,7 @@ public class QueueManagerJUnitTest {
 
   private DummyPool pool;
   private LocalLogWriter logger;
-  private DistributedSystem ds;
+  private DistributedSystem distributedSystem;
   private EndpointManagerImpl endpoints;
   private DummySource source;
   private DummyFactory factory;
@@ -83,10 +83,10 @@ public class QueueManagerJUnitTest {
     Properties properties = new Properties();
     properties.put(MCAST_PORT, "0");
     properties.put(LOCATORS, "");
-    ds = DistributedSystem.connect(properties);
-    stats = new PoolStats(ds, "QueueManagerJUnitTest");
+    distributedSystem = DistributedSystem.connect(properties);
+    stats = new PoolStats(distributedSystem.getStatisticsFactory(), "QueueManagerJUnitTest");
     pool = new DummyPool();
-    endpoints = new EndpointManagerImpl("pool", ds, ds.getCancelCriterion(), pool.getStats());
+    endpoints = new EndpointManagerImpl("pool", distributedSystem, distributedSystem.getCancelCriterion(), pool.getStats());
     source = new DummySource();
     factory = new DummyFactory();
     background = Executors.newSingleThreadScheduledExecutor();
@@ -94,8 +94,8 @@ public class QueueManagerJUnitTest {
         "<ExpectedException action=add>" + expectedPrimaryErrorMsg + "</ExpectedException>";
     final String addExpectedREM =
         "<ExpectedException action=add>" + expectedRedundantErrorMsg + "</ExpectedException>";
-    ds.getLogWriter().info(addExpectedPEM);
-    ds.getLogWriter().info(addExpectedREM);
+    distributedSystem.getLogWriter().info(addExpectedPEM);
+    distributedSystem.getLogWriter().info(addExpectedREM);
   }
 
   @After
@@ -108,10 +108,10 @@ public class QueueManagerJUnitTest {
     final String removeExpectedREM =
         "<ExpectedException action=remove>" + expectedRedundantErrorMsg + "</ExpectedException>";
 
-    ds.getLogWriter().info(removeExpectedPEM);
-    ds.getLogWriter().info(removeExpectedREM);
+    distributedSystem.getLogWriter().info(removeExpectedPEM);
+    distributedSystem.getLogWriter().info(removeExpectedREM);
 
-    ds.disconnect();
+    distributedSystem.disconnect();
   }
 
   @Test
@@ -120,7 +120,7 @@ public class QueueManagerJUnitTest {
     factory.addConnection(0, 0, 2);
     factory.addConnection(0, 0, 3);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 2, 2000, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
     assertPortEquals(1, manager.getAllConnections().getPrimary());
     assertPortEquals(new int[] {2, 3}, manager.getAllConnections().getBackups());
@@ -132,7 +132,7 @@ public class QueueManagerJUnitTest {
     factory.addConnection(1, 23, 2);
     factory.addConnection(1, 11, 3);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 2, 2000, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
     assertPortEquals(2, manager.getAllConnections().getPrimary());
     assertPortEquals(new int[] {3, 1}, manager.getAllConnections().getBackups());
@@ -149,7 +149,7 @@ public class QueueManagerJUnitTest {
     factory.addError();
     factory.addConnection(0, 0, 3);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 3, 2000, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
 
     // The primary queue can be set before we try to fill in for all of the failed backup servers,
@@ -182,7 +182,7 @@ public class QueueManagerJUnitTest {
     factory.addConnection(0, 0, 2);
     factory.addConnection(0, 0, 3);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 3, 2000, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
 
     // wait for backups to come online.
@@ -211,7 +211,7 @@ public class QueueManagerJUnitTest {
     factory.addConnection(0, 0, 4);
     factory.addConnection(0, 0, 5);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 3, 2000, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
     assertPortEquals(1, manager.getAllConnections().getPrimary());
     assertPortEquals(new int[] {2, 3, 4}, manager.getAllConnections().getBackups());
@@ -229,7 +229,7 @@ public class QueueManagerJUnitTest {
     factory.addConnection(0, 0, 1);
     factory.addConnection(0, 0, 2);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 2, 20, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
     assertPortEquals(1, manager.getAllConnections().getPrimary());
     assertPortEquals(new int[] {2}, manager.getAllConnections().getBackups());
@@ -254,7 +254,7 @@ public class QueueManagerJUnitTest {
   public void testWaitForPrimary() throws Exception {
     factory.addConnection(0, 0, 1);
     manager = new QueueManagerImpl(pool, endpoints, source, factory, 2, 20, logger,
-        ClientProxyMembershipID.getNewProxyMembership(ds));
+        ClientProxyMembershipID.getNewProxyMembership(distributedSystem));
     manager.start(background);
     manager.getAllConnections().getPrimary().destroy();
 
diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/pooling/ConnectionManagerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
index cb2ef7c..b52d47d 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
@@ -77,7 +77,7 @@ public class ConnectionManagerJUnitTest {
   ConnectionManager manager;
   private InternalLogWriter logger;
   protected DummyFactory factory;
-  private DistributedSystem ds;
+  private DistributedSystem distributedSystem;
   private ScheduledExecutorService background;
   protected EndpointManager endpointManager;
   private CancelCriterion cancelCriterion;
@@ -91,10 +91,10 @@ public class ConnectionManagerJUnitTest {
     Properties properties = new Properties();
     properties.put(MCAST_PORT, "0");
     properties.put(LOCATORS, "");
-    ds = DistributedSystem.connect(properties);
+    distributedSystem = DistributedSystem.connect(properties);
     background = Executors.newSingleThreadScheduledExecutor();
-    poolStats = new PoolStats(ds, "connectionManagerJUnitTest");
-    endpointManager = new EndpointManagerImpl("pool", ds, ds.getCancelCriterion(), poolStats);
+    poolStats = new PoolStats(distributedSystem.getStatisticsFactory(), "connectionManagerJUnitTest");
+    endpointManager = new EndpointManagerImpl("pool", distributedSystem, distributedSystem.getCancelCriterion(), poolStats);
     cancelCriterion = new CancelCriterion() {
 
       public String cancelInProgress() {
@@ -109,7 +109,7 @@ public class ConnectionManagerJUnitTest {
 
   @After
   public void tearDown() throws InterruptedException {
-    ds.disconnect();
+    distributedSystem.disconnect();
     if (manager != null) {
       manager.close(false);
     }
diff --git a/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
index d91a408..fd6d8cf 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
@@ -1760,7 +1760,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     };
     final String tenuredPoolName = HeapMemoryMonitor.getTenuredMemoryPoolMXBean().getName();
     LogWriterUtils.getLogWriter().info("TenuredPoolName:" + tenuredPoolName);
-    final List list = internalSystem.getStatsList();
+    final List list = internalSystem.getInternalDistributedSystemStats().getStatsList();
     assertFalse(list.isEmpty());
 
     // fix: found race condition here...
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/ClientMembershipDUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache30/ClientMembershipDUnitTest.java
index de3cfcd..4c67795 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/ClientMembershipDUnitTest.java
@@ -44,8 +44,8 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.InternalGemFireException;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.Region;
@@ -118,8 +118,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
   protected int getAcceptsInProgress() {
     DistributedSystem distributedSystem = getCache().getDistributedSystem();
-    StatisticsType st = distributedSystem.findType("CacheServerStats");
-    Statistics[] s = distributedSystem.findStatisticsByType(st);
+    StatisticsType st = distributedSystem.getStatisticsFactory().findType("CacheServerStats");
+    Statistics[] s = distributedSystem.getStatisticsFactory().findStatisticsByType(st);
     return s[0].getInt("acceptsInProgress");
   }
 
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
index 4bcc2b9..93887ec 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -144,7 +144,7 @@ public class GMSHealthMonitorJUnitTest {
     when(services.getJoinLeave()).thenReturn(joinLeave);
     when(services.getCancelCriterion()).thenReturn(stopper);
     when(services.getManager()).thenReturn(manager);
-    when(services.getStatistics()).thenReturn(new DistributionStats(system, statsId));
+    when(services.getStatistics()).thenReturn(new DistributionStats(system.getStatisticsFactory(), statsId));
     when(stopper.isCancelInProgress()).thenReturn(false);
 
     if (mockMembers == null) {
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index 60684f9..2ed070f 100755
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@ -167,7 +167,7 @@ public class JGroupsMessengerJUnitTest {
     DistributionManager dm = mock(DistributionManager.class);
     InternalDistributedSystem system =
         InternalDistributedSystem.newInstanceForTesting(dm, nonDefault);
-    when(services.getStatistics()).thenReturn(new DistributionStats(system, statsId));
+    when(services.getStatistics()).thenReturn(new DistributionStats(system.getStatisticsFactory(), statsId));
 
     messenger = new JGroupsMessenger();
     messenger.init(services);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ComplexDiskRegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ComplexDiskRegionJUnitTest.java
index 1bc8d56..df61ba8 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ComplexDiskRegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ComplexDiskRegionJUnitTest.java
@@ -20,7 +20,7 @@ import static org.junit.Assert.fail;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.Scope;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 
@@ -55,7 +55,7 @@ public class ComplexDiskRegionJUnitTest extends DiskRegionTestingBase {
     diskProps.setAllowForceCompaction(true);
     region = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache, diskProps, Scope.LOCAL);
     DiskRegion dr = ((LocalRegion) region).getDiskRegion();
-    StatisticsFactory factory = region.getCache().getDistributedSystem();
+    StatisticsFactory factory = region.getCache().getDistributedSystem().getStatisticsFactory();
     Oplog oplog1 = new Oplog(11, dr.getOplogSet(), new DirectoryHolder(factory, dirs[1], 1000, 0));
     Oplog oplog2 = new Oplog(12, dr.getOplogSet(), new DirectoryHolder(factory, dirs[2], 1000, 1));
     Oplog oplog3 = new Oplog(13, dr.getOplogSet(), new DirectoryHolder(factory, dirs[3], 1000, 2));
@@ -112,7 +112,7 @@ public class ComplexDiskRegionJUnitTest extends DiskRegionTestingBase {
     diskProps.setRolling(false);
     region = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache, diskProps, Scope.LOCAL);
     DiskRegion dr = ((LocalRegion) region).getDiskRegion();
-    StatisticsFactory factory = region.getCache().getDistributedSystem();
+    StatisticsFactory factory = region.getCache().getDistributedSystem().getStatisticsFactory();
     Oplog oplog1 = new Oplog(11, dr.getOplogSet(), new DirectoryHolder(factory, dirs[1], 1000, 0));
     Oplog oplog2 = new Oplog(12, dr.getOplogSet(), new DirectoryHolder(factory, dirs[2], 1000, 1));
     Oplog oplog3 = new Oplog(13, dr.getOplogSet(), new DirectoryHolder(factory, dirs[3], 1000, 2));
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/DiskInitFileJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/DiskInitFileJUnitTest.java
index f1e1082..b926a8b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/DiskInitFileJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/DiskInitFileJUnitTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.internal.cache.persistence.DiskRegionView;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/OplogJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/OplogJUnitTest.java
index 63a73e0..2cae1ff 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/OplogJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/OplogJUnitTest.java
@@ -42,7 +42,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.CacheWriterException;
 import org.apache.geode.cache.DiskAccessException;
 import org.apache.geode.cache.DiskStore;
@@ -196,7 +196,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
       long id = oplog.getOplogId();
       oplog.close();
 
-      StatisticsFactory factory = cache.getDistributedSystem();
+      StatisticsFactory factory = cache.getDistributedSystem().getStatisticsFactory();
       Oplog newOplog =
           new Oplog(id, dr.getOplogSet(), new DirectoryHolder(factory, dirs[0], 1000, 0));
       dr.getOplogSet().setChild(newOplog);
@@ -217,7 +217,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
       Oplog oplog = dr.testHook_getChild();
       long id = oplog.getOplogId();
       oplog.close();
-      StatisticsFactory factory = cache.getDistributedSystem();
+      StatisticsFactory factory = cache.getDistributedSystem().getStatisticsFactory();
       Oplog newOplog =
           new Oplog(id, dr.getOplogSet(), new DirectoryHolder(factory, dirs[0], 1000, 2));
       dr.setChild(newOplog);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/OplogRVVJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/OplogRVVJUnitTest.java
index f115c52..50057d6 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/OplogRVVJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/OplogRVVJUnitTest.java
@@ -36,7 +36,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.i18n.LogWriterI18n;
 import org.apache.geode.internal.cache.DiskInitFile.DiskRegionFlag;
 import org.apache.geode.internal.cache.DiskStoreImpl.OplogEntryIdSet;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsDUnitTest.java
index 4f44a49..1a50e4f 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsDUnitTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.PartitionAttributesFactory;
 import org.apache.geode.cache.Region;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java
index 61e6221..f55cf91 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.LogWriter;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.DataPolicy;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/SimpleDiskRegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/SimpleDiskRegionJUnitTest.java
index 97df4a6..000df6e 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/SimpleDiskRegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/SimpleDiskRegionJUnitTest.java
@@ -31,7 +31,7 @@ import java.util.Set;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.test.dunit.ThreadUtils;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 
@@ -243,7 +243,7 @@ public class SimpleDiskRegionJUnitTest extends DiskRegionTestingBase {
     Oplog oplog = dr.testHook_getChild();
     long id = oplog.getOplogId();
 
-    StatisticsFactory factory = region.getCache().getDistributedSystem();
+    StatisticsFactory factory = region.getCache().getDistributedSystem().getStatisticsFactory();
     Oplog newOplog =
         new Oplog(id, dr.getOplogSet(), new DirectoryHolder(factory, dirs[0], 1000000, 0));
     dr.getDiskStore().getPersistentOplogs().setChild(newOplog);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
index c8565cd..6f98c01 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
@@ -78,7 +78,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
 
   static Boolean isByName = null;
 
-  static InternalDistributedSystem ds = null;
+  static InternalDistributedSystem distributedSystem = null;
 
   static int noOfExecutionCalls_Aggregate = 0;
   static int noOfExecutionsCompleted_Aggregate = 0;
@@ -218,7 +218,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
             try {
               int j = 0;
               HashSet origVals = new HashSet();
-              for (Iterator i = testKeysSet.iterator(); i.hasNext();) {
+              for (Iterator i = testKeysSet.iterator(); i.hasNext(); ) {
                 Integer val = new Integer(j++);
                 origVals.add(val);
                 region.put(i.next(), val);
@@ -268,8 +268,11 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkStatsOnClient = new SerializableCallable("checkStatsOnClient") {
       public Object call() throws Exception {
         // checks for the aggregate stats
-        InternalDistributedSystem iDS = (InternalDistributedSystem) cache.getDistributedSystem();
-        FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+        InternalDistributedSystem
+            internalDistributedSystem =
+            (InternalDistributedSystem) cache.getDistributedSystem();
+        FunctionServiceStats functionServiceStats =
+            internalDistributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         assertEquals(noOfExecutionCalls_Aggregate,
@@ -280,14 +283,15 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
 
         LogWriterUtils.getLogWriter().info("Calling FunctionStats for  TEST_FUNCTION2 :");
         FunctionStats functionStats =
-            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, iDS);
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, internalDistributedSystem);
         LogWriterUtils.getLogWriter().info("Called FunctionStats for  TEST_FUNCTION2 :");
         assertEquals(noOfExecutionCalls_TESTFUNCTION2, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION2,
             functionStats.getFunctionExecutionsCompleted());
         assertTrue(functionStats.getResultsReceived() >= resultReceived_TESTFUNCTION2);
 
-        functionStats = FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, iDS);
+        functionStats =
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, internalDistributedSystem);
         assertEquals(noOfExecutionCalls_TESTFUNCTION3, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION3,
             functionStats.getFunctionExecutionsCompleted());
@@ -302,8 +306,11 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkStatsOnServer = new SerializableCallable("checkStatsOnClient") {
       public Object call() throws Exception {
         // checks for the aggregate stats
-        InternalDistributedSystem iDS = (InternalDistributedSystem) cache.getDistributedSystem();
-        FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+        InternalDistributedSystem
+            internalDistributedSystem =
+            (InternalDistributedSystem) cache.getDistributedSystem();
+        FunctionServiceStats functionServiceStats =
+            internalDistributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         // functions are executed 3 times
@@ -315,7 +322,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
             .getFunctionExecutionsCompleted() >= noOfExecutionsCompleted_Aggregate);
 
         FunctionStats functionStats =
-            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, iDS);
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, internalDistributedSystem);
         // TEST_FUNCTION2 is executed twice
         noOfExecutionCalls_TESTFUNCTION2 += 2;
         assertTrue(functionStats.getFunctionExecutionCalls() >= noOfExecutionCalls_TESTFUNCTION2);
@@ -323,7 +330,8 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
         assertTrue(functionStats
             .getFunctionExecutionsCompleted() >= noOfExecutionsCompleted_TESTFUNCTION2);
 
-        functionStats = FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, iDS);
+        functionStats =
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, internalDistributedSystem);
         // TEST_FUNCTION3 is executed once
         noOfExecutionCalls_TESTFUNCTION3 += 1;
         assertTrue(functionStats.getFunctionExecutionCalls() >= noOfExecutionCalls_TESTFUNCTION3);
@@ -409,7 +417,6 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
           LogWriterUtils.getLogWriter().info("Created Cache on Client");
           assertNotNull(cache);
 
-
           CacheServerTestUtil.disableShufflingOfEndpoints();
           Pool p;
           try {
@@ -505,8 +512,11 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkStatsOnClient = new SerializableCallable("checkStatsOnClient") {
       public Object call() throws Exception {
         // checks for the aggregate stats
-        InternalDistributedSystem iDS = (InternalDistributedSystem) cache.getDistributedSystem();
-        FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+        InternalDistributedSystem
+            internalDistributedSystem =
+            (InternalDistributedSystem) cache.getDistributedSystem();
+        FunctionServiceStats functionServiceStats =
+            internalDistributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         assertEquals(noOfExecutionCalls_Aggregate,
@@ -516,7 +526,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
         assertEquals(resultReceived_Aggregate, functionServiceStats.getResultsReceived());
 
         FunctionStats functionStats =
-            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, iDS);
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, internalDistributedSystem);
         assertEquals(noOfExecutionCalls_TESTFUNCTION2, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION2,
             functionStats.getFunctionExecutionsCompleted());
@@ -597,8 +607,11 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkStatsOnClient = new SerializableCallable("checkStatsOnClient") {
       public Object call() throws Exception {
         // checks for the aggregate stats
-        InternalDistributedSystem iDS = (InternalDistributedSystem) cache.getDistributedSystem();
-        FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+        InternalDistributedSystem
+            internalDistributedSystem =
+            (InternalDistributedSystem) cache.getDistributedSystem();
+        FunctionServiceStats functionServiceStats =
+            internalDistributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         assertEquals(noOfExecutionCalls_Aggregate,
@@ -608,13 +621,14 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
         assertEquals(resultReceived_Aggregate, functionServiceStats.getResultsReceived());
 
         FunctionStats functionStats =
-            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION1, iDS);
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION1, internalDistributedSystem);
         assertEquals(noOfExecutionCalls_TESTFUNCTION1, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION1,
             functionStats.getFunctionExecutionsCompleted());
         assertEquals(resultReceived_TESTFUNCTION1, functionStats.getResultsReceived());
 
-        functionStats = FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION5, iDS);
+        functionStats =
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION5, internalDistributedSystem);
         assertEquals(noOfExecutionCalls_TESTFUNCTION5, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION5,
             functionStats.getFunctionExecutionsCompleted());
@@ -629,8 +643,11 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkStatsOnServer = new SerializableCallable("checkStatsOnClient") {
       public Object call() throws Exception {
         // checks for the aggregate stats
-        InternalDistributedSystem iDS = (InternalDistributedSystem) cache.getDistributedSystem();
-        FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+        InternalDistributedSystem
+            internalDistributedSystem =
+            (InternalDistributedSystem) cache.getDistributedSystem();
+        FunctionServiceStats functionServiceStats =
+            internalDistributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         // functions are executed 2 times
@@ -658,7 +675,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
         }
 
         FunctionStats functionStats =
-            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION1, iDS);
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION1, internalDistributedSystem);
         // TEST_FUNCTION1 is executed once
         noOfExecutionCalls_TESTFUNCTION1 += 1;
         assertEquals(noOfExecutionCalls_TESTFUNCTION1, functionStats.getFunctionExecutionCalls());
@@ -666,7 +683,8 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION1,
             functionStats.getFunctionExecutionsCompleted());
 
-        functionStats = FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION5, iDS);
+        functionStats =
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION5, internalDistributedSystem);
         // TEST_FUNCTION5 is executed once
         noOfExecutionCalls_TESTFUNCTION5 += 1;
         assertEquals(noOfExecutionCalls_TESTFUNCTION5, functionStats.getFunctionExecutionCalls());
@@ -772,7 +790,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
           testKeys.add("execKey-" + i);
         }
         int j = 0;
-        for (Iterator i = testKeys.iterator(); i.hasNext();) {
+        for (Iterator i = testKeys.iterator(); i.hasNext(); ) {
           Integer val = new Integer(j++);
           pr.put(i.next(), val);
         }
@@ -802,9 +820,10 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
 
     accessor.invoke(new SerializableCallable("checkFunctionExecutionStatsForAccessor") {
       public Object call() throws Exception {
-        InternalDistributedSystem iDS =
+        InternalDistributedSystem internalDistributedSystem =
             ((InternalDistributedSystem) getCache().getDistributedSystem());
-        FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+        FunctionServiceStats functionServiceStats =
+            internalDistributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         assertEquals(noOfExecutionCalls_Aggregate,
@@ -814,13 +833,14 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
         assertEquals(resultReceived_Aggregate, functionServiceStats.getResultsReceived());
 
         FunctionStats functionStats =
-            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, iDS);
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, internalDistributedSystem);
         assertEquals(noOfExecutionCalls_TESTFUNCTION2, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION2,
             functionStats.getFunctionExecutionsCompleted());
         assertEquals(resultReceived_TESTFUNCTION2, functionStats.getResultsReceived());
 
-        functionStats = FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, iDS);
+        functionStats =
+            FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, internalDistributedSystem);
         assertEquals(noOfExecutionCalls_TESTFUNCTION3, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_TESTFUNCTION3,
             functionStats.getFunctionExecutionsCompleted());
@@ -833,10 +853,12 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkFunctionExecutionStatsForDataStore =
         new SerializableCallable("checkFunctionExecutionStatsForDataStore") {
           public Object call() throws Exception {
-            InternalDistributedSystem iDS =
+            InternalDistributedSystem internalDistributedSystem =
                 ((InternalDistributedSystem) getCache().getDistributedSystem());
             // 3 Function Executions took place
-            FunctionServiceStats functionServiceStats = iDS.getFunctionServiceStats();
+            FunctionServiceStats functionServiceStats =
+                internalDistributedSystem.getInternalDistributedSystemStats()
+                    .getFunctionServiceStats();
             waitNoFunctionsRunning(functionServiceStats);
 
             noOfExecutionCalls_Aggregate += 3;
@@ -847,7 +869,8 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
                 functionServiceStats.getFunctionExecutionsCompleted());
 
             FunctionStats functionStats =
-                FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION2, iDS);
+                FunctionStats
+                    .getFunctionStats(TestFunction.TEST_FUNCTION2, internalDistributedSystem);
             // TEST_FUNCTION2 is executed twice
             noOfExecutionCalls_TESTFUNCTION2 += 2;
             assertEquals(noOfExecutionCalls_TESTFUNCTION2,
@@ -856,7 +879,9 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
             assertEquals(noOfExecutionsCompleted_TESTFUNCTION2,
                 functionStats.getFunctionExecutionsCompleted());
 
-            functionStats = FunctionStats.getFunctionStats(TestFunction.TEST_FUNCTION3, iDS);
+            functionStats =
+                FunctionStats
+                    .getFunctionStats(TestFunction.TEST_FUNCTION3, internalDistributedSystem);
             // TEST_FUNCTION3 is executed once
             noOfExecutionCalls_TESTFUNCTION3 += 1;
             assertEquals(noOfExecutionCalls_TESTFUNCTION3,
@@ -957,11 +982,13 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
               resultReceived_Aggregate += list.size();
               assertEquals(resultReceived_Aggregate,
                   ((InternalDistributedSystem) getCache().getDistributedSystem())
+                      .getInternalDistributedSystemStats()
                       .getFunctionServiceStats().getResultsReceived());
 
               resultReceived_TESTFUNCTION2 += list.size();
               assertEquals(resultReceived_TESTFUNCTION2,
                   ((InternalDistributedSystem) getCache().getDistributedSystem())
+                      .getInternalDistributedSystemStats()
                       .getFunctionServiceStats().getResultsReceived());
 
               return Boolean.TRUE;
@@ -1020,8 +1047,8 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
           public Object call() throws Exception {
             Properties props = new Properties();
             try {
-              ds = getSystem(props);
-              assertNotNull(ds);
+              distributedSystem = getSystem(props);
+              assertNotNull(distributedSystem);
             } catch (Exception e) {
               Assert.fail("Failed while creating the Distribued System", e);
             }
@@ -1060,9 +1087,9 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     member1.invoke(new SerializableCallable("excuteOnMembers_InlineFunction") {
       public Object call() throws Exception {
 
-        assertNotNull(ds);
+        assertNotNull(distributedSystem);
         Execution memberExecution = null;
-        DistributedMember localmember = ds.getDistributedMember();
+        DistributedMember localmember = distributedSystem.getDistributedMember();
         memberExecution = FunctionService.onMember(localmember);
 
         memberExecution.setArguments("Key");
@@ -1087,7 +1114,9 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
 
     member1.invoke(new SerializableCallable("checkFunctionExecutionStatsForMember1") {
       public Object call() throws Exception {
-        FunctionServiceStats functionServiceStats = ds.getFunctionServiceStats();
+        FunctionServiceStats
+            functionServiceStats =
+            distributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
         waitNoFunctionsRunning(functionServiceStats);
 
         assertEquals(noOfExecutionCalls_Aggregate,
@@ -1096,7 +1125,8 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
             functionServiceStats.getFunctionExecutionsCompleted());
         assertEquals(resultReceived_Aggregate, functionServiceStats.getResultsReceived());
 
-        FunctionStats functionStats = FunctionStats.getFunctionStats(inlineFunction.getId(), ds);
+        FunctionStats functionStats = FunctionStats.getFunctionStats(inlineFunction.getId(),
+            distributedSystem);
         assertEquals(noOfExecutionCalls_Inline, functionStats.getFunctionExecutionCalls());
         assertEquals(noOfExecutionsCompleted_Inline,
             functionStats.getFunctionExecutionsCompleted());
@@ -1108,7 +1138,9 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
     SerializableCallable checkFunctionExecutionStatsForOtherMember =
         new SerializableCallable("checkFunctionExecutionStatsForOtherMember") {
           public Object call() throws Exception {
-            FunctionServiceStats functionServiceStats = ds.getFunctionServiceStats();
+            FunctionServiceStats
+                functionServiceStats =
+                distributedSystem.getInternalDistributedSystemStats().getFunctionServiceStats();
             waitNoFunctionsRunning(functionServiceStats);
 
             // One function Execution took place on there members
@@ -1120,7 +1152,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
                 functionServiceStats.getFunctionExecutionsCompleted());
 
             FunctionStats functionStats =
-                FunctionStats.getFunctionStats(inlineFunction.getId(), ds);
+                FunctionStats.getFunctionStats(inlineFunction.getId(), distributedSystem);
             // noOfExecutionCalls_Inline++;
             // noOfExecutionsCompleted_Inline++;
             assertEquals(noOfExecutionCalls_Inline, functionStats.getFunctionExecutionCalls());
@@ -1206,7 +1238,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
           testKeys.add("execKey-" + i);
         }
         int j = 0;
-        for (Iterator i = testKeys.iterator(); i.hasNext();) {
+        for (Iterator i = testKeys.iterator(); i.hasNext(); ) {
           Integer key = new Integer(j++);
           pr.put(key, i.next());
         }
@@ -1257,7 +1289,7 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
             noOfExecutionCalls_Aggregate++;
             noOfExecutionExceptions_Aggregate++;
             FunctionServiceStats functionServiceStats =
-                ((InternalDistributedSystem) getCache().getDistributedSystem())
+                ((InternalDistributedSystem) getCache().getDistributedSystem()).getInternalDistributedSystemStats()
                     .getFunctionServiceStats();
             assertEquals(noOfExecutionCalls_Aggregate,
                 functionServiceStats.getFunctionExecutionCalls());
@@ -1269,13 +1301,6 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
           }
         };
 
-    /*
-     * datastore0.invoke(checkFunctionExecutionStatsForDataStore);
-     * datastore1.invoke(checkFunctionExecutionStatsForDataStore);
-     * datastore2.invoke(checkFunctionExecutionStatsForDataStore);
-     * datastore3.invoke(checkFunctionExecutionStatsForDataStore);
-     */
-
     SerializableCallable closeDistributedSystem =
         new SerializableCallable("closeDistributedSystem") {
           public Object call() throws Exception {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
index bf77c8a..14c372f 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
@@ -26,8 +26,8 @@ import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
@@ -138,8 +138,8 @@ public class CacheServerMaxConnectionsJUnitTest {
   public void testMaxCnxLimit() throws Exception {
     PORT = createServer();
     createProxyAndRegionForClient();
-    StatisticsType st = this.system.findType("CacheServerStats");
-    final Statistics s = this.system.findStatisticsByType(st)[0];
+    StatisticsType st = this.system.getStatisticsFactory().findType("CacheServerStats");
+    final Statistics s = this.system.getStatisticsFactory().findStatisticsByType(st)[0];
     assertEquals(0, s.getInt("currentClients"));
     assertEquals(0, s.getInt("currentClientConnections"));
     Connection[] cnxs = new Connection[MAX_CNXS];
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorIntegrationTest.java
index 6ae910c..0d8b562 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorIntegrationTest.java
@@ -30,8 +30,8 @@ import org.junit.Test;
 import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
@@ -180,8 +180,8 @@ public class ClientHealthMonitorIntegrationTest {
     System.setProperty(ClientHealthMonitor.CLIENT_HEALTH_MONITOR_INTERVAL_PROPERTY, "100");
     PORT = createServer();
     createProxyAndRegionForClient();
-    StatisticsType statisticsType = this.system.findType("CacheServerStats");
-    final Statistics statistics = this.system.findStatisticsByType(statisticsType)[0];
+    StatisticsType statisticsType = this.system.getStatisticsFactory().findType("CacheServerStats");
+    final Statistics statistics = this.system.getStatisticsFactory().findStatisticsByType(statisticsType)[0];
     assertEquals(0, statistics.getInt("currentClients"));
     assertEquals(0, statistics.getInt("currentClientConnections"));
     this.system.getLogWriter()
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java
index 578c030..4db64c5 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java
@@ -109,7 +109,7 @@ public class ParallelQueueRemovalMessageJUnitTest {
     EvictionAttributesImpl ea = (EvictionAttributesImpl) EvictionAttributes
         .createLRUMemoryAttributes(100, null, EvictionAction.OVERFLOW_TO_DISK);
     EvictionController eviction = AbstractEvictionController.create(ea, false,
-        this.cache.getDistributedSystem(), "queueRegion");
+        this.cache.getDistributedSystem().getStatisticsFactory(), "queueRegion");
     when(this.queueRegion.getEvictionController()).thenReturn(eviction);
   }
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/offheap/NullOffHeapMemoryStats.java b/geode-core/src/test/java/org/apache/geode/internal/offheap/NullOffHeapMemoryStats.java
index 0831444..27132e2 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/offheap/NullOffHeapMemoryStats.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/offheap/NullOffHeapMemoryStats.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.offheap;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * Null implementation of OffHeapMemoryStats for testing.
diff --git a/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapStorageJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapStorageJUnitTest.java
index d6be486..c0c3069 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapStorageJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapStorageJUnitTest.java
@@ -27,7 +27,7 @@ import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.OutOfOffHeapMemoryException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionStats;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/DiskSpaceLimitIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/DiskSpaceLimitIntegrationTest.java
index 81f2233..46fd647 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/DiskSpaceLimitIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/DiskSpaceLimitIntegrationTest.java
@@ -38,9 +38,9 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.io.MainWithChildrenRollingFileHandler;
 import org.apache.geode.internal.io.RollingFileHandler;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsIntegrationTest.java
index 2b2bfaa..7fd35fa 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsIntegrationTest.java
@@ -30,10 +30,10 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.StatisticsTest;
@@ -233,7 +233,7 @@ public class DistributedSystemStatisticsIntegrationTest {
   }
 
   private StatisticsFactory factory() {
-    return this.system;
+    return this.system.getStatisticsFactory();
   }
 
   private Statistics setUpIntStatistics(final int count) {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsTypeIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsTypeIntegrationTest.java
index 288c226..833cbd4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsTypeIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsTypeIntegrationTest.java
@@ -29,9 +29,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.StatisticsTest;
@@ -86,7 +86,7 @@ public class DistributedSystemStatisticsTypeIntegrationTest {
   }
 
   private StatisticsFactory factory() {
-    return this.system;
+    return this.system.getStatisticsFactory();
   }
 
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/FileSizeLimitIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/FileSizeLimitIntegrationTest.java
index 21208ec..9e1ae05 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/FileSizeLimitIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/FileSizeLimitIntegrationTest.java
@@ -32,9 +32,9 @@ import org.junit.rules.TestName;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.io.MainWithChildrenRollingFileHandler;
 import org.apache.geode.test.junit.categories.IntegrationTest;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java
index cb73983..df0a995 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java
@@ -47,8 +47,8 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.GemFireVersion;
@@ -77,7 +77,7 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
 
   private static final int STAT_SAMPLE_RATE = 1000;
 
-  private DistributedSystem system;
+  private DistributedSystem distributedSystem;
   private File testDir;
 
   @Rule
@@ -369,7 +369,7 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
     final File archiveFile2 = new File(dirName + File.separator + this.testName + "-01-02.gfs");
     final File archiveFile3 = new File(dirName + File.separator + this.testName + "-01-03.gfs");
 
-    // set the system property to use KB instead of MB for file size
+    // set the distributedSystem property to use KB instead of MB for file size
     System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
     Properties props = createGemFireProperties();
     props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "1");
@@ -418,7 +418,7 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
 
     final int sampleRate = 1000;
 
-    // set the system property to use KB instead of MB for file size
+    // set the distributedSystem property to use KB instead of MB for file size
     System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
     Properties props = createGemFireProperties();
     props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
@@ -474,7 +474,7 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
     final String tenuredPoolName = HeapMemoryMonitor.getTenuredMemoryPoolMXBean().getName();
     logger.info("TenuredPoolName: {}", tenuredPoolName);
 
-    final List<Statistics> list = ((StatisticsManager) this.system).getStatsList();
+    final List<Statistics> list = ((StatisticsManager) this.distributedSystem).getStatsList();
     assertFalse(list.isEmpty());
 
     boolean done = false;
@@ -528,15 +528,15 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
 
   @Override
   protected StatisticsManager getStatisticsManager() {
-    return (InternalDistributedSystem) this.system;
+    return ((InternalDistributedSystem)this.distributedSystem).getInternalDistributedSystemStats();
   }
 
   protected OsStatisticsFactory getOsStatisticsFactory() {
-    return (InternalDistributedSystem) this.system;
+    return ((InternalDistributedSystem)this.distributedSystem).getInternalDistributedSystemStats();
   }
 
   private GemFireStatSampler getGemFireStatSampler() {
-    return ((InternalDistributedSystem) this.system).getStatSampler();
+    return ((InternalDistributedSystem) this.distributedSystem).getStatSampler();
   }
 
   private SampleCollector getSampleCollector() {
@@ -561,65 +561,14 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
    */
   @SuppressWarnings("deprecation")
   private void connect(Properties props) {
-    this.system = DistributedSystem.connect(props);
+    this.distributedSystem = DistributedSystem.connect(props);
   }
 
   @SuppressWarnings("deprecation")
   private void disconnect() {
-    if (this.system != null) {
-      this.system.disconnect();
-      this.system = null;
+    if (this.distributedSystem != null) {
+      this.distributedSystem.disconnect();
+      this.distributedSystem = null;
     }
   }
-
-  // public static class AsyncInvoker {
-  // public static AsyncInvocation invokeAsync(Runnable r) {
-  // return invokeAsync(r, "run", new Object[0]);
-  // }
-  // public static AsyncInvocation invokeAsync(Callable c) {
-  // return invokeAsync(c, "call", new Object[0]);
-  // }
-  // public static AsyncInvocation invokeAsync(
-  // final Object o, final String methodName, final Object[] args) {
-  // AsyncInvocation ai =
-  // new AsyncInvocation(o, methodName, new Runnable() {
-  // public void run() {
-  // MethExecutorResult result =
-  // MethExecutor.executeObject(o, methodName, args);
-  // if (result.exceptionOccurred()) {
-  // throw new AsyncInvocationException(result.getException());
-  // }
-  // AsyncInvocation.setReturnValue(result.getResult());
-  // }
-  // });
-  // ai.start();
-  // return ai;
-  // }
-  //
-  // public static class AsyncInvocationException extends RuntimeException {
-  // private static final long serialVersionUID = -5522299018650622945L;
-  // /**
-  // * Creates a new <code>AsyncInvocationException</code>.
-  // */
-  // public AsyncInvocationException(String message) {
-  // super(message);
-  // }
-  //
-  // /**
-  // * Creates a new <code>AsyncInvocationException</code> that was
-  // * caused by a given exception
-  // */
-  // public AsyncInvocationException(String message, Throwable thr) {
-  // super(message, thr);
-  // }
-  //
-  // /**
-  // * Creates a new <code>AsyncInvocationException</code> that was
-  // * caused by a given exception
-  // */
-  // public AsyncInvocationException(Throwable thr) {
-  // super(thr.getMessage(), thr);
-  // }
-  // }
-  // }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/LinuxSystemStatsTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/LinuxSystemStatsTest.java
index 08659c8..9388f1a 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/LinuxSystemStatsTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/LinuxSystemStatsTest.java
@@ -42,7 +42,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.internal.statistics.platform.LinuxProcFsStatistics;
 import org.apache.geode.internal.statistics.platform.LinuxSystemStats;
 import org.apache.geode.test.junit.categories.IntegrationTest;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/SampleCollectorTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/SampleCollectorTest.java
index d03a077..6a45127 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/SampleCollectorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/SampleCollectorTest.java
@@ -30,9 +30,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.io.MainWithChildrenRollingFileHandler;
 import org.apache.geode.internal.statistics.TestSampleHandler.Info;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/SimpleStatSamplerIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/SimpleStatSamplerIntegrationTest.java
index 4d153d6..b23524f 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/SimpleStatSamplerIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/SimpleStatSamplerIntegrationTest.java
@@ -34,8 +34,8 @@ import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.stats50.VMStats50;
 import org.apache.geode.test.junit.categories.IntegrationTest;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithConsecutiveResourceInstGenerator.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithConsecutiveResourceInstGenerator.java
index 5312686..0e51169 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithConsecutiveResourceInstGenerator.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithConsecutiveResourceInstGenerator.java
@@ -38,9 +38,9 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.statistics.StatArchiveReader.ResourceInst;
 import org.apache.geode.internal.statistics.StatArchiveReader.StatValue;
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWriterReaderIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWriterReaderIntegrationTest.java
index 613d7ba..e3cb432 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWriterReaderIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWriterReaderIntegrationTest.java
@@ -48,9 +48,9 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.statistics.StatArchiveReader.StatValue;
 import org.apache.geode.test.junit.categories.IntegrationTest;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerIntegrationTest.java
index 8eaefc9..54062e0 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerIntegrationTest.java
@@ -38,9 +38,9 @@ import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.statistics.StatArchiveReader.StatValue;
 import org.apache.geode.test.junit.categories.IntegrationTest;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerTestCase.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerTestCase.java
index 7fdf0a3..7e17ae9 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatSamplerTestCase.java
@@ -26,8 +26,8 @@ import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.util.StopWatch;
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatTypesAreRolledOverRegressionTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatTypesAreRolledOverRegressionTest.java
index eb3b40b..0ae515d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatTypesAreRolledOverRegressionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatTypesAreRolledOverRegressionTest.java
@@ -33,9 +33,9 @@ import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 import org.mockito.stubbing.Answer;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.io.MainWithChildrenRollingFileHandler;
 import org.apache.geode.internal.statistics.StatArchiveReader.ResourceInst;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsDistributedTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsDistributedTest.java
index efadd77..41de134 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsDistributedTest.java
@@ -47,11 +47,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheListener;
 import org.apache.geode.cache.EntryEvent;
@@ -192,7 +192,7 @@ public class StatisticsDistributedTest extends JUnit4CacheTestCase {
 
       InternalDistributedSystem system = getSystem(props);
 
-      PubSubStats statistics = new PubSubStats(system, "sub-1", 1);
+      PubSubStats statistics = new PubSubStats(system.getStatisticsFactory(), "sub-1", 1);
       subStatsRef.set(statistics);
 
       // assert that sampler is working as expected
@@ -238,7 +238,7 @@ public class StatisticsDistributedTest extends JUnit4CacheTestCase {
         final int pubThread = j;
         publishers[pubThread] = pubs[pubVM]
             .invokeAsync("pub-connect-and-put-data-" + pubVM + "-thread-" + pubThread, () -> {
-              PubSubStats statistics = new PubSubStats(basicGetSystem(), "pub-" + pubThread, pubVM);
+              PubSubStats statistics = new PubSubStats(basicGetSystem().getStatisticsFactory(), "pub-" + pubThread, pubVM);
               pubStatsRef.set(pubThread, statistics);
 
               RegionMembershipListener rml = rmlRef.get();
@@ -280,8 +280,8 @@ public class StatisticsDistributedTest extends JUnit4CacheTestCase {
               assertEquals(MAX_PUTS, statistics.getPuts());
 
               // wait for 2 samples to ensure all stats have been archived
-              StatisticsType statSamplerType = getSystem().findType("StatSampler");
-              Statistics[] statsArray = getSystem().findStatisticsByType(statSamplerType);
+              StatisticsType statSamplerType = getSystem().getInternalDistributedSystemStats().findType("StatSampler");
+              Statistics[] statsArray = getSystem().getInternalDistributedSystemStats().findStatisticsByType(statSamplerType);
               assertEquals(1, statsArray.length);
 
               Statistics statSamplerStats = statsArray[0];
@@ -302,8 +302,8 @@ public class StatisticsDistributedTest extends JUnit4CacheTestCase {
 
     sub.invoke("sub-wait-for-samples", () -> {
       // wait for 2 samples to ensure all stats have been archived
-      StatisticsType statSamplerType = getSystem().findType("StatSampler");
-      Statistics[] statsArray = getSystem().findStatisticsByType(statSamplerType);
+      StatisticsType statSamplerType = getSystem().getInternalDistributedSystemStats().findType("StatSampler");
+      Statistics[] statsArray = getSystem().getInternalDistributedSystemStats().findStatisticsByType(statSamplerType);
       assertEquals(1, statsArray.length);
 
       Statistics statSamplerStats = statsArray[0];
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
index 7449416..2198462 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
@@ -14,8 +14,8 @@
  */
 package org.apache.geode.internal.statistics;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
 
 /**
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsSampler.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsSampler.java
index cc4914d..2740483 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsSampler.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsSampler.java
@@ -16,7 +16,7 @@ package org.apache.geode.internal.statistics;
 
 import java.util.List;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 
 /**
  * @since GemFire 7.0
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/ValueMonitorIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/ValueMonitorIntegrationTest.java
index 665f5d1..cb8ff0f 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/ValueMonitorIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/ValueMonitorIntegrationTest.java
@@ -37,9 +37,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.io.MainWithChildrenRollingFileHandler;
 import org.apache.geode.internal.statistics.StatisticsNotification.Type;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/stats50/AtomicStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/stats50/AtomicStatsJUnitTest.java
index 4282df6..a5b3744 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/stats50/AtomicStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/stats50/AtomicStatsJUnitTest.java
@@ -26,10 +26,10 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 import org.apache.geode.test.junit.categories.IntegrationTest;
@@ -49,7 +49,7 @@ public class AtomicStatsJUnitTest {
     props.setProperty(MCAST_PORT, "0");
     // props.setProperty("statistic-sample-rate", "60000");
     props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
-    DistributedSystem ds = DistributedSystem.connect(props);
+    DistributedSystem distributedSystem = DistributedSystem.connect(props);
 
     String statName = "TestStats";
     String statDescription = "Tests stats";
@@ -105,7 +105,7 @@ public class AtomicStatsJUnitTest {
       thread1.start();
       thread3.start();
       for (int i = 0; i < 5000; i++) {
-        Statistics stats = ds.createAtomicStatistics(type, "stats");
+        Statistics stats = distributedSystem.getStatisticsFactory().createAtomicStatistics(type, "stats");
         statsRef.set(stats);
         beforeIncrement.await();
         afterIncrement.await();
@@ -114,7 +114,7 @@ public class AtomicStatsJUnitTest {
       }
 
     } finally {
-      ds.disconnect();
+      distributedSystem.disconnect();
     }
   }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/management/bean/stats/AsyncEventQueueStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/bean/stats/AsyncEventQueueStatsJUnitTest.java
index 1445ecd..85ddc78 100644
--- a/geode-core/src/test/java/org/apache/geode/management/bean/stats/AsyncEventQueueStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/bean/stats/AsyncEventQueueStatsJUnitTest.java
@@ -19,7 +19,7 @@ import static org.junit.Assert.assertEquals;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.StatisticDescriptor;
+import org.apache.geode.statistics.StatisticDescriptor;
 import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueStats;
 import org.apache.geode.management.internal.beans.AsyncEventQueueMBeanBridge;
 import org.apache.geode.test.junit.categories.IntegrationTest;
@@ -33,7 +33,7 @@ public class AsyncEventQueueStatsJUnitTest extends MBeanStatsTestCase {
   private AsyncEventQueueStats asyncEventQueueStats;
 
   public void init() {
-    asyncEventQueueStats = new AsyncEventQueueStats(system, "test");
+    asyncEventQueueStats = new AsyncEventQueueStats(system.getStatisticsFactory(), "test");
 
     bridge = new AsyncEventQueueMBeanBridge();
     bridge.addAsyncEventQueueStats(asyncEventQueueStats);
diff --git a/geode-core/src/test/java/org/apache/geode/management/bean/stats/DiskStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/bean/stats/DiskStatsJUnitTest.java
index ee61f37..b7bad90 100644
--- a/geode-core/src/test/java/org/apache/geode/management/bean/stats/DiskStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/bean/stats/DiskStatsJUnitTest.java
@@ -37,7 +37,7 @@ public class DiskStatsJUnitTest extends MBeanStatsTestCase {
   private static long testStartTime = NanoTimer.getTime();
 
   public void init() {
-    diskStoreStats = new DiskStoreStats(system, "test");
+    diskStoreStats = new DiskStoreStats(system.getStatisticsFactory(), "test");
 
     bridge = new DiskStoreMBeanBridge();
     bridge.addDiskStoreStats(diskStoreStats);
diff --git a/geode-core/src/test/java/org/apache/geode/management/bean/stats/GatewayMBeanBridgeJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/bean/stats/GatewayMBeanBridgeJUnitTest.java
index b76b5c4..f7a28b6 100644
--- a/geode-core/src/test/java/org/apache/geode/management/bean/stats/GatewayMBeanBridgeJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/bean/stats/GatewayMBeanBridgeJUnitTest.java
@@ -40,7 +40,7 @@ public class GatewayMBeanBridgeJUnitTest extends MBeanStatsTestCase {
   private AbstractGatewaySender sender;
 
   public void init() {
-    senderStats = new GatewaySenderStats(system, "test");
+    senderStats = new GatewaySenderStats(system.getStatisticsFactory(), "test");
 
     sender = Mockito.mock(AbstractGatewaySender.class);
     Mockito.when(sender.getStatistics()).thenReturn(senderStats);
diff --git a/geode-core/src/test/java/org/apache/geode/management/bean/stats/MemberLevelStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/bean/stats/MemberLevelStatsJUnitTest.java
index 76f8d6e..97bf1d9 100644
--- a/geode-core/src/test/java/org/apache/geode/management/bean/stats/MemberLevelStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/bean/stats/MemberLevelStatsJUnitTest.java
@@ -66,12 +66,12 @@ public class MemberLevelStatsJUnitTest extends MBeanStatsTestCase {
   private static long testStartTime = NanoTimer.getTime();
 
   public void init() {
-    cachePerfStats = new CachePerfStats(system);
-    funcServiceStats = new FunctionServiceStats(system, "FunctionExecution");
+    cachePerfStats = new CachePerfStats(system.getStatisticsFactory());
+    funcServiceStats = new FunctionServiceStats(system.getStatisticsFactory(), "FunctionExecution");
     long statId = OSProcess.getId();
-    distributionStats = new DistributionStats(system, statId);
+    distributionStats = new DistributionStats(system.getStatisticsFactory(), statId);
     DistributionStats.enableClockStats = true;
-    dlockStats = new DLockStats(system, statId);
+    dlockStats = new DLockStats(system.getStatisticsFactory(), statId);
 
     bridge = new MemberMBeanBridge();
     bridge.addCacheStats(cachePerfStats);
@@ -87,13 +87,13 @@ public class MemberLevelStatsJUnitTest extends MBeanStatsTestCase {
     bridge.addVMStats();
 
     for (int i = 0; i < 4; i++) {
-      DiskStoreStats stats = new DiskStoreStats(system, name.getMethodName() + i);
+      DiskStoreStats stats = new DiskStoreStats(system.getStatisticsFactory(), name.getMethodName() + i);
       diskStatsList.add(stats);
       bridge.addDiskStoreStats(stats);
     }
 
     for (int i = 0; i < 4; i++) {
-      PartitionedRegionStats stats = new PartitionedRegionStats(system, name.getMethodName() + i);
+      PartitionedRegionStats stats = new PartitionedRegionStats(system.getStatisticsFactory(), name.getMethodName() + i);
       parRegionStatsList.add(stats);
       bridge.addPartionRegionStats(stats);
     }
diff --git a/geode-core/src/test/java/org/apache/geode/management/bean/stats/RegionStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/bean/stats/RegionStatsJUnitTest.java
index 8bc6a2e..be23ca8 100644
--- a/geode-core/src/test/java/org/apache/geode/management/bean/stats/RegionStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/bean/stats/RegionStatsJUnitTest.java
@@ -49,9 +49,9 @@ public class RegionStatsJUnitTest extends MBeanStatsTestCase {
   private DiskRegionStats diskRegionStats;
 
   protected void init() {
-    cachePerfStats = new CachePerfStats(system);
-    partitionedRegionStats = new PartitionedRegionStats(system, "/tests");
-    diskRegionStats = new DiskRegionStats(system, "test-disk");
+    cachePerfStats = new CachePerfStats(system.getStatisticsFactory());
+    partitionedRegionStats = new PartitionedRegionStats(system.getStatisticsFactory(), "/tests");
+    diskRegionStats = new DiskRegionStats(system.getStatisticsFactory(), "test-disk");
 
     bridge = new RegionMBeanBridge(cachePerfStats);
     parBridge = new PartitionedRegionBridge(partitionedRegionStats);
diff --git a/geode-core/src/test/java/org/apache/geode/management/bean/stats/StatsRateJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/bean/stats/StatsRateJUnitTest.java
index 6837090..f28e2fe 100644
--- a/geode-core/src/test/java/org/apache/geode/management/bean/stats/StatsRateJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/bean/stats/StatsRateJUnitTest.java
@@ -20,7 +20,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.management.internal.beans.stats.MBeanStatsMonitor;
 import org.apache.geode.management.internal.beans.stats.StatType;
 import org.apache.geode.management.internal.beans.stats.StatsRate;
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementAdapterTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementAdapterTest.java
index c44473c..5d006f1 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementAdapterTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementAdapterTest.java
@@ -56,7 +56,7 @@ public class ManagementAdapterTest {
   @Before
   public void before() {
     cache = serverRule.getCache();
-    doReturn(new DiskStoreStats(cache.getInternalDistributedSystem(), "disk-stats")).when(diskStore)
+    doReturn(new DiskStoreStats(cache.getInternalDistributedSystem().getStatisticsFactory(), "disk-stats")).when(diskStore)
         .getStats();
     doReturn(new File[] {}).when(diskStore).getDiskDirs();
   }
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitorTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitorTest.java
index c507681..63bfb7a 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/beans/stats/MBeanStatsMonitorTest.java
@@ -35,9 +35,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.mockito.Spy;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.i18n.LogWriterI18n;
 import org.apache.geode.internal.statistics.FakeValueMonitor;
 import org.apache.geode.internal.statistics.ValueMonitor;
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
index 334eb2b..88961f5 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -260,7 +260,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
   }
 
   public final InternalDistributedSystem basicGetSystem() {
-    return system;
+    return system ;
   }
 
   public final void nullSystem() { // TODO: delete
diff --git a/geode-core/src/test/java/org/apache/geode/test/fake/Fakes.java b/geode-core/src/test/java/org/apache/geode/test/fake/Fakes.java
index 95dea38..f9774c5 100644
--- a/geode-core/src/test/java/org/apache/geode/test/fake/Fakes.java
+++ b/geode-core/src/test/java/org/apache/geode/test/fake/Fakes.java
@@ -25,7 +25,7 @@ import java.util.Map;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.LogWriter;
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.DataPolicy;
 import org.apache.geode.cache.Region;
@@ -101,8 +101,8 @@ public class Fakes {
     when(system.getClock()).thenReturn(clock);
     when(system.getLogWriter()).thenReturn(logger);
     when(system.getSecurityService()).thenReturn(mock(SecurityService.class));
-    when(system.createAtomicStatistics(any(), any(), anyLong())).thenReturn(stats);
-    when(system.createAtomicStatistics(any(), any())).thenReturn(stats);
+    when(system.getInternalDistributedSystemStats().createAtomicStatistics(any(), any(), anyLong())).thenReturn(stats);
+    when(system.getInternalDistributedSystemStats().createAtomicStatistics(any(), any())).thenReturn(stats);
     when(system.getCache()).thenReturn(cache);
 
     when(distributionManager.getId()).thenReturn(member);
diff --git a/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqQueryImpl.java b/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqQueryImpl.java
index 6d8656d..0ec4846 100644
--- a/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqQueryImpl.java
+++ b/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqQueryImpl.java
@@ -20,7 +20,7 @@ import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.query.CqClosedException;
 import org.apache.geode.cache.query.CqEvent;
 import org.apache.geode.cache.query.CqException;
@@ -123,7 +123,7 @@ public abstract class CqQueryImpl implements InternalCqQuery {
 
   void updateCqCreateStats() {
     // Initialize the VSD statistics
-    StatisticsFactory factory = cqService.getCache().getDistributedSystem();
+    StatisticsFactory factory = cqService.getCache().getDistributedSystem().getStatisticsFactory();
     this.stats = new CqQueryVsdStats(factory, getServerCqName());
     this.cqStats = new CqStatisticsImpl(this);
 
diff --git a/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceImpl.java b/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceImpl.java
index 6aee8f5..cb8bf39 100644
--- a/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceImpl.java
+++ b/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceImpl.java
@@ -29,7 +29,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.InvalidDeltaException;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheEvent;
@@ -165,7 +165,7 @@ public class CqServiceImpl implements CqService {
     this.matchingCqMap = new ConcurrentHashMap<String, HashSet<String>>();
 
     // Initialize the VSD statistics
-    StatisticsFactory factory = this.cache.getDistributedSystem();
+    StatisticsFactory factory = this.cache.getDistributedSystem().getStatisticsFactory();
     this.stats = new CqServiceVsdStats(factory);
     this.cqServiceStats = new CqServiceStatisticsImpl(this);
   }
diff --git a/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceVsdStats.java b/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceVsdStats.java
index 1688de7..7ad907f 100644
--- a/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceVsdStats.java
+++ b/geode-cq/src/main/java/org/apache/geode/cache/query/internal/cq/CqServiceVsdStats.java
@@ -16,11 +16,11 @@ package org.apache.geode.cache.query.internal.cq;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.cache.query.CqException;
 import org.apache.geode.cache.query.CqQuery;
 import org.apache.geode.cache.query.internal.DefaultQueryService;
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
index 778b8fd..79b167b 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
@@ -58,7 +58,7 @@ public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl {
     this.waitingThreadPoolFromDM = cache.getDistributionManager().getWaitingThreadPool();
 
     final String statsName = indexName + "-" + regionPath;
-    this.fileSystemStats = new FileSystemStats(cache.getDistributedSystem(), statsName);
+    this.fileSystemStats = new FileSystemStats(cache.getDistributedSystem().getStatisticsFactory(), statsName);
   }
 
   protected RepositoryManager createRepositoryManager(LuceneSerializer luceneSerializer) {
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
index e58c21f..d8af095 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
@@ -61,7 +61,7 @@ public abstract class LuceneIndexImpl implements InternalLuceneIndex {
     this.cache = cache;
 
     final String statsName = indexName + "-" + regionPath;
-    this.indexStats = new LuceneIndexStats(cache.getDistributedSystem(), statsName);
+    this.indexStats = new LuceneIndexStats(cache.getDistributedSystem().getStatisticsFactory(), statsName);
   }
 
   @Override
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexStats.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexStats.java
index 368c063..79af1ba 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexStats.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexStats.java
@@ -18,11 +18,11 @@ import static org.apache.geode.distributed.internal.DistributionStats.getStatTim
 
 import java.util.function.IntSupplier;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.CopyOnWriteHashSet;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
index a5da4a0..6bb89f5 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
@@ -16,11 +16,11 @@ package org.apache.geode.cache.lucene.internal.filesystem;
 
 import java.util.function.LongSupplier;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
+import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class FileSystemStats {
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
index 2142528..ea60e05 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
@@ -29,9 +29,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.ArgumentCaptor;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.test.junit.categories.LuceneTest;
 import org.apache.geode.test.junit.categories.UnitTest;
 
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneServiceImplJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneServiceImplJUnitTest.java
index acc384c..462ba49 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneServiceImplJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneServiceImplJUnitTest.java
@@ -43,8 +43,8 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 import org.mockito.Mockito;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.cache.DataPolicy;
 import org.apache.geode.cache.EvictionAlgorithm;
 import org.apache.geode.cache.EvictionAttributes;
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
index b134fa0..e3a20e5 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
@@ -26,9 +26,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.ArgumentCaptor;
 
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.test.junit.categories.LuceneTest;
 import org.apache.geode.test.junit.categories.UnitTest;
 
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
index 4d26459..aae413a 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
@@ -113,9 +113,9 @@ public class IndexRepositoryImplPerformanceTest {
             cache.createRegionFactory(RegionShortcut.REPLICATE).create("files");
 
         RegionDirectory dir = new RegionDirectory(fileAndChunkRegion,
-            new FileSystemStats(cache.getDistributedSystem(), "region-index"));
+            new FileSystemStats(cache.getDistributedSystem().getStatisticsFactory(), "region-index"));
         final LuceneIndexStats stats =
-            new LuceneIndexStats(cache.getDistributedSystem(), "region-index");
+            new LuceneIndexStats(cache.getDistributedSystem().getStatisticsFactory(), "region-index");
 
 
         IndexWriterConfig config = new IndexWriterConfig(analyzer);
@@ -226,7 +226,7 @@ public class IndexRepositoryImplPerformanceTest {
       @Override
       public void init() throws Exception {
         cache = new CacheFactory().set(MCAST_PORT, "0").set(LOG_LEVEL, "warning").create();
-        final FileSystemStats stats = new FileSystemStats(cache.getDistributedSystem(), "stats");
+        final FileSystemStats stats = new FileSystemStats(cache.getDistributedSystem().getStatisticsFactory(), "stats");
         RegionDirectory dir = new RegionDirectory(new ConcurrentHashMap(), stats);
         IndexWriterConfig config = new IndexWriterConfig(analyzer);
         writer = new IndexWriter(dir, config);
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
index 215f1ae..dc8a45e 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
@@ -14,10 +14,10 @@
  */
 package org.apache.geode.internal.protocol.protobuf.statistics;
 
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsFactory;
-import org.apache.geode.StatisticsType;
+import org.apache.geode.statistics.StatisticDescriptor;
+import org.apache.geode.statistics.Statistics;
+import org.apache.geode.statistics.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsType;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 
 public class ProtobufClientStatistics implements ClientStatistics {
@@ -37,7 +37,7 @@ public class ProtobufClientStatistics implements ClientStatistics {
 
   public ProtobufClientStatistics(StatisticsFactory statisticsFactory, String statisticsName) {
     if (statisticsFactory == null) {
-      statisticsFactory = InternalDistributedSystem.getAnyInstance();
+      statisticsFactory = InternalDistributedSystem.getAnyInstance().getStatisticsFactory();
     }
     StatisticDescriptor[] serverStatDescriptors = new StatisticDescriptor[] {
         statisticsFactory.createIntGauge("currentClientConnections",
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufProtocolService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufProtocolService.java
index abdcf32..cbb54be 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufProtocolService.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufProtocolService.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.protocol.protobuf.v1;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.statistics.StatisticsFactory;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/AuthenticationIntegrationTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/AuthenticationIntegrationTest.java
index a190c98..7bc3672 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/AuthenticationIntegrationTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/AuthenticationIntegrationTest.java
@@ -34,7 +34,7 @@ import org.junit.Test;
 import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.server.CacheServer;
@@ -251,8 +251,8 @@ public class AuthenticationIntegrationTest {
         parseSimpleHandshakeResponseFromInput();
     assertFalse(authenticationResponse.getAuthenticated());
 
-    Statistics[] stats = cache.getDistributedSystem()
-        .findStatisticsByType(cache.getDistributedSystem().findType(PROTOBUF_CLIENT_STATISTICS));
+    Statistics[] stats = cache.getDistributedSystem().getStatisticsFactory()
+        .findStatisticsByType(cache.getDistributedSystem().getStatisticsFactory().findType(PROTOBUF_CLIENT_STATISTICS));
     assertEquals(1, stats[0].getLong("authenticationFailures"));
     verifyConnectionClosed();
   }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/CacheConnectionJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/CacheConnectionJUnitTest.java
index 20d02d0..e99bf54 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/CacheConnectionJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/CacheConnectionJUnitTest.java
@@ -48,7 +48,7 @@ import org.junit.rules.TestName;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.RegionFactory;
@@ -171,8 +171,8 @@ public class CacheConnectionJUnitTest {
 
     InternalDistributedSystem distributedSystem =
         (InternalDistributedSystem) cache.getDistributedSystem();
-    Statistics[] protobufStats = distributedSystem.findStatisticsByType(
-        distributedSystem.findType(ProtobufClientStatistics.PROTOBUF_CLIENT_STATISTICS));
+    Statistics[] protobufStats = distributedSystem.getStatisticsFactory().findStatisticsByType(
+        distributedSystem.getStatisticsFactory().findType(ProtobufClientStatistics.PROTOBUF_CLIENT_STATISTICS));
     assertEquals(1, protobufStats.length);
     Statistics statistics = protobufStats[0];
     assertEquals(1, statistics.get("currentClientConnections"));
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
index d4e33e0..a462794 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.Statistics;
+import org.apache.geode.statistics.Statistics;
 import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.distributed.ConfigurationProperties;
 import org.apache.geode.distributed.Locator;
@@ -156,8 +156,8 @@ public class LocatorConnectionDUnitTest extends JUnit4CacheTestCase {
     InternalDistributedSystem distributedSystem =
         (InternalDistributedSystem) Locator.getLocator().getDistributedSystem();
 
-    Statistics[] protobufServerStats = distributedSystem.findStatisticsByType(
-        distributedSystem.findType(ProtobufClientStatistics.PROTOBUF_CLIENT_STATISTICS));
+    Statistics[] protobufServerStats = distributedSystem.getStatisticsFactory().findStatisticsByType(
+        distributedSystem.getStatisticsFactory().findType(ProtobufClientStatistics.PROTOBUF_CLIENT_STATISTICS));
     assertEquals(1, protobufServerStats.length);
     return protobufServerStats[0];
   }