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/24 00:20:56 UTC

[geode] branch feature/Micrometer updated (262fe63 -> 61325f8)

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

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


 discard 262fe63  WIP: CachePerfStats
 discard 5c47ec0  WIP: FunctionStats.kt completed, DistributionStats.kt
 discard 73656b9  WIP: Completed ConnectionsStats, ClientSendStats.kt, ClientStats.kt. Still some failures due to FunctionStats not yet implemented
 discard ac76b2b  WIP: Moving current stats to Micrometer format
     new 61325f8  WIP: Using original Stats Interfaces

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (262fe63)
            \
             N -- N -- N   refs/heads/feature/Micrometer (61325f8)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../internal/common/AbstractSessionCache.java      |    5 +-
 .../session/catalina/AbstractSessionCache.java     |    5 +-
 .../catalina/internal/DeltaSessionStatistics.java  |   26 +-
 .../geode/modules/util/ModuleStatistics.java       |   24 +-
 .../geode/statistics/StatisticDescriptor.java      |   72 +
 .../org/apache/geode/statistics/Statistics.java    |  615 ++++++++
 .../apache/geode/statistics/StatisticsFactory.java |  161 ++
 .../apache/geode/statistics/StatisticsType.java    |   61 +
 .../geode/statistics/StatisticsTypeFactory.java    |  209 +++
 geode-core/build.gradle                            |    2 +-
 .../admin/internal/MemberHealthEvaluator.java      |    4 +-
 .../asyncqueue/internal/AsyncEventQueueImpl.java   |    5 +
 .../asyncqueue/internal/AsyncEventQueueStats.java  |  161 ++
 .../internal/ParallelAsyncEventQueueImpl.java      |    5 +-
 .../internal/SerialAsyncEventQueueImpl.java        |    5 +-
 .../internal/{operations => }/AbstractOp.java      |   41 +-
 .../internal/{operations => }/AddPDXEnumOp.java    |    5 +-
 .../internal/{operations => }/AddPDXTypeOp.java    |    5 +-
 .../{operations => }/AuthenticateUserOp.java       |   50 +-
 .../client/internal/{operations => }/ClearOp.java  |   10 +-
 .../client/internal/ClientMetadataService.java     |    3 -
 .../{operations => }/CloseConnectionOp.java        |   11 +-
 .../client/internal/{operations => }/CommitOp.java |    6 +-
 .../geode/cache/client/internal/Connection.java    |    5 -
 .../client/internal/ConnectionFactoryImpl.java     |    1 -
 .../cache/client/internal/ConnectionImpl.java      |   18 +-
 .../cache/client/internal/ConnectionStats.java     | 1545 ++++++++++----------
 .../internal/{operations => }/ContainsKeyOp.java   |    5 +-
 .../internal/DataSerializerRecoveryListener.java   |    1 -
 .../internal/{operations => }/DestroyOp.java       |   14 +-
 .../internal/{operations => }/DestroyRegionOp.java |   10 +-
 .../geode/cache/client/internal/Endpoint.java      |    1 -
 .../cache/client/internal/EndpointManagerImpl.java |   38 +-
 .../{operations => }/ExecuteFunctionNoAckOp.java   |    8 +-
 .../{operations => }/ExecuteFunctionOp.java        |   32 +-
 .../ExecuteRegionFunctionNoAckOp.java              |    8 +-
 .../{operations => }/ExecuteRegionFunctionOp.java  |   14 +-
 .../ExecuteRegionFunctionSingleHopOp.java          |   17 +-
 .../client/internal/{operations => }/GetAllOp.java |   11 +-
 .../{operations => }/GetClientPRMetaDataOp.java    |   10 +-
 .../GetClientPartitionAttributesOp.java            |    7 +-
 .../internal/{operations => }/GetEntryOp.java      |    5 +-
 .../internal/{operations => }/GetEventValueOp.java |    6 +-
 .../{operations => }/GetFunctionAttributeOp.java   |    5 +-
 .../client/internal/{operations => }/GetOp.java    |   10 +-
 .../{operations => }/GetPDXEnumByIdOp.java         |    5 +-
 .../internal/{operations => }/GetPDXEnumsOp.java   |    5 +-
 .../{operations => }/GetPDXIdForEnumOp.java        |    5 +-
 .../{operations => }/GetPDXIdForTypeOp.java        |    5 +-
 .../{operations => }/GetPDXTypeByIdOp.java         |    5 +-
 .../internal/{operations => }/GetPDXTypesOp.java   |    5 +-
 .../internal/InstantiatorRecoveryListener.java     |    1 -
 .../internal/{operations => }/InvalidateOp.java    |    6 +-
 .../client/internal/{operations => }/KeySetOp.java |    5 +-
 .../cache/client/internal/LiveServerPinger.java    |    1 -
 .../internal/{operations => }/MakePrimaryOp.java   |    6 +-
 .../cache/client/internal/OpExecutorImpl.java      |    8 +-
 .../client/internal/{operations => }/PingOp.java   |   10 +-
 .../geode/cache/client/internal/PoolImpl.java      |   21 +-
 .../internal/{operations => }/PrimaryAckOp.java    |    6 +-
 .../geode/cache/client/internal/ProxyCache.java    |    1 -
 .../{operations => }/ProxyCacheCloseOp.java        |    8 +-
 .../client/internal/{operations => }/PutAllOp.java |   11 +-
 .../client/internal/{operations => }/PutOp.java    |   18 +-
 .../client/internal/{operations => }/QueryOp.java  |    7 +-
 .../cache/client/internal/QueueConnectionImpl.java |   11 -
 .../cache/client/internal/QueueManagerImpl.java    |    2 -
 .../cache/client/internal/QueueStateImpl.java      |    1 -
 .../{operations => }/ReadyForEventsOp.java         |    7 +-
 .../RegisterDataSerializersOp.java                 |    8 +-
 .../{operations => }/RegisterInstantiatorsOp.java  |    6 +-
 .../{operations => }/RegisterInterestListOp.java   |   14 +-
 .../{operations => }/RegisterInterestOp.java       |   14 +-
 .../client/internal/RegisterInterestTracker.java   |    1 -
 .../internal/{operations => }/RemoveAllOp.java     |   11 +-
 .../internal/{operations => }/RollbackOp.java      |    6 +-
 .../geode/cache/client/internal/ServerProxy.java   |    2 -
 .../cache/client/internal/ServerRegionProxy.java   |   26 +-
 .../{operations => }/SingleHopClientExecutor.java  |    6 +-
 .../internal/SingleHopOperationCallable.java       |    5 +-
 .../client/internal/{operations => }/SizeOp.java   |    6 +-
 .../internal/{operations => }/TXFailoverOp.java    |    6 +-
 .../{operations => }/TXSynchronizationOp.java      |    8 +-
 .../{operations => }/UnregisterInterestListOp.java |    7 +-
 .../{operations => }/UnregisterInterestOp.java     |    7 +-
 .../client/internal/pooling/PooledConnection.java  |    2 +-
 .../cache/operations/internal/UpdateOnlyMap.java   |    1 +
 .../cache/query/internal/CqQueryVsdStats.java      |   47 +-
 .../cache/query/internal/cq/InternalCqQuery.java   |    2 +-
 .../query/internal/index/AbstractMapIndex.java     |    3 +-
 .../query/internal/index/CompactRangeIndex.java    |    3 +-
 .../cache/query/internal/index/HashIndex.java      |    3 +-
 .../cache/query/internal/index/IndexStats.java     |   57 +-
 .../query/internal/index/PartitionedIndex.java     |    3 +-
 .../cache/query/internal/index/RangeIndex.java     |    3 +-
 .../geode/distributed/DistributedSystem.java       |   16 +-
 .../internal/AbstractDistributionConfig.java       |  161 +-
 .../internal/ClusterDistributionManager.java       |  502 ++++---
 .../apache/geode/distributed/internal/DMStats.java |  701 +++++++++
 .../distributed/internal/DistributionConfig.java   |  161 +-
 .../distributed/internal/DistributionManager.java  |    1 -
 .../distributed/internal/DistributionStats.java    |  758 +++++-----
 .../internal/InternalDistributedSystem.java        |   56 +-
 .../distributed/internal/InternalLocator.java      |    6 +-
 .../geode/distributed/internal/LocatorStats.java   |   45 +-
 .../internal/LonerDistributionManager.java         |  694 ++++++++-
 .../geode/distributed/internal/PoolStatHelper.java |    1 -
 .../distributed/internal/QueueStatHelper.java      |    0
 .../internal/RuntimeDistributionConfigImpl.java    |    2 +-
 .../internal/ThrottledMemQueueStatHelper.java      |    0
 .../internal/ThrottledQueueStatHelper.java         |    0
 .../distributed/internal/direct/DirectChannel.java |    2 +-
 .../distributed/internal/locks/DLockService.java   |    5 +-
 .../distributed/internal/locks/DLockStats.java     |  294 ++--
 .../internal/locks/DistributedLockStats.java       |    0
 .../internal/locks/DummyDLockStats.java            |    0
 .../internal/membership/MemberFactory.java         |    2 +-
 .../internal/membership/MemberServices.java        |    2 +-
 .../internal/membership/MembershipManager.java     |    2 +-
 .../internal/membership/gms/GMSMemberFactory.java  |    2 +-
 .../internal/membership/gms/Services.java          |    2 +-
 .../membership/gms/fd/GMSHealthMonitor.java        |    2 +-
 .../membership/gms/messenger/JGroupsMessenger.java |    2 +-
 .../membership/gms/messenger/StatRecorder.java     |    2 +-
 .../membership/gms/mgr/GMSMembershipManager.java   |    2 +-
 .../geode/internal/InternalDataSerializer.java     |    2 +-
 .../geode/internal/admin/ClientStatsManager.java   |   12 +-
 .../geode/internal/admin/StatAlertDefinition.java  |    2 +-
 .../geode/internal/admin/StatAlertsManager.java    |    9 +-
 .../admin/remote/AddStatListenerResponse.java      |    2 +-
 .../remote/AdminConsoleDisconnectMessage.java      |    2 +-
 .../admin/remote/CancelStatListenerResponse.java   |    2 +-
 .../remote/FetchResourceAttributesResponse.java    |    5 +-
 .../internal/admin/remote/FetchStatsResponse.java  |    2 +
 .../geode/internal/admin/remote/RemoteStat.java    |    4 +-
 .../internal/admin/remote/RemoteStatResource.java  |    2 +-
 .../admin/statalerts/BaseDecoratorImpl.java        |    2 +-
 .../admin/statalerts/DummyStatisticInfoImpl.java   |    2 +-
 .../admin/statalerts/FunctionDecoratorImpl.java    |    2 +-
 .../statalerts/GaugeThresholdDecoratorImpl.java    |    2 +-
 .../admin/statalerts/MultiAttrDefinitionImpl.java  |    4 +-
 .../statalerts/NumberThresholdDecoratorImpl.java   |    2 +-
 .../admin/statalerts/SingleAttrDefinitionImpl.java |    4 +-
 .../admin/statalerts/StatisticInfoImpl.java        |    2 +-
 .../geode/internal/cache/AbstractDiskRegion.java   |    2 +-
 .../geode/internal/cache/AbstractRegion.java       |    2 +-
 .../geode/internal/cache/CachePerfStats.java       |  865 ++++++-----
 .../geode/internal/cache/DiskDirectoryStats.java   |   39 +-
 .../geode/internal/cache/DiskRegionStats.java      |   71 +-
 .../apache/geode/internal/cache/DiskStoreImpl.java |    2 +-
 .../geode/internal/cache/DiskStoreStats.java       |  195 ++-
 .../geode/internal/cache/DummyCachePerfStats.java  |    2 +-
 .../geode/internal/cache/EvictableRegion.java      |    2 +-
 .../geode/internal/cache/InternalRegion.java       |    2 +-
 .../apache/geode/internal/cache/LocalRegion.java   |    5 +-
 .../cache/OfflineCompactionDiskRegion.java         |    3 +-
 .../geode/internal/cache/PartitionedRegion.java    |    5 +-
 .../internal/cache/PartitionedRegionHelper.java    |    3 +-
 .../internal/cache/PartitionedRegionStats.java     |  386 ++---
 .../geode/internal/cache/PoolManagerImpl.java      |    4 +-
 .../org/apache/geode/internal/cache/PoolStats.java |  145 +-
 .../geode/internal/cache/ValidatingDiskRegion.java |   21 +-
 .../client/protocol/ClientProtocolService.java     |    2 +-
 .../internal/cache/control/HeapMemoryMonitor.java  |   10 +-
 .../cache/control/ResourceManagerStats.java        |  186 ++-
 .../cache/eviction/AbstractEvictionController.java |    2 +-
 .../cache/eviction/CountLRUStatistics.java         |   37 +-
 .../internal/cache/eviction/HeapLRUStatistics.java |   36 +-
 .../cache/eviction/MemoryLRUStatistics.java        |   37 +-
 .../internal/cache/execute/AbstractExecution.java  |    7 +-
 .../cache/execute/FunctionServiceStats.java        |   59 +-
 .../internal/cache/execute/FunctionStats.java      |  169 +--
 .../cache/execute/ServerFunctionExecutor.java      |   15 +-
 .../execute/ServerRegionFunctionExecutor.java      |   34 +-
 .../ServerToClientFunctionResultSender.java        |    1 -
 .../ServerToClientFunctionResultSender65.java      |    1 -
 .../geode/internal/cache/ha/HARegionQueue.java     |    2 +-
 .../internal/cache/ha/HARegionQueueStats.java      |   56 +-
 .../cache/tier/sockets/CacheClientNotifier.java    |    4 +-
 .../tier/sockets/CacheClientNotifierStats.java     |   63 +-
 .../cache/tier/sockets/CacheClientProxy.java       |    2 +-
 .../cache/tier/sockets/CacheClientProxyStats.java  |   61 +-
 .../cache/tier/sockets/CacheClientUpdater.java     |   91 +-
 .../cache/tier/sockets/CacheServerStats.java       |    9 +-
 .../geode/internal/cache/tier/sockets/Message.java |    3 +-
 .../internal/cache/tier/sockets/MessageStats.java  |    0
 .../cache/tier/sockets/ServerConnection.java       |    2 +-
 .../tier/sockets/ServerConnectionFactory.java      |    5 +-
 .../cache/tier/sockets/command/ContainsKey66.java  |    2 +-
 .../cache/tier/sockets/command/Destroy70.java      |    2 +-
 .../tier/sockets/command/ExecuteFunction70.java    |    2 +-
 .../internal/cache/tier/sockets/command/Get70.java |    2 +-
 .../GetClientPartitionAttributesCommand.java       |    2 +-
 .../GetClientPartitionAttributesCommand66.java     |    2 +-
 .../cache/tier/sockets/command/Invalidate70.java   |    4 +-
 .../internal/cache/tier/sockets/command/Put70.java |    2 +-
 .../cache/tier/sockets/command/PutAll80.java       |    2 +-
 .../cache/tier/sockets/command/RemoveAll.java      |    2 +-
 .../sockets/command/TXSynchronizationCommand.java  |    2 +-
 .../internal/cache/versions/RVVExceptionT.java     |    1 +
 .../internal/cache/wan/AbstractGatewaySender.java  |    6 +-
 .../internal/cache/wan/GatewayReceiverStats.java   |   10 +-
 .../internal/cache/wan/GatewaySenderStats.java     |  100 +-
 .../apache/geode/internal/concurrent/Atomics.java  |    4 +-
 .../geode/internal/offheap/FreeListManager.java    |   30 +-
 .../geode/internal/offheap/MemoryAllocator.java    |    4 +-
 .../internal/offheap/MemoryAllocatorImpl.java      |   37 +-
 .../geode/internal/offheap/OffHeapMemoryStats.java |   63 +-
 .../geode/internal/offheap/OffHeapStorage.java     |  333 ++++-
 .../statistics/AbstractStatisticsFactory.java      |   86 +-
 .../geode/internal/statistics/ArchiveSplitter.java |    0
 .../geode/internal/statistics/CallbackSampler.java |    2 +-
 .../geode/internal/statistics/CounterMonitor.java  |    0
 .../statistics/DummyStatisticsFactory.java         |   37 +-
 .../internal/statistics/DummyStatisticsImpl.java   |    0
 .../geode/internal/statistics/GaugeMonitor.java    |    0
 .../internal/statistics/GemFireStatSampler.java    |  101 +-
 .../geode/internal/statistics/HostStatHelper.java  |   28 +-
 .../geode/internal/statistics/HostStatSampler.java |    2 +-
 .../statistics/IgnoreResourceException.java        |    0
 .../statistics/InternalDistributedSystemStats.java |  129 +-
 .../internal/statistics/LocalStatListener.java     |    0
 .../statistics/LocalStatisticsFactory.java         |    8 +-
 .../internal/statistics/LocalStatisticsImpl.java   |    2 +-
 .../statistics/MapBasedStatisticsNotification.java |    0
 .../internal/statistics/ResourceInstance.java      |    0
 .../geode/internal/statistics/ResourceType.java    |    0
 .../geode/internal/statistics/SampleCollector.java |    7 +-
 .../geode/internal/statistics/SampleHandler.java   |    0
 .../internal/statistics/SimpleStatSampler.java     |    0
 .../internal/statistics/SimpleStatisticId.java     |    0
 .../internal/statistics/StatArchiveDescriptor.java |    0
 .../internal/statistics/StatArchiveFormat.java     |    0
 .../internal/statistics/StatArchiveHandler.java    |    0
 .../statistics/StatArchiveHandlerConfig.java       |    0
 .../internal/statistics/StatArchiveReader.java     |    0
 .../internal/statistics/StatArchiveWriter.java     |    2 +-
 .../internal/statistics/StatMonitorHandler.java    |    0
 .../internal/statistics/StatSamplerStats.java      |   45 +-
 .../statistics/StatisticDescriptorImpl.java        |   26 +-
 .../geode/internal/statistics/StatisticId.java     |    0
 .../statistics/StatisticNotFoundException.java     |    0
 .../geode/internal/statistics/StatisticsImpl.java  |    7 +-
 .../internal/statistics/StatisticsListener.java    |    0
 .../internal/statistics/StatisticsManager.java     |    0
 .../internal/statistics/StatisticsMonitor.java     |    0
 .../statistics/StatisticsNotification.java         |    0
 .../internal/statistics/StatisticsSampler.java     |    0
 .../statistics/StatisticsTypeFactoryImpl.java      |   29 +-
 .../internal/statistics/StatisticsTypeImpl.java    |    2 +-
 .../internal/statistics/StatisticsTypeXml.java     |    7 +-
 .../apache/geode/internal/statistics/VMStats.java  |   31 +-
 .../geode/internal/statistics/VMStatsContract.java |    0
 .../statistics/VMStatsContractFactory.java         |    2 +-
 .../geode/internal/statistics/ValueMonitor.java    |    2 +-
 .../apache/geode/internal/statistics/package.html  |    0
 .../statistics/platform/LinuxProcFsStatistics.java |    2 -
 .../statistics/platform/LinuxProcessStats.java     |   33 +-
 .../statistics/platform/LinuxSystemStats.java      |  122 +-
 .../statistics/platform/OSXProcessStats.java       |   43 +-
 .../statistics/platform/OSXSystemStats.java        |   53 +
 .../statistics/platform/OsStatisticsFactory.java   |    2 +-
 .../internal/statistics/platform/ProcessStats.java |    0
 .../statistics/platform/SolarisProcessStats.java   |   80 +-
 .../statistics/platform/SolarisSystemStats.java    |  174 +--
 .../statistics/platform/WindowsProcessStats.java   |   57 +-
 .../statistics/platform/WindowsSystemStats.java    |  100 +-
 .../internal/stats50/Atomic50StatisticsImpl.java   |  515 +++++++
 .../apache/geode/internal/stats50/VMStats50.java   |  690 +++++++++
 .../org/apache/geode/internal/tcp/Buffers.java     |    2 +-
 .../org/apache/geode/internal/tcp/Connection.java  |    2 +-
 .../geode/internal/tcp/DirectReplySender.java      |    2 +-
 .../apache/geode/internal/tcp/MsgDestreamer.java   |    2 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |    2 +-
 .../org/apache/geode/internal/tcp/MsgStreamer.java |    2 +-
 .../org/apache/geode/internal/tcp/TCPConduit.java  |    2 +-
 .../geode/internal/tcp/VersionedMsgStreamer.java   |    2 +-
 .../org/apache/geode/internal/util/BlobHelper.java |    2 +-
 .../management/internal/FederatingManager.java     |   10 +-
 .../geode/management/internal/LocalManager.java    |    3 +-
 .../internal/beans/AsyncEventQueueMBeanBridge.java |    2 +-
 .../internal/beans/GatewaySenderMBeanBridge.java   |    2 +-
 .../internal/beans/MemberMBeanBridge.java          |   55 +-
 .../internal/beans/RegionMBeanBridge.java          |    2 +-
 .../beans/stats/AggregateRegionStatsMonitor.java   |    4 +-
 .../internal/beans/stats/GCStatsMonitor.java       |    2 +-
 .../beans/stats/GatewaySenderOverflowMonitor.java  |    4 +-
 .../internal/beans/stats/MBeanStatsMonitor.java    |    6 +-
 .../beans/stats/MemberLevelDiskMonitor.java        |    4 +-
 .../internal/beans/stats/VMStatsMonitor.java       |    2 +-
 .../geode/pdx/internal/ClientTypeRegistration.java |   16 +-
 .../apache/geode/pdx/internal/PdxInstanceImpl.java |    2 +-
 .../internal/MemberHealthEvaluatorJUnitTest.java   |    2 +-
 .../client/internal/QueueManagerJUnitTest.java     |    3 +-
 .../pooling/ConnectionManagerJUnitTest.java        |    6 +-
 .../management/MemoryThresholdsDUnitTest.java      |    2 +-
 .../geode/cache30/ClientMembershipDUnitTest.java   |    4 +-
 .../geode/cache30/MultiVMRegionTestCase.java       |    2 +-
 .../org/apache/geode/cache30/ProxyDUnitTest.java   |    2 +-
 .../org/apache/geode/cache30/SlowRecDUnitTest.java |    2 +-
 .../internal/membership/MembershipJUnitTest.java   |    2 +-
 .../gms/fd/GMSHealthMonitorJUnitTest.java          |    3 +-
 .../gms/locator/GMSLocatorRecoveryJUnitTest.java   |    2 +-
 .../gms/messenger/JGroupsMessengerJUnitTest.java   |    3 +-
 .../gms/mgr/GMSMembershipManagerJUnitTest.java     |    2 +-
 .../internal/cache/ComplexDiskRegionJUnitTest.java |    2 +-
 .../internal/cache/DiskInitFileJUnitTest.java      |    2 +-
 .../internal/cache/GIIFlowControlDUnitTest.java    |    2 +-
 .../geode/internal/cache/OplogJUnitTest.java       |    2 +-
 .../geode/internal/cache/OplogRVVJUnitTest.java    |    2 +-
 .../cache/PartitionedRegionStatsDUnitTest.java     |    2 +-
 .../cache/PartitionedRegionStatsJUnitTest.java     |    2 +-
 .../cache/entries/AbstractRegionEntryTest.java     |    4 +-
 .../execute/FunctionServiceStatsDUnitTest.java     |   30 +-
 .../CacheServerMaxConnectionsJUnitTest.java        |    4 +-
 .../ClientHealthMonitorIntegrationTest.java        |    7 +-
 .../internal/offheap/FreeListManagerTest.java      |    3 +-
 .../offheap/LifecycleListenerJUnitTest.java        |    3 +-
 .../internal/offheap/MemoryBlockNodeJUnitTest.java |    5 +-
 .../internal/offheap/NullOffHeapMemoryStats.java   |    5 +-
 .../internal/offheap/OffHeapHelperJUnitTest.java   |    3 +-
 .../offheap/OffHeapRegionEntryHelperJUnitTest.java |    3 +-
 .../internal/offheap/OffHeapStorageJUnitTest.java  |    5 +-
 .../offheap/OffHeapStoredObjectJUnitTest.java      |    3 +-
 .../internal/offheap/TinyMemoryBlockJUnitTest.java |    5 +-
 .../statistics/DiskSpaceLimitIntegrationTest.java  |    6 +-
 ...DistributedSystemStatisticsIntegrationTest.java |    2 +-
 ...ributedSystemStatisticsTypeIntegrationTest.java |    2 +-
 .../statistics/FileSizeLimitIntegrationTest.java   |    4 +-
 .../GemFireStatSamplerIntegrationTest.java         |   10 +-
 .../internal/statistics/LinuxSystemStatsTest.java  |    2 +-
 .../internal/statistics/SampleCollectorTest.java   |    6 +-
 .../SimpleStatSamplerIntegrationTest.java          |    4 +-
 ...rchiveWithConsecutiveResourceInstGenerator.java |    4 +-
 .../StatArchiveWriterReaderIntegrationTest.java    |    4 +-
 .../statistics/StatSamplerIntegrationTest.java     |    4 +-
 .../internal/statistics/StatSamplerTestCase.java   |    4 +-
 .../StatTypesAreRolledOverRegressionTest.java      |    6 +-
 .../statistics/StatisticsDistributedTest.java      |   29 +-
 .../internal/statistics/TestStatisticsManager.java |    2 +-
 .../statistics/ValueMonitorIntegrationTest.java    |    6 +-
 .../internal/stats50/AtomicStatsJUnitTest.java     |    7 +-
 .../geode/internal/tcp/ConnectionTableTest.java    |    2 +-
 .../management/MemberMBeanAttributesDUnitTest.java |    2 +-
 .../bean/stats/AsyncEventQueueStatsJUnitTest.java  |    2 +-
 .../stats/DistributedSystemStatsJUnitTest.java     |    8 +-
 .../management/bean/stats/MBeanStatsTestCase.java  |    8 +-
 .../bean/stats/MemberLevelStatsJUnitTest.java      |    8 +-
 .../management/bean/stats/StatsRateJUnitTest.java  |    2 +-
 .../internal/beans/ManagementAdapterTest.java      |    5 +-
 .../beans/stats/MBeanStatsMonitorTest.java         |    6 +-
 .../dunit/internal/JUnit4DistributedTestCase.java  |    2 +-
 .../java/org/apache/geode/test/fake/Fakes.java     |    8 +-
 .../geode/cache/client/internal/CloseCQOp.java     |    1 -
 .../geode/cache/client/internal/CreateCQOp.java    |    1 -
 .../cache/client/internal/CreateCQWithIROp.java    |    3 +-
 .../cache/client/internal/GetDurableCQsOp.java     |    1 -
 .../geode/cache/client/internal/StopCQOp.java      |    1 -
 .../geode/cache/query/internal/cq/CqQueryImpl.java |    2 +-
 .../cache/query/internal/cq/CqServiceImpl.java     |    4 +-
 .../cache/query/internal/cq/CqServiceVsdStats.java |  165 ++-
 .../internal/LuceneIndexForPartitionedRegion.java  |    3 +-
 .../cache/lucene/internal/LuceneIndexImpl.java     |    3 +-
 .../cache/lucene/internal/LuceneIndexStats.java    |   80 +-
 .../internal/filesystem/FileSystemStats.java       |   48 +-
 .../internal/LuceneServiceImplJUnitTest.java       |    4 +-
 .../IndexRepositoryImplPerformanceTest.java        |    9 +-
 geode-micrometer-stats/build.gradle.kts            |    1 +
 .../statistics/InternalDistributedSystemStats.kt   |   16 -
 .../geode/statistics/cache/CachePerfStats.kt       |  780 ----------
 .../client/connection/ClientSendStats.kt           |  560 -------
 .../statistics/client/connection/ClientStats.kt    |  699 ---------
 .../client/connection/ConnectionStats.kt           |  631 --------
 .../statistics/client/connection/MessageStats.kt   |   22 -
 .../statistics/client/connection/PoolStats.kt      |  187 ---
 .../apache/geode/statistics/distributed/DMStats.kt |  219 ---
 .../statistics/distributed/DistributionStats.kt    | 1228 ----------------
 .../geode/statistics/distributed/PoolStatHelper.kt |   36 -
 .../statistics/distributed/QueueStatHelper.kt      |   41 -
 .../distributed/ThrottledMemQueueStatHelper.kt     |   52 -
 .../distributed/ThrottledQueueStatHelper.kt        |   38 -
 .../geode/statistics/function/FunctionStats.kt     |  118 --
 .../micrometer/MicrometerStatisticMeter.kt         |  199 ---
 .../{ => internal/micrometer}/StatisticsManager.kt |    2 +-
 .../{ => internal/micrometer}/StatisticsMeter.kt   |    6 +-
 .../micrometer}/StatisticsMeterGroup.kt            |    2 +-
 .../micrometer/{ => impl}/MicrometerMeterGroup.kt  |    6 +-
 .../micrometer/impl/MicrometerStatisticMeter.kt    |  213 +++
 .../{ => impl}/MicrometerStatisticsManager.kt      |    8 +-
 .../micrometer/MicrometerStatisticsFactoryImpl.kt  |   89 ++
 .../micrometer/MicrometerStatisticsImpl.kt         |  165 +++
 .../micrometer/MicrometerStatisticsType.kt         |   38 +
 .../offheap/MicrometerOffHeapStorageStats.kt       |   79 -
 .../geode/statistics/query/CqQueryVsdStats.kt      |  118 --
 .../geode/statistics/util/SimpleTimeUtils.kt       |    4 -
 .../statistics/ProtobufClientStatistics.java       |    2 +-
 .../protobuf/v1/ProtobufProtocolService.java       |    2 +-
 .../protobuf/v1/AuthenticationIntegrationTest.java |    5 +-
 .../v1/acceptance/CacheConnectionJUnitTest.java    |    5 +-
 .../v1/acceptance/LocatorConnectionDUnitTest.java  |    8 +-
 .../util/AutoBalancerIntegrationJUnitTest.java     |    2 +-
 geode-stats/build.gradle                           |   16 -
 .../asyncqueue/internal/AsyncEventQueueStats.java  |  176 ---
 .../geode/distributed/internal/DummyDMStats.java   |  697 ---------
 .../internal/cache/tier/sockets/CCUStats.java      |   82 --
 .../internal/offheap/OffHeapStorageStats.java      |  287 ----
 .../statistics/platform/OSXSystemStats.java        |  245 ----
 .../client/internal/GatewaySenderBatchOp.java      |    1 -
 settings.gradle                                    |   30 +-
 409 files changed, 9448 insertions(+), 11260 deletions(-)
 create mode 100644 geode-common/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/statistics/Statistics.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/statistics/StatisticsType.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueStats.java
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/AbstractOp.java (91%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/AddPDXEnumOp.java (91%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/AddPDXTypeOp.java (90%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/AuthenticateUserOp.java (84%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ClearOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/CloseConnectionOp.java (86%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/CommitOp.java (90%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/cache/client/internal/ConnectionStats.java (75%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ContainsKeyOp.java (92%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/DestroyOp.java (93%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/DestroyRegionOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ExecuteFunctionNoAckOp.java (96%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ExecuteFunctionOp.java (95%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ExecuteRegionFunctionNoAckOp.java (95%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ExecuteRegionFunctionOp.java (97%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ExecuteRegionFunctionSingleHopOp.java (95%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetAllOp.java (93%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetClientPRMetaDataOp.java (92%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetClientPartitionAttributesOp.java (94%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetEntryOp.java (90%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetEventValueOp.java (92%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetFunctionAttributeOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetOp.java (94%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetPDXEnumByIdOp.java (90%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetPDXEnumsOp.java (91%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetPDXIdForEnumOp.java (93%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetPDXIdForTypeOp.java (93%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetPDXTypeByIdOp.java (90%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/GetPDXTypesOp.java (91%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/InvalidateOp.java (93%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/KeySetOp.java (94%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/MakePrimaryOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/PingOp.java (85%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/PrimaryAckOp.java (90%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ProxyCacheCloseOp.java (90%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/PutAllOp.java (96%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/PutOp.java (95%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/QueryOp.java (96%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/ReadyForEventsOp.java (87%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/RegisterDataSerializersOp.java (92%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/RegisterInstantiatorsOp.java (95%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/RegisterInterestListOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/RegisterInterestOp.java (94%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/RemoveAllOp.java (95%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/RollbackOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/SingleHopClientExecutor.java (98%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/SizeOp.java (89%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/TXFailoverOp.java (88%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/TXSynchronizationOp.java (93%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/UnregisterInterestListOp.java (91%)
 rename geode-core/src/main/java/org/apache/geode/cache/client/internal/{operations => }/UnregisterInterestOp.java (91%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/cache/query/internal/CqQueryVsdStats.java (88%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/cache/query/internal/index/IndexStats.java (77%)
 create mode 100644 geode-core/src/main/java/org/apache/geode/distributed/internal/DMStats.java
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/DistributionStats.java (76%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/LocatorStats.java (83%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/PoolStatHelper.java (99%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/QueueStatHelper.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/ThrottledMemQueueStatHelper.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/ThrottledQueueStatHelper.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/locks/DLockStats.java (77%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/locks/DistributedLockStats.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/distributed/internal/locks/DummyDLockStats.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java (53%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/DiskDirectoryStats.java (74%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/DiskRegionStats.java (81%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/DiskStoreStats.java (76%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java (77%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/PoolStats.java (73%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/control/ResourceManagerStats.java (78%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/eviction/CountLRUStatistics.java (77%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/eviction/HeapLRUStatistics.java (78%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/eviction/MemoryLRUStatistics.java (77%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/execute/FunctionServiceStats.java (89%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/execute/FunctionStats.java (79%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueueStats.java (85%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifierStats.java (81%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyStats.java (87%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerStats.java (99%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageStats.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/wan/GatewayReceiverStats.java (97%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderStats.java (90%)
 rename geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/offheap/OffHeapStorageStats.kt => geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapMemoryStats.java (50%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java (76%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/ArchiveSplitter.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/CallbackSampler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/CounterMonitor.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsFactory.java (79%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/GaugeMonitor.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java (82%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java (87%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/IgnoreResourceException.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java (68%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/LocalStatListener.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsFactory.java (97%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/MapBasedStatisticsNotification.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/ResourceInstance.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/ResourceType.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java (99%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/SampleHandler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/SimpleStatSampler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatArchiveDescriptor.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatArchiveFormat.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatArchiveHandler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatArchiveHandlerConfig.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatMonitorHandler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatSamplerStats.java (82%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java (94%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticId.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticNotFoundException.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java (99%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsListener.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsManager.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsMonitor.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsNotification.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsSampler.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java (89%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeXml.java (99%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/VMStats.java (78%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/VMStatsContract.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/VMStatsContractFactory.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/ValueMonitor.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/package.html (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcFsStatistics.java (99%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java (82%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/LinuxSystemStats.java (78%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java (71%)
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/OsStatisticsFactory.java (97%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java (100%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java (76%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java (78%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java (89%)
 rename {geode-stats => geode-core}/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java (86%)
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/stats50/VMStats50.java
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/InternalDistributedSystemStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/cache/CachePerfStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/client/connection/ClientSendStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/client/connection/ClientStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/client/connection/ConnectionStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/client/connection/MessageStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/client/connection/PoolStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/distributed/DMStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/distributed/DistributionStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/distributed/PoolStatHelper.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/distributed/QueueStatHelper.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/distributed/ThrottledMemQueueStatHelper.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/distributed/ThrottledQueueStatHelper.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/function/FunctionStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/MicrometerStatisticMeter.kt
 rename geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/{ => internal/micrometer}/StatisticsManager.kt (65%)
 rename geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/{ => internal/micrometer}/StatisticsMeter.kt (79%)
 rename geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/{ => internal/micrometer}/StatisticsMeterGroup.kt (56%)
 rename geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/{ => impl}/MicrometerMeterGroup.kt (85%)
 create mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/impl/MicrometerStatisticMeter.kt
 rename geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/{ => impl}/MicrometerStatisticsManager.kt (84%)
 create mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/micrometer/MicrometerStatisticsFactoryImpl.kt
 create mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/micrometer/MicrometerStatisticsImpl.kt
 create mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/micrometer/MicrometerStatisticsType.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/offheap/MicrometerOffHeapStorageStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/query/CqQueryVsdStats.kt
 delete mode 100644 geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/util/SimpleTimeUtils.kt
 delete mode 100644 geode-stats/build.gradle
 delete mode 100644 geode-stats/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueStats.java
 delete mode 100644 geode-stats/src/main/java/org/apache/geode/distributed/internal/DummyDMStats.java
 delete mode 100644 geode-stats/src/main/java/org/apache/geode/internal/cache/tier/sockets/CCUStats.java
 delete mode 100755 geode-stats/src/main/java/org/apache/geode/internal/offheap/OffHeapStorageStats.java
 delete mode 100644 geode-stats/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java


[geode] 01/01: WIP: Using original Stats Interfaces

Posted by ud...@apache.org.
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

commit 61325f8a57fac69cf986a510fccecbb942de373a
Author: Udo Kohlmeyer <uk...@pivotal.io>
AuthorDate: Mon Jul 23 17:20:20 2018 -0700

    WIP: Using original Stats Interfaces
---
 .../catalina/internal/DeltaSessionStatistics.java  |   24 +-
 .../geode/modules/util/ModuleStatistics.java       |   20 +-
 .../geode/statistics/StatisticDescriptor.java      |    0
 .../org/apache/geode/statistics/Statistics.java    |    0
 .../apache/geode/statistics/StatisticsFactory.java |    1 -
 .../apache/geode/statistics/StatisticsType.java    |    0
 .../geode/statistics/StatisticsTypeFactory.java    |    4 +-
 geode-core/build.gradle                            |    2 +-
 .../admin/internal/MemberHealthEvaluator.java      |    2 +-
 .../asyncqueue/internal/AsyncEventQueueStats.java  |   97 +-
 .../cache/client/internal/ConnectionStats.java     | 1537 ++++++++++----------
 .../cache/client/internal/EndpointManagerImpl.java |    4 +-
 .../geode/cache/client/internal/PoolImpl.java      |    2 +-
 .../cache/query/internal/CqQueryVsdStats.java      |   41 +-
 .../cache/query/internal/index/IndexStats.java     |   55 +-
 .../distributed/internal/DistributionStats.java    |  748 +++++-----
 .../internal/InternalDistributedSystem.java        |   41 +-
 .../distributed/internal/InternalLocator.java      |    6 +-
 .../geode/distributed/internal/LocatorStats.java   |   41 +-
 .../internal/RuntimeDistributionConfigImpl.java    |    2 +-
 .../distributed/internal/locks/DLockStats.java     |  286 ++--
 .../admin/remote/AddStatListenerResponse.java      |    2 +-
 .../remote/AdminConsoleDisconnectMessage.java      |    2 +-
 .../admin/remote/CancelStatListenerResponse.java   |    2 +-
 .../geode/internal/cache/CachePerfStats.java       |  857 ++++++-----
 .../geode/internal/cache/DiskDirectoryStats.java   |   37 +-
 .../geode/internal/cache/DiskRegionStats.java      |   69 +-
 .../geode/internal/cache/DiskStoreStats.java       |  191 ++-
 .../internal/cache/PartitionedRegionStats.java     |  382 ++---
 .../org/apache/geode/internal/cache/PoolStats.java |  139 +-
 .../internal/cache/control/HeapMemoryMonitor.java  |    4 +-
 .../cache/control/ResourceManagerStats.java        |  180 ++-
 .../cache/eviction/CountLRUStatistics.java         |   35 +-
 .../internal/cache/eviction/HeapLRUStatistics.java |   34 +-
 .../cache/eviction/MemoryLRUStatistics.java        |   35 +-
 .../cache/execute/FunctionServiceStats.java        |   53 +-
 .../internal/cache/execute/FunctionStats.java      |  159 +-
 .../internal/cache/ha/HARegionQueueStats.java      |   54 +-
 .../cache/tier/sockets/CacheClientNotifier.java    |    2 +-
 .../tier/sockets/CacheClientNotifierStats.java     |   59 +-
 .../cache/tier/sockets/CacheClientProxyStats.java  |   57 +-
 .../cache/tier/sockets/CacheClientUpdater.java     |   29 +-
 .../internal/cache/wan/GatewaySenderStats.java     |   94 +-
 .../geode/internal/offheap/OffHeapStorage.java     |   92 +-
 .../statistics/AbstractStatisticsFactory.java      |   84 +-
 .../statistics/DummyStatisticsFactory.java         |   37 +-
 .../internal/statistics/GemFireStatSampler.java    |   94 +-
 .../geode/internal/statistics/HostStatHelper.java  |   26 +-
 .../statistics/InternalDistributedSystemStats.java |  112 +-
 .../statistics/LocalStatisticsFactory.java         |    2 +-
 .../internal/statistics/StatSamplerStats.java      |   45 +-
 .../statistics/StatisticDescriptorImpl.java        |   24 +-
 .../statistics/StatisticsTypeFactoryImpl.java      |   27 +-
 .../apache/geode/internal/statistics/VMStats.java  |   29 +-
 .../micrometer/MicrometerStatsFactory.java         |  137 --
 .../statistics/platform/LinuxProcessStats.java     |   25 +-
 .../statistics/platform/LinuxSystemStats.java      |  118 +-
 .../statistics/platform/OSXProcessStats.java       |   35 +-
 .../statistics/platform/OSXSystemStats.java        |  212 +--
 .../statistics/platform/SolarisProcessStats.java   |   86 +-
 .../statistics/platform/SolarisSystemStats.java    |  170 +--
 .../statistics/platform/WindowsProcessStats.java   |   49 +-
 .../statistics/platform/WindowsSystemStats.java    |   96 +-
 .../apache/geode/internal/stats50/VMStats50.java   |  252 ++--
 .../internal/beans/MemberMBeanBridge.java          |   24 +-
 .../internal/MemberHealthEvaluatorJUnitTest.java   |    2 +-
 .../management/MemoryThresholdsDUnitTest.java      |    2 +-
 .../GemFireStatSamplerIntegrationTest.java         |    2 +-
 .../statistics/StatisticsDistributedTest.java      |    4 +-
 .../management/MemberMBeanAttributesDUnitTest.java |    2 +-
 .../stats/DistributedSystemStatsJUnitTest.java     |    8 +-
 .../management/bean/stats/MBeanStatsTestCase.java  |    8 +-
 .../bean/stats/MemberLevelStatsJUnitTest.java      |    2 +-
 .../cache/query/internal/cq/CqServiceVsdStats.java |  155 +-
 .../cache/lucene/internal/LuceneIndexStats.java    |   76 +-
 .../internal/filesystem/FileSystemStats.java       |   46 +-
 geode-micrometer-stats/build.gradle.kts            |   23 +
 .../internal/micrometer/StatisticsManager.kt       |    5 +
 .../internal/micrometer/StatisticsMeter.kt         |   25 +
 .../internal/micrometer/StatisticsMeterGroup.kt    |    5 +
 .../micrometer/impl/MicrometerMeterGroup.kt        |   24 +
 .../micrometer/impl/MicrometerStatisticMeter.kt    |  213 +++
 .../micrometer/impl/MicrometerStatisticsManager.kt |   40 +
 .../micrometer/MicrometerStatisticsFactoryImpl.kt  |   89 ++
 .../micrometer/MicrometerStatisticsImpl.kt         |  165 +++
 .../micrometer/MicrometerStatisticsType.kt         |   38 +
 .../util/AutoBalancerIntegrationJUnitTest.java     |    2 +-
 settings.gradle                                    |    1 +
 88 files changed, 4141 insertions(+), 3961 deletions(-)

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 8c3499f..2c05869 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
@@ -25,25 +25,26 @@ public class DeltaSessionStatistics {
 
   public static final String typeName = "SessionStatistics";
 
-  private static final StatisticsType type;
+  private StatisticsType type;
 
   private static final String SESSIONS_CREATED = "sessionsCreated";
   private static final String SESSIONS_INVALIDATED = "sessionsInvalidated";
   private static final String SESSIONS_EXPIRED = "sessionsExpired";
 
-  private static final int sessionsCreatedId;
-  private static final int sessionsInvalidatedId;
-  private static final int sessionsExpiredId;
+  private int sessionsCreatedId;
+  private int sessionsInvalidatedId;
+  private int sessionsExpiredId;
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     // Initialize type
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    type = f.createType(typeName, typeName,
-        new StatisticDescriptor[] {
-            f.createIntCounter(SESSIONS_CREATED, "The number of sessions created", "operations"),
-            f.createIntCounter(SESSIONS_INVALIDATED,
+    type = factory.createType(typeName, typeName,
+        new StatisticDescriptor[]{
+            factory.createIntCounter(SESSIONS_CREATED, "The number of sessions created",
+                "operations"),
+            factory.createIntCounter(SESSIONS_INVALIDATED,
                 "The number of sessions invalidated by invoking invalidate", "operations"),
-            f.createIntCounter(SESSIONS_EXPIRED, "The number of sessions invalidated by timeout",
+            factory.createIntCounter(SESSIONS_EXPIRED,
+                "The number of sessions invalidated by timeout",
                 "operations"),});
 
     // Initialize id fields
@@ -55,6 +56,7 @@ public class DeltaSessionStatistics {
   private final Statistics stats;
 
   public DeltaSessionStatistics(StatisticsFactory factory, String applicationName) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(type, typeName + "_" + applicationName);
   }
 
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 137af57..eb3901d 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
@@ -28,23 +28,22 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class ModuleStatistics {
 
-  private static final StatisticsType type;
+  private StatisticsType type;
 
-  private static final int cacheHitsId;
+  private int cacheHitsId;
 
-  private static final int cacheMissesId;
+  private int cacheMissesId;
 
-  private static final int hibernateEntityDestroyJobsScheduledId;
+  private int hibernateEntityDestroyJobsScheduledId;
 
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    type = f.createType("pluginStats", "statistics for hibernate plugin and hibernate L2 cache",
+  private void initializeStats(StatisticsFactory factory) {
+    type = factory.createType("pluginStats", "statistics for hibernate plugin and hibernate L2 cache",
         new StatisticDescriptor[] {
-            f.createLongCounter("cacheHits", "number of times an entity was found in L2 cache",
+            factory.createLongCounter("cacheHits", "number of times an entity was found in L2 cache",
                 "count"),
-            f.createLongCounter("cacheMisses",
+            factory.createLongCounter("cacheMisses",
                 "number of times an entity was NOT found in l2 cache", "count"),
-            f.createLongCounter("hibernateEntityDestroyJobsScheduled",
+            factory.createLongCounter("hibernateEntityDestroyJobsScheduled",
                 "number of entities scheduled for destroy because of version conflict with a remote member",
                 "jobs")});
 
@@ -58,6 +57,7 @@ public class ModuleStatistics {
   private static ModuleStatistics instance;
 
   private ModuleStatistics(StatisticsFactory factory) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(type, "PluginStatistics");
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java b/geode-common/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
similarity index 100%
rename from geode-core/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
rename to geode-common/src/main/java/org/apache/geode/statistics/StatisticDescriptor.java
diff --git a/geode-core/src/main/java/org/apache/geode/statistics/Statistics.java b/geode-common/src/main/java/org/apache/geode/statistics/Statistics.java
similarity index 100%
rename from geode-core/src/main/java/org/apache/geode/statistics/Statistics.java
rename to geode-common/src/main/java/org/apache/geode/statistics/Statistics.java
diff --git a/geode-core/src/main/java/org/apache/geode/statistics/StatisticsFactory.java b/geode-common/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
similarity index 98%
rename from geode-core/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
rename to geode-common/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
index fb93129..27ae5ef 100644
--- a/geode-core/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
+++ b/geode-common/src/main/java/org/apache/geode/statistics/StatisticsFactory.java
@@ -19,7 +19,6 @@ package org.apache.geode.statistics;
  * Instances of this interface provide methods that create instances of {@link Statistics}. It can
  * also be used to create instances of {@link StatisticDescriptor} and {@link StatisticsType}
  * because it implements {@link StatisticsTypeFactory}.
- * {@link org.apache.geode.distributed.DistributedSystem} is the only instance of this interface.
  *
  * <P>
  *
diff --git a/geode-core/src/main/java/org/apache/geode/statistics/StatisticsType.java b/geode-common/src/main/java/org/apache/geode/statistics/StatisticsType.java
similarity index 100%
rename from geode-core/src/main/java/org/apache/geode/statistics/StatisticsType.java
rename to geode-common/src/main/java/org/apache/geode/statistics/StatisticsType.java
diff --git a/geode-core/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java b/geode-common/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
similarity index 98%
rename from geode-core/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
rename to geode-common/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
index 449dbab..110d20a 100644
--- a/geode-core/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
+++ b/geode-common/src/main/java/org/apache/geode/statistics/StatisticsTypeFactory.java
@@ -17,8 +17,6 @@ package org.apache.geode.statistics;
 import java.io.IOException;
 import java.io.Reader;
 
-import org.apache.geode.internal.statistics.StatArchiveFormat;
-
 /**
  * Instances of this interface provide methods that create instances of {@link StatisticDescriptor}
  * and {@link StatisticsType}. Every {@link StatisticsFactory} is also a type factory.
@@ -180,7 +178,7 @@ public interface StatisticsTypeFactory {
    * <P>
    * Current value is: <code>254</code>
    */
-  int MAX_DESCRIPTORS_PER_TYPE = StatArchiveFormat.ILLEGAL_STAT_OFFSET - 1;
+  int MAX_DESCRIPTORS_PER_TYPE = 254;
 
   /**
    * Creates or finds and returns a {@link StatisticsType} with the given <code>name</code>,
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 8fe6691..0be1c4f 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -38,7 +38,7 @@ dependencies {
   antlr 'antlr:antlr:' + project.'antlr.version'
 
   // External
-  compile group: 'io.micrometer', name: 'micrometer-core', version: '1.0.5'
+  compileOnly project(':geode-micrometer-stats')
 
   compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar")
   testCompile files("${System.getProperty('java.home')}/../lib/tools.jar")
diff --git a/geode-core/src/main/java/org/apache/geode/admin/internal/MemberHealthEvaluator.java b/geode-core/src/main/java/org/apache/geode/admin/internal/MemberHealthEvaluator.java
index 57ba1b2..471f196 100644
--- a/geode-core/src/main/java/org/apache/geode/admin/internal/MemberHealthEvaluator.java
+++ b/geode-core/src/main/java/org/apache/geode/admin/internal/MemberHealthEvaluator.java
@@ -62,7 +62,7 @@ class MemberHealthEvaluator extends AbstractHealthEvaluator {
     this.config = config;
     InternalDistributedSystem system = dm.getSystem();
 
-    GemFireStatSampler sampler = system.getStatSampler();
+    GemFireStatSampler sampler = system.getInternalDistributedSystemStats().getStatSampler();
     if (sampler != null) {
       // Sampling is enabled
       this.processStats = sampler.getProcessStats();
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 cb3ad81..d4dd853 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
@@ -25,87 +25,89 @@ public class AsyncEventQueueStats extends GatewaySenderStats {
 
   public static final String typeName = "AsyncEventQueueStatistics";
 
-  /** The <code>StatisticsType</code> of the statistics */
-  public static final StatisticsType type;
-
-
-  static {
-
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
+  /**
+   * The <code>StatisticsType</code> of the statistics
+   */
+  private StatisticsType type;
 
-    type = f.createType(typeName, "Stats for activity in the AsyncEventQueue",
-        new StatisticDescriptor[] {
-            f.createIntCounter(EVENTS_RECEIVED, "Number of events received by this queue.",
+  @Override
+  protected void initializeStats(StatisticsFactory factory) {
+    type = factory.createType(typeName, "Stats for activity in the AsyncEventQueue",
+        new StatisticDescriptor[]{
+            factory.createIntCounter(EVENTS_RECEIVED, "Number of events received by this queue.",
                 "operations"),
-            f.createIntCounter(EVENTS_QUEUED, "Number of events added to the event queue.",
+            factory.createIntCounter(EVENTS_QUEUED, "Number of events added to the event queue.",
                 "operations"),
-            f.createLongCounter(EVENT_QUEUE_TIME, "Total time spent queueing events.",
+            factory.createLongCounter(EVENT_QUEUE_TIME, "Total time spent queueing events.",
                 "nanoseconds"),
-            f.createIntGauge(EVENT_QUEUE_SIZE, "Size of the event queue.", "operations", false),
-            f.createIntGauge(SECONDARY_EVENT_QUEUE_SIZE, "Size of the secondary event queue.",
+            factory.createIntGauge(EVENT_QUEUE_SIZE, "Size of the event queue.", "operations",
+                false),
+            factory.createIntGauge(SECONDARY_EVENT_QUEUE_SIZE, "Size of the secondary event queue.",
                 "operations", false),
-            f.createIntGauge(EVENTS_PROCESSED_BY_PQRM,
+            factory.createIntGauge(EVENTS_PROCESSED_BY_PQRM,
                 "Total number of events processed by Parallel Queue Removal Message(PQRM).",
                 "operations", false),
-            f.createIntGauge(TMP_EVENT_QUEUE_SIZE, "Size of the temporary events queue.",
+            factory.createIntGauge(TMP_EVENT_QUEUE_SIZE, "Size of the temporary events queue.",
                 "operations", false),
-            f.createIntCounter(EVENTS_NOT_QUEUED_CONFLATED,
+            factory.createIntCounter(EVENTS_NOT_QUEUED_CONFLATED,
                 "Number of events received but not added to the event queue because the queue already contains an event with the event's key.",
                 "operations"),
-            f.createIntCounter(EVENTS_CONFLATED_FROM_BATCHES,
+            factory.createIntCounter(EVENTS_CONFLATED_FROM_BATCHES,
                 "Number of events conflated from batches.", "operations"),
-            f.createIntCounter(EVENTS_DISTRIBUTED,
+            factory.createIntCounter(EVENTS_DISTRIBUTED,
                 "Number of events removed from the event queue and sent.", "operations"),
-            f.createIntCounter(EVENTS_EXCEEDING_ALERT_THRESHOLD,
+            factory.createIntCounter(EVENTS_EXCEEDING_ALERT_THRESHOLD,
                 "Number of events exceeding the alert threshold.", "operations", false),
-            f.createLongCounter(BATCH_DISTRIBUTION_TIME,
+            factory.createLongCounter(BATCH_DISTRIBUTION_TIME,
                 "Total time spent distributing batches of events to receivers.", "nanoseconds"),
-            f.createIntCounter(BATCHES_DISTRIBUTED,
+            factory.createIntCounter(BATCHES_DISTRIBUTED,
                 "Number of batches of events removed from the event queue and sent.", "operations"),
-            f.createIntCounter(BATCHES_REDISTRIBUTED,
+            factory.createIntCounter(BATCHES_REDISTRIBUTED,
                 "Number of batches of events removed from the event queue and resent.",
                 "operations", false),
-            f.createIntCounter(UNPROCESSED_TOKENS_ADDED_BY_PRIMARY,
+            factory.createIntCounter(UNPROCESSED_TOKENS_ADDED_BY_PRIMARY,
                 "Number of tokens added to the secondary's unprocessed token map by the primary (though a listener).",
                 "tokens"),
-            f.createIntCounter(UNPROCESSED_EVENTS_ADDED_BY_SECONDARY,
+            factory.createIntCounter(UNPROCESSED_EVENTS_ADDED_BY_SECONDARY,
                 "Number of events added to the secondary's unprocessed event map by the secondary.",
                 "events"),
-            f.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_PRIMARY,
+            factory.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_PRIMARY,
                 "Number of events removed from the secondary's unprocessed event map by the primary (though a listener).",
                 "events"),
-            f.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_SECONDARY,
+            factory.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_SECONDARY,
                 "Number of tokens removed from the secondary's unprocessed token map by the secondary.",
                 "tokens"),
-            f.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_TIMEOUT,
+            factory.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_TIMEOUT,
                 "Number of events removed from the secondary's unprocessed event map by a timeout.",
                 "events"),
-            f.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_TIMEOUT,
+            factory.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_TIMEOUT,
                 "Number of tokens removed from the secondary's unprocessed token map by a timeout.",
                 "tokens"),
-            f.createIntGauge(UNPROCESSED_EVENT_MAP_SIZE,
+            factory.createIntGauge(UNPROCESSED_EVENT_MAP_SIZE,
                 "Current number of entries in the secondary's unprocessed event map.", "events",
                 false),
-            f.createIntGauge(UNPROCESSED_TOKEN_MAP_SIZE,
+            factory.createIntGauge(UNPROCESSED_TOKEN_MAP_SIZE,
                 "Current number of entries in the secondary's unprocessed token map.", "tokens",
                 false),
-            f.createIntGauge(CONFLATION_INDEXES_MAP_SIZE,
+            factory.createIntGauge(CONFLATION_INDEXES_MAP_SIZE,
                 "Current number of entries in the conflation indexes map.", "events"),
-            f.createIntCounter(NOT_QUEUED_EVENTS, "Number of events not added to queue.", "events"),
-            f.createIntCounter(EVENTS_DROPPED_DUE_TO_PRIMARY_SENDER_NOT_RUNNING,
+            factory.createIntCounter(NOT_QUEUED_EVENTS, "Number of events not added to queue.",
+                "events"),
+            factory.createIntCounter(EVENTS_DROPPED_DUE_TO_PRIMARY_SENDER_NOT_RUNNING,
                 "Number of events dropped because the primary gateway sender is not running.",
                 "events"),
-            f.createIntCounter(EVENTS_FILTERED,
+            factory.createIntCounter(EVENTS_FILTERED,
                 "Number of events filtered through GatewayEventFilter.", "events"),
-            f.createIntCounter(LOAD_BALANCES_COMPLETED, "Number of load balances completed",
+            factory.createIntCounter(LOAD_BALANCES_COMPLETED, "Number of load balances completed",
                 "operations"),
-            f.createIntGauge(LOAD_BALANCES_IN_PROGRESS, "Number of load balances in progress",
+            factory.createIntGauge(LOAD_BALANCES_IN_PROGRESS, "Number of load balances in progress",
                 "operations"),
-            f.createLongCounter(LOAD_BALANCE_TIME, "Total time spent load balancing this sender",
+            factory.createLongCounter(LOAD_BALANCE_TIME,
+                "Total time spent load balancing this sender",
                 "nanoseconds"),
-            f.createIntCounter(SYNCHRONIZATION_EVENTS_ENQUEUED,
+            factory.createIntCounter(SYNCHRONIZATION_EVENTS_ENQUEUED,
                 "Number of synchronization events added to the event queue.", "operations"),
-            f.createIntCounter(SYNCHRONIZATION_EVENTS_PROVIDED,
+            factory.createIntCounter(SYNCHRONIZATION_EVENTS_PROVIDED,
                 "Number of synchronization events provided to other members.", "operations"),});
 
     // Initialize id fields
@@ -145,12 +147,15 @@ public class AsyncEventQueueStats extends GatewaySenderStats {
 
   /**
    * Constructor.
-   *
-   * @param f The <code>StatisticsFactory</code> which creates the <code>Statistics</code> instance
-   * @param asyncQueueId The id of the <code>AsyncEventQueue</code> used to generate the name of the
-   *        <code>Statistics</code>
+   * @param factory The <code>StatisticsFactory</code> which creates the <code>Statistics</code>
+   * instance
+   * @param asyncQueueId The id of the <code>AsyncEventQueue</code> used to generate the name of
+   * the
+   * <code>Statistics</code>
    */
-  public AsyncEventQueueStats(StatisticsFactory f, String asyncQueueId) {
-    super(f, asyncQueueId, type);
+  public AsyncEventQueueStats(StatisticsFactory factory, String asyncQueueId) {
+    super();
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(type, "asyncEventQueueStats-" + asyncQueueId);
   }
 }
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 a115bf3..1f41471 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
@@ -31,409 +31,409 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class ConnectionStats implements MessageStats {
   // static fields
-  private static final StatisticsType type;
-  private static final StatisticsType sendType;
+  private StatisticsType type;
+  private StatisticsType sendType;
 
   ///////////////////////////////////////////////////////////////////////
   /*
-   * private static final int opInProgressId; private static final int opSendInProgressId; private
-   * static final int opSendFailedId; private static final int opSendId; private static final int
-   * opSendDurationId; private static final int opTimedOutId; private static final int opFailedId;
-   * private static final int opId; private static final int opDurationId;
+   * private int opInProgressId; private int opSendInProgressId; private
+   * static final int opSendFailedId; private int opSendId; private int
+   * opSendDurationId; private int opTimedOutId; private int opFailedId;
+   * private int opId; private int opDurationId;
    */
   ///////////////////////////////////////////////////////////////////////
 
-  private static final int getInProgressId;
-  private static final int getSendInProgressId;
-  private static final int getSendFailedId;
-  private static final int getSendId;
-  private static final int getSendDurationId;
-  private static final int getTimedOutId;
-  private static final int getFailedId;
-  private static final int getId;
-  private static final int getDurationId;
-
-  private static final int putInProgressId;
-  private static final int putSendInProgressId;
-  private static final int putSendFailedId;
-  private static final int putSendId;
-  private static final int putSendDurationId;
-  private static final int putTimedOutId;
-  private static final int putFailedId;
-  private static final int putId;
-  private static final int putDurationId;
-
-  private static final int destroyInProgressId;
-  private static final int destroySendInProgressId;
-  private static final int destroySendFailedId;
-  private static final int destroySendId;
-  private static final int destroySendDurationId;
-  private static final int destroyTimedOutId;
-  private static final int destroyFailedId;
-  private static final int destroyId;
-  private static final int destroyDurationId;
-
-  private static final int destroyRegionInProgressId;
-  private static final int destroyRegionSendInProgressId;
-  private static final int destroyRegionSendFailedId;
-  private static final int destroyRegionSendId;
-  private static final int destroyRegionSendDurationId;
-  private static final int destroyRegionTimedOutId;
-  private static final int destroyRegionFailedId;
-  private static final int destroyRegionId;
-  private static final int destroyRegionDurationId;
-
-  private static final int clearInProgressId;
-  private static final int clearSendInProgressId;
-  private static final int clearSendFailedId;
-  private static final int clearSendId;
-  private static final int clearSendDurationId;
-  private static final int clearTimedOutId;
-  private static final int clearFailedId;
-  private static final int clearId;
-  private static final int clearDurationId;
-
-  private static final int containsKeyInProgressId;
-  private static final int containsKeySendInProgressId;
-  private static final int containsKeySendFailedId;
-  private static final int containsKeySendId;
-  private static final int containsKeySendDurationId;
-  private static final int containsKeyTimedOutId;
-  private static final int containsKeyFailedId;
-  private static final int containsKeyId;
-  private static final int containsKeyDurationId;
-
-  private static final int keySetInProgressId;
-  private static final int keySetSendInProgressId;
-  private static final int keySetSendFailedId;
-  private static final int keySetSendId;
-  private static final int keySetSendDurationId;
-  private static final int keySetTimedOutId;
-  private static final int keySetFailedId;
-  private static final int keySetId;
-  private static final int keySetDurationId;
-
-  private static final int commitInProgressId;
-  private static final int commitSendInProgressId;
-  private static final int commitSendFailedId;
-  private static final int commitSendId;
-  private static final int commitSendDurationId;
-
-  private static final int commitFailedId;
-  private static final int commitTimedOutId;
-  private static final int commitId;
-  private static final int commitDurationId;
-
-  private static final int rollbackInProgressId;
-  private static final int rollbackSendInProgressId;
-  private static final int rollbackSendFailedId;
-  private static final int rollbackSendId;
-  private static final int rollbackSendDurationId;
-
-  private static final int rollbackFailedId;
-  private static final int rollbackTimedOutId;
-  private static final int rollbackId;
-  private static final int rollbackDurationId;
-
-  private static final int getEntryInProgressId;
-  private static final int getEntrySendInProgressId;
-  private static final int getEntrySendFailedId;
-  private static final int getEntrySendId;
-  private static final int getEntrySendDurationId;
-
-  private static final int getEntryFailedId;
-  private static final int getEntryTimedOutId;
-  private static final int getEntryId;
-  private static final int getEntryDurationId;
-
-  private static final int txSynchronizationInProgressId;
-  private static final int txSynchronizationSendInProgressId;
-  private static final int txSynchronizationSendFailedId;
-  private static final int txSynchronizationSendId;
-  private static final int txSynchronizationSendDurationId;
-
-  private static final int txSynchronizationFailedId;
-  private static final int txSynchronizationTimedOutId;
-  private static final int txSynchronizationId;
-  private static final int txSynchronizationDurationId;
-
-  private static final int txFailoverInProgressId;
-  private static final int txFailoverSendInProgressId;
-  private static final int txFailoverSendFailedId;
-  private static final int txFailoverSendId;
-  private static final int txFailoverSendDurationId;
-
-  private static final int txFailoverFailedId;
-  private static final int txFailoverTimedOutId;
-  private static final int txFailoverId;
-  private static final int txFailoverDurationId;
-
-  private static final int sizeInProgressId;
-  private static final int sizeSendInProgressId;
-  private static final int sizeSendFailedId;
-  private static final int sizeSendId;
-  private static final int sizeSendDurationId;
-
-  private static final int sizeFailedId;
-  private static final int sizeTimedOutId;
-  private static final int sizeId;
-  private static final int sizeDurationId;
-
-  private static final int invalidateInProgressId;
-  private static final int invalidateSendInProgressId;
-  private static final int invalidateSendFailedId;
-  private static final int invalidateSendId;
-  private static final int invalidateSendDurationId;
-
-  private static final int invalidateFailedId;
-  private static final int invalidateTimedOutId;
-  private static final int invalidateId;
-  private static final int invalidateDurationId;
-
-
-  private static final int registerInterestInProgressId;
-  private static final int registerInterestSendInProgressId;
-  private static final int registerInterestSendFailedId;
-  private static final int registerInterestSendId;
-  private static final int registerInterestSendDurationId;
-  private static final int registerInterestTimedOutId;
-  private static final int registerInterestFailedId;
-  private static final int registerInterestId;
-  private static final int registerInterestDurationId;
-
-  private static final int unregisterInterestInProgressId;
-  private static final int unregisterInterestSendInProgressId;
-  private static final int unregisterInterestSendFailedId;
-  private static final int unregisterInterestSendId;
-  private static final int unregisterInterestSendDurationId;
-  private static final int unregisterInterestTimedOutId;
-  private static final int unregisterInterestFailedId;
-  private static final int unregisterInterestId;
-  private static final int unregisterInterestDurationId;
-
-  private static final int queryInProgressId;
-  private static final int querySendInProgressId;
-  private static final int querySendFailedId;
-  private static final int querySendId;
-  private static final int querySendDurationId;
-  private static final int queryTimedOutId;
-  private static final int queryFailedId;
-  private static final int queryId;
-  private static final int queryDurationId;
-
-  private static final int createCQInProgressId;
-  private static final int createCQSendInProgressId;
-  private static final int createCQSendFailedId;
-  private static final int createCQSendId;
-  private static final int createCQSendDurationId;
-  private static final int createCQTimedOutId;
-  private static final int createCQFailedId;
-  private static final int createCQId;
-  private static final int createCQDurationId;
-  private static final int stopCQInProgressId;
-  private static final int stopCQSendInProgressId;
-  private static final int stopCQSendFailedId;
-  private static final int stopCQSendId;
-  private static final int stopCQSendDurationId;
-  private static final int stopCQTimedOutId;
-  private static final int stopCQFailedId;
-  private static final int stopCQId;
-  private static final int stopCQDurationId;
-  private static final int closeCQInProgressId;
-  private static final int closeCQSendInProgressId;
-  private static final int closeCQSendFailedId;
-  private static final int closeCQSendId;
-  private static final int closeCQSendDurationId;
-  private static final int closeCQTimedOutId;
-  private static final int closeCQFailedId;
-  private static final int closeCQId;
-  private static final int closeCQDurationId;
-  private static final int gatewayBatchInProgressId;
-  private static final int gatewayBatchSendInProgressId;
-  private static final int gatewayBatchSendFailedId;
-  private static final int gatewayBatchSendId;
-  private static final int gatewayBatchSendDurationId;
-  private static final int gatewayBatchTimedOutId;
-  private static final int gatewayBatchFailedId;
-  private static final int gatewayBatchId;
-  private static final int gatewayBatchDurationId;
-  private static final int getDurableCQsInProgressId;
-  private static final int getDurableCQsSendsInProgressId;
-  private static final int getDurableCQsSendFailedId;
-  private static final int getDurableCQsSendId;
-  private static final int getDurableCQsSendDurationId;
-  private static final int getDurableCQsTimedOutId;
-  private static final int getDurableCQsFailedId;
-  private static final int getDurableCQsId;
-  private static final int getDurableCQsDurationId;
-
-  private static final int readyForEventsInProgressId;
-  private static final int readyForEventsSendInProgressId;
-  private static final int readyForEventsSendFailedId;
-  private static final int readyForEventsSendId;
-  private static final int readyForEventsSendDurationId;
-  private static final int readyForEventsTimedOutId;
-  private static final int readyForEventsFailedId;
-  private static final int readyForEventsId;
-  private static final int readyForEventsDurationId;
-
-  private static final int makePrimaryInProgressId;
-  private static final int makePrimarySendInProgressId;
-  private static final int makePrimarySendFailedId;
-  private static final int makePrimarySendId;
-  private static final int makePrimarySendDurationId;
-  private static final int makePrimaryTimedOutId;
-  private static final int makePrimaryFailedId;
-  private static final int makePrimaryId;
-  private static final int makePrimaryDurationId;
-
-  private static final int closeConInProgressId;
-  private static final int closeConSendInProgressId;
-  private static final int closeConSendFailedId;
-  private static final int closeConSendId;
-  private static final int closeConSendDurationId;
-  private static final int closeConTimedOutId;
-  private static final int closeConFailedId;
-  private static final int closeConId;
-  private static final int closeConDurationId;
-
-  private static final int primaryAckInProgressId;
-  private static final int primaryAckSendInProgressId;
-  private static final int primaryAckSendFailedId;
-  private static final int primaryAckSendId;
-  private static final int primaryAckSendDurationId;
-  private static final int primaryAckTimedOutId;
-  private static final int primaryAckFailedId;
-  private static final int primaryAckId;
-  private static final int primaryAckDurationId;
-
-  private static final int pingInProgressId;
-  private static final int pingSendInProgressId;
-  private static final int pingSendFailedId;
-  private static final int pingSendId;
-  private static final int pingSendDurationId;
-  private static final int pingTimedOutId;
-  private static final int pingFailedId;
-  private static final int pingId;
-  private static final int pingDurationId;
-
-  private static final int registerInstantiatorsInProgressId;
-  private static final int registerInstantiatorsSendInProgressId;
-  private static final int registerInstantiatorsSendFailedId;
-  private static final int registerInstantiatorsSendId;
-  private static final int registerInstantiatorsSendDurationId;
-  private static final int registerInstantiatorsTimedOutId;
-  private static final int registerInstantiatorsFailedId;
-  private static final int registerInstantiatorsId;
-  private static final int registerInstantiatorsDurationId;
-
-  private static final int registerDataSerializersInProgressId;
-  private static final int registerDataSerializersSendInProgressId;
-  private static final int registerDataSerializersSendFailedId;
-  private static final int registerDataSerializersSendId;
-  private static final int registerDataSerializersSendDurationId;
-  private static final int registerDataSerializersTimedOutId;
-  private static final int registerDataSerializersFailedId;
-  private static final int registerDataSerializersId;
-  private static final int registerDataSerializersDurationId;
-
-  private static final int putAllInProgressId;
-  private static final int putAllSendInProgressId;
-  private static final int putAllSendFailedId;
-  private static final int putAllSendId;
-  private static final int putAllSendDurationId;
-  private static final int putAllTimedOutId;
-  private static final int putAllFailedId;
-  private static final int putAllId;
-  private static final int putAllDurationId;
-
-  private static final int removeAllInProgressId;
-  private static final int removeAllSendInProgressId;
-  private static final int removeAllSendFailedId;
-  private static final int removeAllSendId;
-  private static final int removeAllSendDurationId;
-  private static final int removeAllTimedOutId;
-  private static final int removeAllFailedId;
-  private static final int removeAllId;
-  private static final int removeAllDurationId;
-
-  private static final int getAllInProgressId;
-  private static final int getAllSendInProgressId;
-  private static final int getAllSendFailedId;
-  private static final int getAllSendId;
-  private static final int getAllSendDurationId;
-  private static final int getAllTimedOutId;
-  private static final int getAllFailedId;
-  private static final int getAllId;
-  private static final int getAllDurationId;
-
-  private static final int connectionsId;
-  private static final int connectsId;
-  private static final int disconnectsId;
-  private static final int messagesBeingReceivedId;
-  private static final int messageBytesBeingReceivedId;
-  private static final int receivedBytesId;
-  private static final int sentBytesId;
-
-  private static final int executeFunctionInProgressId;
-  private static final int executeFunctionSendInProgressId;
-  private static final int executeFunctionSendFailedId;
-  private static final int executeFunctionSendId;
-  private static final int executeFunctionSendDurationId;
-  private static final int executeFunctionTimedOutId;
-  private static final int executeFunctionFailedId;
-  private static final int executeFunctionId;
-  private static final int executeFunctionDurationId;
-
-  private static final int getClientPRMetadataInProgressId;
-  private static final int getClientPRMetadataSendInProgressId;
-  private static final int getClientPRMetadataSendFailedId;
-  private static final int getClientPRMetadataSendId;
-  private static final int getClientPRMetadataSendDurationId;
-  private static final int getClientPRMetadataTimedOutId;
-  private static final int getClientPRMetadataFailedId;
-  private static final int getClientPRMetadataId;
-  private static final int getClientPRMetadataDurationId;
-
-  private static final int getClientPartitionAttributesInProgressId;
-  private static final int getClientPartitionAttributesSendInProgressId;
-  private static final int getClientPartitionAttributesSendFailedId;
-  private static final int getClientPartitionAttributesSendId;
-  private static final int getClientPartitionAttributesSendDurationId;
-  private static final int getClientPartitionAttributesTimedOutId;
-  private static final int getClientPartitionAttributesFailedId;
-  private static final int getClientPartitionAttributesId;
-  private static final int getClientPartitionAttributesDurationId;
-
-  private static final int getPDXIdForTypeInProgressId;
-  private static final int getPDXIdForTypeSendInProgressId;
-  private static final int getPDXIdForTypeSendFailedId;
-  private static final int getPDXIdForTypeSendId;
-  private static final int getPDXIdForTypeSendDurationId;
-  private static final int getPDXIdForTypeTimedOutId;
-  private static final int getPDXIdForTypeFailedId;
-  private static final int getPDXIdForTypeId;
-  private static final int getPDXIdForTypeDurationId;
-
-  private static final int getPDXTypeByIdInProgressId;
-  private static final int getPDXTypeByIdSendInProgressId;
-  private static final int getPDXTypeByIdSendFailedId;
-  private static final int getPDXTypeByIdSendId;
-  private static final int getPDXTypeByIdSendDurationId;
-  private static final int getPDXTypeByIdTimedOutId;
-  private static final int getPDXTypeByIdFailedId;
-  private static final int getPDXTypeByIdId;
-  private static final int getPDXTypeByIdDurationId;
-
-  private static final int addPdxTypeInProgressId;
-  private static final int addPdxTypeSendInProgressId;
-  private static final int addPdxTypeSendFailedId;
-  private static final int addPdxTypeSendId;
-  private static final int addPdxTypeSendDurationId;
-  private static final int addPdxTypeTimedOutId;
-  private static final int addPdxTypeFailedId;
-  private static final int addPdxTypeId;
-  private static final int addPdxTypeDurationId;
+  private int getInProgressId;
+  private int getSendInProgressId;
+  private int getSendFailedId;
+  private int getSendId;
+  private int getSendDurationId;
+  private int getTimedOutId;
+  private int getFailedId;
+  private int getId;
+  private int getDurationId;
+
+  private int putInProgressId;
+  private int putSendInProgressId;
+  private int putSendFailedId;
+  private int putSendId;
+  private int putSendDurationId;
+  private int putTimedOutId;
+  private int putFailedId;
+  private int putId;
+  private int putDurationId;
+
+  private int destroyInProgressId;
+  private int destroySendInProgressId;
+  private int destroySendFailedId;
+  private int destroySendId;
+  private int destroySendDurationId;
+  private int destroyTimedOutId;
+  private int destroyFailedId;
+  private int destroyId;
+  private int destroyDurationId;
+
+  private int destroyRegionInProgressId;
+  private int destroyRegionSendInProgressId;
+  private int destroyRegionSendFailedId;
+  private int destroyRegionSendId;
+  private int destroyRegionSendDurationId;
+  private int destroyRegionTimedOutId;
+  private int destroyRegionFailedId;
+  private int destroyRegionId;
+  private int destroyRegionDurationId;
+
+  private int clearInProgressId;
+  private int clearSendInProgressId;
+  private int clearSendFailedId;
+  private int clearSendId;
+  private int clearSendDurationId;
+  private int clearTimedOutId;
+  private int clearFailedId;
+  private int clearId;
+  private int clearDurationId;
+
+  private int containsKeyInProgressId;
+  private int containsKeySendInProgressId;
+  private int containsKeySendFailedId;
+  private int containsKeySendId;
+  private int containsKeySendDurationId;
+  private int containsKeyTimedOutId;
+  private int containsKeyFailedId;
+  private int containsKeyId;
+  private int containsKeyDurationId;
+
+  private int keySetInProgressId;
+  private int keySetSendInProgressId;
+  private int keySetSendFailedId;
+  private int keySetSendId;
+  private int keySetSendDurationId;
+  private int keySetTimedOutId;
+  private int keySetFailedId;
+  private int keySetId;
+  private int keySetDurationId;
+
+  private int commitInProgressId;
+  private int commitSendInProgressId;
+  private int commitSendFailedId;
+  private int commitSendId;
+  private int commitSendDurationId;
+
+  private int commitFailedId;
+  private int commitTimedOutId;
+  private int commitId;
+  private int commitDurationId;
+
+  private int rollbackInProgressId;
+  private int rollbackSendInProgressId;
+  private int rollbackSendFailedId;
+  private int rollbackSendId;
+  private int rollbackSendDurationId;
+
+  private int rollbackFailedId;
+  private int rollbackTimedOutId;
+  private int rollbackId;
+  private int rollbackDurationId;
+
+  private int getEntryInProgressId;
+  private int getEntrySendInProgressId;
+  private int getEntrySendFailedId;
+  private int getEntrySendId;
+  private int getEntrySendDurationId;
+
+  private int getEntryFailedId;
+  private int getEntryTimedOutId;
+  private int getEntryId;
+  private int getEntryDurationId;
+
+  private int txSynchronizationInProgressId;
+  private int txSynchronizationSendInProgressId;
+  private int txSynchronizationSendFailedId;
+  private int txSynchronizationSendId;
+  private int txSynchronizationSendDurationId;
+
+  private int txSynchronizationFailedId;
+  private int txSynchronizationTimedOutId;
+  private int txSynchronizationId;
+  private int txSynchronizationDurationId;
+
+  private int txFailoverInProgressId;
+  private int txFailoverSendInProgressId;
+  private int txFailoverSendFailedId;
+  private int txFailoverSendId;
+  private int txFailoverSendDurationId;
+
+  private int txFailoverFailedId;
+  private int txFailoverTimedOutId;
+  private int txFailoverId;
+  private int txFailoverDurationId;
+
+  private int sizeInProgressId;
+  private int sizeSendInProgressId;
+  private int sizeSendFailedId;
+  private int sizeSendId;
+  private int sizeSendDurationId;
+
+  private int sizeFailedId;
+  private int sizeTimedOutId;
+  private int sizeId;
+  private int sizeDurationId;
+
+  private int invalidateInProgressId;
+  private int invalidateSendInProgressId;
+  private int invalidateSendFailedId;
+  private int invalidateSendId;
+  private int invalidateSendDurationId;
+
+  private int invalidateFailedId;
+  private int invalidateTimedOutId;
+  private int invalidateId;
+  private int invalidateDurationId;
+
+
+  private int registerInterestInProgressId;
+  private int registerInterestSendInProgressId;
+  private int registerInterestSendFailedId;
+  private int registerInterestSendId;
+  private int registerInterestSendDurationId;
+  private int registerInterestTimedOutId;
+  private int registerInterestFailedId;
+  private int registerInterestId;
+  private int registerInterestDurationId;
+
+  private int unregisterInterestInProgressId;
+  private int unregisterInterestSendInProgressId;
+  private int unregisterInterestSendFailedId;
+  private int unregisterInterestSendId;
+  private int unregisterInterestSendDurationId;
+  private int unregisterInterestTimedOutId;
+  private int unregisterInterestFailedId;
+  private int unregisterInterestId;
+  private int unregisterInterestDurationId;
+
+  private int queryInProgressId;
+  private int querySendInProgressId;
+  private int querySendFailedId;
+  private int querySendId;
+  private int querySendDurationId;
+  private int queryTimedOutId;
+  private int queryFailedId;
+  private int queryId;
+  private int queryDurationId;
+
+  private int createCQInProgressId;
+  private int createCQSendInProgressId;
+  private int createCQSendFailedId;
+  private int createCQSendId;
+  private int createCQSendDurationId;
+  private int createCQTimedOutId;
+  private int createCQFailedId;
+  private int createCQId;
+  private int createCQDurationId;
+  private int stopCQInProgressId;
+  private int stopCQSendInProgressId;
+  private int stopCQSendFailedId;
+  private int stopCQSendId;
+  private int stopCQSendDurationId;
+  private int stopCQTimedOutId;
+  private int stopCQFailedId;
+  private int stopCQId;
+  private int stopCQDurationId;
+  private int closeCQInProgressId;
+  private int closeCQSendInProgressId;
+  private int closeCQSendFailedId;
+  private int closeCQSendId;
+  private int closeCQSendDurationId;
+  private int closeCQTimedOutId;
+  private int closeCQFailedId;
+  private int closeCQId;
+  private int closeCQDurationId;
+  private int gatewayBatchInProgressId;
+  private int gatewayBatchSendInProgressId;
+  private int gatewayBatchSendFailedId;
+  private int gatewayBatchSendId;
+  private int gatewayBatchSendDurationId;
+  private int gatewayBatchTimedOutId;
+  private int gatewayBatchFailedId;
+  private int gatewayBatchId;
+  private int gatewayBatchDurationId;
+  private int getDurableCQsInProgressId;
+  private int getDurableCQsSendsInProgressId;
+  private int getDurableCQsSendFailedId;
+  private int getDurableCQsSendId;
+  private int getDurableCQsSendDurationId;
+  private int getDurableCQsTimedOutId;
+  private int getDurableCQsFailedId;
+  private int getDurableCQsId;
+  private int getDurableCQsDurationId;
+
+  private int readyForEventsInProgressId;
+  private int readyForEventsSendInProgressId;
+  private int readyForEventsSendFailedId;
+  private int readyForEventsSendId;
+  private int readyForEventsSendDurationId;
+  private int readyForEventsTimedOutId;
+  private int readyForEventsFailedId;
+  private int readyForEventsId;
+  private int readyForEventsDurationId;
+
+  private int makePrimaryInProgressId;
+  private int makePrimarySendInProgressId;
+  private int makePrimarySendFailedId;
+  private int makePrimarySendId;
+  private int makePrimarySendDurationId;
+  private int makePrimaryTimedOutId;
+  private int makePrimaryFailedId;
+  private int makePrimaryId;
+  private int makePrimaryDurationId;
+
+  private int closeConInProgressId;
+  private int closeConSendInProgressId;
+  private int closeConSendFailedId;
+  private int closeConSendId;
+  private int closeConSendDurationId;
+  private int closeConTimedOutId;
+  private int closeConFailedId;
+  private int closeConId;
+  private int closeConDurationId;
+
+  private int primaryAckInProgressId;
+  private int primaryAckSendInProgressId;
+  private int primaryAckSendFailedId;
+  private int primaryAckSendId;
+  private int primaryAckSendDurationId;
+  private int primaryAckTimedOutId;
+  private int primaryAckFailedId;
+  private int primaryAckId;
+  private int primaryAckDurationId;
+
+  private int pingInProgressId;
+  private int pingSendInProgressId;
+  private int pingSendFailedId;
+  private int pingSendId;
+  private int pingSendDurationId;
+  private int pingTimedOutId;
+  private int pingFailedId;
+  private int pingId;
+  private int pingDurationId;
+
+  private int registerInstantiatorsInProgressId;
+  private int registerInstantiatorsSendInProgressId;
+  private int registerInstantiatorsSendFailedId;
+  private int registerInstantiatorsSendId;
+  private int registerInstantiatorsSendDurationId;
+  private int registerInstantiatorsTimedOutId;
+  private int registerInstantiatorsFailedId;
+  private int registerInstantiatorsId;
+  private int registerInstantiatorsDurationId;
+
+  private int registerDataSerializersInProgressId;
+  private int registerDataSerializersSendInProgressId;
+  private int registerDataSerializersSendFailedId;
+  private int registerDataSerializersSendId;
+  private int registerDataSerializersSendDurationId;
+  private int registerDataSerializersTimedOutId;
+  private int registerDataSerializersFailedId;
+  private int registerDataSerializersId;
+  private int registerDataSerializersDurationId;
+
+  private int putAllInProgressId;
+  private int putAllSendInProgressId;
+  private int putAllSendFailedId;
+  private int putAllSendId;
+  private int putAllSendDurationId;
+  private int putAllTimedOutId;
+  private int putAllFailedId;
+  private int putAllId;
+  private int putAllDurationId;
+
+  private int removeAllInProgressId;
+  private int removeAllSendInProgressId;
+  private int removeAllSendFailedId;
+  private int removeAllSendId;
+  private int removeAllSendDurationId;
+  private int removeAllTimedOutId;
+  private int removeAllFailedId;
+  private int removeAllId;
+  private int removeAllDurationId;
+
+  private int getAllInProgressId;
+  private int getAllSendInProgressId;
+  private int getAllSendFailedId;
+  private int getAllSendId;
+  private int getAllSendDurationId;
+  private int getAllTimedOutId;
+  private int getAllFailedId;
+  private int getAllId;
+  private int getAllDurationId;
+
+  private int connectionsId;
+  private int connectsId;
+  private int disconnectsId;
+  private int messagesBeingReceivedId;
+  private int messageBytesBeingReceivedId;
+  private int receivedBytesId;
+  private int sentBytesId;
+
+  private int executeFunctionInProgressId;
+  private int executeFunctionSendInProgressId;
+  private int executeFunctionSendFailedId;
+  private int executeFunctionSendId;
+  private int executeFunctionSendDurationId;
+  private int executeFunctionTimedOutId;
+  private int executeFunctionFailedId;
+  private int executeFunctionId;
+  private int executeFunctionDurationId;
+
+  private int getClientPRMetadataInProgressId;
+  private int getClientPRMetadataSendInProgressId;
+  private int getClientPRMetadataSendFailedId;
+  private int getClientPRMetadataSendId;
+  private int getClientPRMetadataSendDurationId;
+  private int getClientPRMetadataTimedOutId;
+  private int getClientPRMetadataFailedId;
+  private int getClientPRMetadataId;
+  private int getClientPRMetadataDurationId;
+
+  private int getClientPartitionAttributesInProgressId;
+  private int getClientPartitionAttributesSendInProgressId;
+  private int getClientPartitionAttributesSendFailedId;
+  private int getClientPartitionAttributesSendId;
+  private int getClientPartitionAttributesSendDurationId;
+  private int getClientPartitionAttributesTimedOutId;
+  private int getClientPartitionAttributesFailedId;
+  private int getClientPartitionAttributesId;
+  private int getClientPartitionAttributesDurationId;
+
+  private int getPDXIdForTypeInProgressId;
+  private int getPDXIdForTypeSendInProgressId;
+  private int getPDXIdForTypeSendFailedId;
+  private int getPDXIdForTypeSendId;
+  private int getPDXIdForTypeSendDurationId;
+  private int getPDXIdForTypeTimedOutId;
+  private int getPDXIdForTypeFailedId;
+  private int getPDXIdForTypeId;
+  private int getPDXIdForTypeDurationId;
+
+  private int getPDXTypeByIdInProgressId;
+  private int getPDXTypeByIdSendInProgressId;
+  private int getPDXTypeByIdSendFailedId;
+  private int getPDXTypeByIdSendId;
+  private int getPDXTypeByIdSendDurationId;
+  private int getPDXTypeByIdTimedOutId;
+  private int getPDXTypeByIdFailedId;
+  private int getPDXTypeByIdId;
+  private int getPDXTypeByIdDurationId;
+
+  private int addPdxTypeInProgressId;
+  private int addPdxTypeSendInProgressId;
+  private int addPdxTypeSendFailedId;
+  private int addPdxTypeSendId;
+  private int addPdxTypeSendDurationId;
+  private int addPdxTypeTimedOutId;
+  private int addPdxTypeFailedId;
+  private int addPdxTypeId;
+  private int addPdxTypeDurationId;
 
 
   // An array of all of the ids that represent operation statistics. This
@@ -441,856 +441,844 @@ public class ConnectionStats implements MessageStats {
   // into a total value for all operations.
   private static int[] opIds;
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     try {
-      StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-      type = f.createType("ClientStats", "Statistics about client to server communication",
+      type = factory.createType("ClientStats", "Statistics about client to server communication",
           new StatisticDescriptor[] {
-              ///////////////////////////////////////////////////////////////////////
-              /*
-               * f.createIntGauge("opsInProgress", "Current number of ops being executed", "ops"),
-               * f.createIntCounter("ops", "Total number of ops completed successfully", "ops"),
-               * f.createIntCounter("opFailures", "Total number of op attempts that have failed",
-               * "ops"), f.createIntCounter("opTimeouts",
-               * "Total number of op attempts that have timed out", "ops"),
-               * f.createLongCounter("opTime",
-               * "Total amount of time, in nanoseconds spent doing ops", "nanoseconds"),
-               */
-              ///////////////////////////////////////////////////////////////////////
-              f.createIntGauge("getsInProgress", "Current number of gets being executed", "gets"),
-              f.createIntCounter("gets", "Total number of gets completed successfully", "gets"),
-              f.createIntCounter("getFailures", "Total number of get attempts that have failed",
+              factory.createIntGauge("getsInProgress", "Current number of gets being executed", "gets"),
+              factory.createIntCounter("gets", "Total number of gets completed successfully", "gets"),
+              factory.createIntCounter("getFailures", "Total number of get attempts that have failed",
                   "gets"),
-              f.createIntCounter("getTimeouts", "Total number of get attempts that have timed out",
+              factory.createIntCounter("getTimeouts", "Total number of get attempts that have timed out",
                   "gets"),
-              f.createLongCounter("getTime",
+              factory.createLongCounter("getTime",
                   "Total amount of time, in nanoseconds spent doing gets", "nanoseconds"),
-              f.createIntGauge("putsInProgress", "Current number of puts being executed", "puts"),
-              f.createIntCounter("puts", "Total number of puts completed successfully", "puts"),
-              f.createIntCounter("putFailures", "Total number of put attempts that have failed",
+              factory.createIntGauge("putsInProgress", "Current number of puts being executed", "puts"),
+              factory.createIntCounter("puts", "Total number of puts completed successfully", "puts"),
+              factory.createIntCounter("putFailures", "Total number of put attempts that have failed",
                   "puts"),
-              f.createIntCounter("putTimeouts", "Total number of put attempts that have timed out",
+              factory.createIntCounter("putTimeouts", "Total number of put attempts that have timed out",
                   "puts"),
-              f.createLongCounter("putTime",
+              factory.createLongCounter("putTime",
                   "Total amount of time, in nanoseconds spent doing puts", "nanoseconds"),
-              f.createIntGauge("destroysInProgress", "Current number of destroys being executed",
+              factory.createIntGauge("destroysInProgress", "Current number of destroys being executed",
                   "destroys"),
-              f.createIntCounter("destroys", "Total number of destroys completed successfully",
+              factory.createIntCounter("destroys", "Total number of destroys completed successfully",
                   "destroys"),
-              f.createIntCounter("destroyFailures",
+              factory.createIntCounter("destroyFailures",
                   "Total number of destroy attempts that have failed", "destroys"),
-              f.createIntCounter("destroyTimeouts",
+              factory.createIntCounter("destroyTimeouts",
                   "Total number of destroy attempts that have timed out", "destroys"),
-              f.createLongCounter("destroyTime",
+              factory.createLongCounter("destroyTime",
                   "Total amount of time, in nanoseconds spent doing destroys", "nanoseconds"),
-              f.createIntGauge("destroyRegionsInProgress",
+              factory.createIntGauge("destroyRegionsInProgress",
                   "Current number of destroyRegions being executed", "destroyRegions"),
-              f.createIntCounter("destroyRegions",
+              factory.createIntCounter("destroyRegions",
                   "Total number of destroyRegions completed successfully", "destroyRegions"),
-              f.createIntCounter("destroyRegionFailures",
+              factory.createIntCounter("destroyRegionFailures",
                   "Total number of destroyRegion attempts that have failed", "destroyRegions"),
-              f.createIntCounter("destroyRegionTimeouts",
+              factory.createIntCounter("destroyRegionTimeouts",
                   "Total number of destroyRegion attempts that have timed out", "destroyRegions"),
-              f.createLongCounter("destroyRegionTime",
+              factory.createLongCounter("destroyRegionTime",
                   "Total amount of time, in nanoseconds spent doing destroyRegions", "nanoseconds"),
-              f.createIntGauge("clearsInProgress", "Current number of clears being executed",
+              factory.createIntGauge("clearsInProgress", "Current number of clears being executed",
                   "clears"),
-              f.createIntCounter("clears", "Total number of clears completed successfully",
+              factory.createIntCounter("clears", "Total number of clears completed successfully",
                   "clears"),
-              f.createIntCounter("clearFailures", "Total number of clear attempts that have failed",
+              factory.createIntCounter("clearFailures", "Total number of clear attempts that have failed",
                   "clears"),
-              f.createIntCounter("clearTimeouts",
+              factory.createIntCounter("clearTimeouts",
                   "Total number of clear attempts that have timed out", "clears"),
-              f.createLongCounter("clearTime",
+              factory.createLongCounter("clearTime",
                   "Total amount of time, in nanoseconds spent doing clears", "nanoseconds"),
-              f.createIntGauge("containsKeysInProgress",
+              factory.createIntGauge("containsKeysInProgress",
                   "Current number of containsKeys being executed", "containsKeys"),
-              f.createIntCounter("containsKeys",
+              factory.createIntCounter("containsKeys",
                   "Total number of containsKeys completed successfully", "containsKeys"),
-              f.createIntCounter("containsKeyFailures",
+              factory.createIntCounter("containsKeyFailures",
                   "Total number of containsKey attempts that have failed", "containsKeys"),
-              f.createIntCounter("containsKeyTimeouts",
+              factory.createIntCounter("containsKeyTimeouts",
                   "Total number of containsKey attempts that have timed out", "containsKeys"),
-              f.createLongCounter("containsKeyTime",
+              factory.createLongCounter("containsKeyTime",
                   "Total amount of time, in nanoseconds spent doing containsKeys", "nanoseconds"),
-              f.createIntGauge("keySetsInProgress", "Current number of keySets being executed",
+              factory.createIntGauge("keySetsInProgress", "Current number of keySets being executed",
                   "keySets"),
-              f.createIntCounter("keySets", "Total number of keySets completed successfully",
+              factory.createIntCounter("keySets", "Total number of keySets completed successfully",
                   "keySets"),
-              f.createIntCounter("keySetFailures",
+              factory.createIntCounter("keySetFailures",
                   "Total number of keySet attempts that have failed", "keySets"),
-              f.createIntCounter("keySetTimeouts",
+              factory.createIntCounter("keySetTimeouts",
                   "Total number of keySet attempts that have timed out", "keySets"),
-              f.createLongCounter("keySetTime",
+              factory.createLongCounter("keySetTime",
                   "Total amount of time, in nanoseconds spent doing keySets", "nanoseconds"),
 
-              f.createIntGauge("commitsInProgress", "Current number of commits being executed",
+              factory.createIntGauge("commitsInProgress", "Current number of commits being executed",
                   "commits"),
-              f.createIntCounter("commits", "Total number of commits completed successfully",
+              factory.createIntCounter("commits", "Total number of commits completed successfully",
                   "commits"),
-              f.createIntCounter("commitFailures",
+              factory.createIntCounter("commitFailures",
                   "Total number of commit attempts that have failed", "commits"),
-              f.createIntCounter("commitTimeouts",
+              factory.createIntCounter("commitTimeouts",
                   "Total number of commit attempts that have timed out", "commits"),
-              f.createLongCounter("commitTime",
+              factory.createLongCounter("commitTime",
                   "Total amount of time, in nanoseconds spent doing commits", "nanoseconds"),
 
-              f.createIntGauge("rollbacksInProgress", "Current number of rollbacks being executed",
+              factory.createIntGauge("rollbacksInProgress", "Current number of rollbacks being executed",
                   "rollbacks"),
-              f.createIntCounter("rollbacks", "Total number of rollbacks completed successfully",
+              factory.createIntCounter("rollbacks", "Total number of rollbacks completed successfully",
                   "rollbacks"),
-              f.createIntCounter("rollbackFailures",
+              factory.createIntCounter("rollbackFailures",
                   "Total number of rollback attempts that have failed", "rollbacks"),
-              f.createIntCounter("rollbackTimeouts",
+              factory.createIntCounter("rollbackTimeouts",
                   "Total number of rollback attempts that have timed out", "rollbacks"),
-              f.createLongCounter("rollbackTime",
+              factory.createLongCounter("rollbackTime",
                   "Total amount of time, in nanoseconds spent doing rollbacks", "nanoseconds"),
 
-              f.createIntGauge("getEntrysInProgress",
+              factory.createIntGauge("getEntrysInProgress",
                   "Current number of getEntry messages being executed", "messages"),
-              f.createIntCounter("getEntrys",
+              factory.createIntCounter("getEntrys",
                   "Total number of getEntry messages completed successfully", "messages"),
-              f.createIntCounter("getEntryFailures",
+              factory.createIntCounter("getEntryFailures",
                   "Total number of getEntry attempts that have failed", "attempts"),
-              f.createIntCounter("getEntryTimeouts",
+              factory.createIntCounter("getEntryTimeouts",
                   "Total number of getEntry attempts that have timed out", "attempts"),
-              f.createLongCounter("getEntryTime",
+              factory.createLongCounter("getEntryTime",
                   "Total amount of time, in nanoseconds spent doing getEntry processings",
                   "nanoseconds"),
 
-              f.createIntGauge("jtaSynchronizationsInProgress",
+              factory.createIntGauge("jtaSynchronizationsInProgress",
                   "Current number of jtaSynchronizations being executed", "sizes"),
-              f.createIntCounter("jtaSynchronizations",
+              factory.createIntCounter("jtaSynchronizations",
                   "Total number of jtaSynchronizations completed successfully",
                   "jtaSynchronizations"),
-              f.createIntCounter("jtaSynchronizationFailures",
+              factory.createIntCounter("jtaSynchronizationFailures",
                   "Total number of jtaSynchronization attempts that have failed",
                   "jtaSynchronizations"),
-              f.createIntCounter("jtaSynchronizationTimeouts",
+              factory.createIntCounter("jtaSynchronizationTimeouts",
                   "Total number of jtaSynchronization attempts that have timed out",
                   "jtaSynchronizations"),
-              f.createLongCounter("jtaSynchronizationTime",
+              factory.createLongCounter("jtaSynchronizationTime",
                   "Total amount of time, in nanoseconds spent doing jtaSynchronizations",
                   "nanoseconds"),
 
-              f.createIntGauge("txFailoversInProgress",
+              factory.createIntGauge("txFailoversInProgress",
                   "Current number of txFailovers being executed", "txFailovers"),
-              f.createIntCounter("txFailovers",
+              factory.createIntCounter("txFailovers",
                   "Total number of txFailovers completed successfully", "txFailovers"),
-              f.createIntCounter("txFailoverFailures",
+              factory.createIntCounter("txFailoverFailures",
                   "Total number of txFailover attempts that have failed", "txFailovers"),
-              f.createIntCounter("txFailoverTimeouts",
+              factory.createIntCounter("txFailoverTimeouts",
                   "Total number of txFailover attempts that have timed out", "sizes"),
-              f.createLongCounter("txFailoverTime",
+              factory.createLongCounter("txFailoverTime",
                   "Total amount of time, in nanoseconds spent doing txFailovers", "nanoseconds"),
 
-              f.createIntGauge("sizesInProgress", "Current number of sizes being executed",
+              factory.createIntGauge("sizesInProgress", "Current number of sizes being executed",
                   "sizes"),
-              f.createIntCounter("sizes", "Total number of sizes completed successfully", "sizes"),
-              f.createIntCounter("sizeFailures", "Total number of size attempts that have failed",
+              factory.createIntCounter("sizes", "Total number of sizes completed successfully", "sizes"),
+              factory.createIntCounter("sizeFailures", "Total number of size attempts that have failed",
                   "sizes"),
-              f.createIntCounter("sizeTimeouts",
+              factory.createIntCounter("sizeTimeouts",
                   "Total number of size attempts that have timed out", "sizes"),
-              f.createLongCounter("sizeTime",
+              factory.createLongCounter("sizeTime",
                   "Total amount of time, in nanoseconds spent doing sizes", "nanoseconds"),
 
-              f.createIntGauge("invalidatesInProgress",
+              factory.createIntGauge("invalidatesInProgress",
                   "Current number of invalidates being executed", "invalidates"),
-              f.createIntCounter("invalidates",
+              factory.createIntCounter("invalidates",
                   "Total number of invalidates completed successfully", "invalidates"),
-              f.createIntCounter("invalidateFailures",
+              factory.createIntCounter("invalidateFailures",
                   "Total number of invalidate attempts that have failed", "invalidates"),
-              f.createIntCounter("invalidateTimeouts",
+              factory.createIntCounter("invalidateTimeouts",
                   "Total number of invalidate attempts that have timed out", "invalidates"),
-              f.createLongCounter("invalidateTime",
+              factory.createLongCounter("invalidateTime",
                   "Total amount of time, in nanoseconds spent doing invalidates", "nanoseconds"),
 
 
-              f.createIntGauge("registerInterestsInProgress",
+              factory.createIntGauge("registerInterestsInProgress",
                   "Current number of registerInterests being executed", "registerInterests"),
-              f.createIntCounter("registerInterests",
+              factory.createIntCounter("registerInterests",
                   "Total number of registerInterests completed successfully", "registerInterests"),
-              f.createIntCounter("registerInterestFailures",
+              factory.createIntCounter("registerInterestFailures",
                   "Total number of registerInterest attempts that have failed",
                   "registerInterests"),
-              f.createIntCounter("registerInterestTimeouts",
+              factory.createIntCounter("registerInterestTimeouts",
                   "Total number of registerInterest attempts that have timed out",
                   "registerInterests"),
-              f.createLongCounter("registerInterestTime",
+              factory.createLongCounter("registerInterestTime",
                   "Total amount of time, in nanoseconds spent doing registerInterests",
                   "nanoseconds"),
-              f.createIntGauge("unregisterInterestsInProgress",
+              factory.createIntGauge("unregisterInterestsInProgress",
                   "Current number of unregisterInterests being executed", "unregisterInterests"),
-              f.createIntCounter("unregisterInterests",
+              factory.createIntCounter("unregisterInterests",
                   "Total number of unregisterInterests completed successfully",
                   "unregisterInterests"),
-              f.createIntCounter("unregisterInterestFailures",
+              factory.createIntCounter("unregisterInterestFailures",
                   "Total number of unregisterInterest attempts that have failed",
                   "unregisterInterests"),
-              f.createIntCounter("unregisterInterestTimeouts",
+              factory.createIntCounter("unregisterInterestTimeouts",
                   "Total number of unregisterInterest attempts that have timed out",
                   "unregisterInterests"),
-              f.createLongCounter("unregisterInterestTime",
+              factory.createLongCounter("unregisterInterestTime",
                   "Total amount of time, in nanoseconds spent doing unregisterInterests",
                   "nanoseconds"),
-              f.createIntGauge("querysInProgress", "Current number of querys being executed",
+              factory.createIntGauge("querysInProgress", "Current number of querys being executed",
                   "querys"),
-              f.createIntCounter("querys", "Total number of querys completed successfully",
+              factory.createIntCounter("querys", "Total number of querys completed successfully",
                   "querys"),
-              f.createIntCounter("queryFailures", "Total number of query attempts that have failed",
+              factory.createIntCounter("queryFailures", "Total number of query attempts that have failed",
                   "querys"),
-              f.createIntCounter("queryTimeouts",
+              factory.createIntCounter("queryTimeouts",
                   "Total number of query attempts that have timed out", "querys"),
-              f.createLongCounter("queryTime",
+              factory.createLongCounter("queryTime",
                   "Total amount of time, in nanoseconds spent doing querys", "nanoseconds"),
-              f.createIntGauge("createCQsInProgress", "Current number of createCQs being executed",
+              factory.createIntGauge("createCQsInProgress", "Current number of createCQs being executed",
                   "createCQs"),
-              f.createIntCounter("createCQs", "Total number of createCQs completed successfully",
+              factory.createIntCounter("createCQs", "Total number of createCQs completed successfully",
                   "createCQs"),
-              f.createIntCounter("createCQFailures",
+              factory.createIntCounter("createCQFailures",
                   "Total number of createCQ attempts that have failed", "createCQs"),
-              f.createIntCounter("createCQTimeouts",
+              factory.createIntCounter("createCQTimeouts",
                   "Total number of createCQ attempts that have timed out", "createCQs"),
-              f.createLongCounter("createCQTime",
+              factory.createLongCounter("createCQTime",
                   "Total amount of time, in nanoseconds spent doing createCQs", "nanoseconds"),
-              f.createIntGauge("stopCQsInProgress", "Current number of stopCQs being executed",
+              factory.createIntGauge("stopCQsInProgress", "Current number of stopCQs being executed",
                   "stopCQs"),
-              f.createIntCounter("stopCQs", "Total number of stopCQs completed successfully",
+              factory.createIntCounter("stopCQs", "Total number of stopCQs completed successfully",
                   "stopCQs"),
-              f.createIntCounter("stopCQFailures",
+              factory.createIntCounter("stopCQFailures",
                   "Total number of stopCQ attempts that have failed", "stopCQs"),
-              f.createIntCounter("stopCQTimeouts",
+              factory.createIntCounter("stopCQTimeouts",
                   "Total number of stopCQ attempts that have timed out", "stopCQs"),
-              f.createLongCounter("stopCQTime",
+              factory.createLongCounter("stopCQTime",
                   "Total amount of time, in nanoseconds spent doing stopCQs", "nanoseconds"),
-              f.createIntGauge("closeCQsInProgress", "Current number of closeCQs being executed",
+              factory.createIntGauge("closeCQsInProgress", "Current number of closeCQs being executed",
                   "closeCQs"),
-              f.createIntCounter("closeCQs", "Total number of closeCQs completed successfully",
+              factory.createIntCounter("closeCQs", "Total number of closeCQs completed successfully",
                   "closeCQs"),
-              f.createIntCounter("closeCQFailures",
+              factory.createIntCounter("closeCQFailures",
                   "Total number of closeCQ attempts that have failed", "closeCQs"),
-              f.createIntCounter("closeCQTimeouts",
+              factory.createIntCounter("closeCQTimeouts",
                   "Total number of closeCQ attempts that have timed out", "closeCQs"),
-              f.createLongCounter("closeCQTime",
+              factory.createLongCounter("closeCQTime",
                   "Total amount of time, in nanoseconds spent doing closeCQs", "nanoseconds"),
-              f.createIntGauge("gatewayBatchsInProgress",
+              factory.createIntGauge("gatewayBatchsInProgress",
                   "Current number of gatewayBatchs being executed", "gatewayBatchs"),
-              f.createIntCounter("gatewayBatchs",
+              factory.createIntCounter("gatewayBatchs",
                   "Total number of gatewayBatchs completed successfully", "gatewayBatchs"),
-              f.createIntCounter("gatewayBatchFailures",
+              factory.createIntCounter("gatewayBatchFailures",
                   "Total number of gatewayBatch attempts that have failed", "gatewayBatchs"),
-              f.createIntCounter("gatewayBatchTimeouts",
+              factory.createIntCounter("gatewayBatchTimeouts",
                   "Total number of gatewayBatch attempts that have timed out", "gatewayBatchs"),
-              f.createLongCounter("gatewayBatchTime",
+              factory.createLongCounter("gatewayBatchTime",
                   "Total amount of time, in nanoseconds spent doing gatewayBatchs", "nanoseconds"),
-              f.createIntGauge("getDurableCQsInProgress",
+              factory.createIntGauge("getDurableCQsInProgress",
                   "Current number of getDurableCQs being executed", "getDurableCQs"),
-              f.createIntCounter("getDurableCQs",
+              factory.createIntCounter("getDurableCQs",
                   "Total number of getDurableCQs completed successfully", "getDurableCQs"),
-              f.createIntCounter("getDurableCQsFailures",
+              factory.createIntCounter("getDurableCQsFailures",
                   "Total number of getDurableCQs attempts that have failed", "getDurableCQs"),
-              f.createIntCounter("getDurableCQsTimeouts",
+              factory.createIntCounter("getDurableCQsTimeouts",
                   "Total number of getDurableCQs attempts that have timed out", "getDurableCQs"),
-              f.createLongCounter("getDurableCQsTime",
+              factory.createLongCounter("getDurableCQsTime",
                   "Total amount of time, in nanoseconds spent doing getDurableCQs", "nanoseconds"),
-              f.createIntGauge("readyForEventsInProgress",
+              factory.createIntGauge("readyForEventsInProgress",
                   "Current number of readyForEvents being executed", "readyForEvents"),
-              f.createIntCounter("readyForEvents",
+              factory.createIntCounter("readyForEvents",
                   "Total number of readyForEvents completed successfully", "readyForEvents"),
-              f.createIntCounter("readyForEventsFailures",
+              factory.createIntCounter("readyForEventsFailures",
                   "Total number of readyForEvents attempts that have failed", "readyForEvents"),
-              f.createIntCounter("readyForEventsTimeouts",
+              factory.createIntCounter("readyForEventsTimeouts",
                   "Total number of readyForEvents attempts that have timed out", "readyForEvents"),
-              f.createLongCounter("readyForEventsTime",
+              factory.createLongCounter("readyForEventsTime",
                   "Total amount of time, in nanoseconds spent doing readyForEvents", "nanoseconds"),
-              f.createIntGauge("makePrimarysInProgress",
+              factory.createIntGauge("makePrimarysInProgress",
                   "Current number of makePrimarys being executed", "makePrimarys"),
-              f.createIntCounter("makePrimarys",
+              factory.createIntCounter("makePrimarys",
                   "Total number of makePrimarys completed successfully", "makePrimarys"),
-              f.createIntCounter("makePrimaryFailures",
+              factory.createIntCounter("makePrimaryFailures",
                   "Total number of makePrimary attempts that have failed", "makePrimarys"),
-              f.createIntCounter("makePrimaryTimeouts",
+              factory.createIntCounter("makePrimaryTimeouts",
                   "Total number of makePrimary attempts that have timed out", "makePrimarys"),
-              f.createLongCounter("makePrimaryTime",
+              factory.createLongCounter("makePrimaryTime",
                   "Total amount of time, in nanoseconds spent doing makePrimarys", "nanoseconds"),
 
-              f.createIntGauge("closeConsInProgress", "Current number of closeCons being executed",
+              factory.createIntGauge("closeConsInProgress", "Current number of closeCons being executed",
                   "closeCons"),
-              f.createIntCounter("closeCons", "Total number of closeCons completed successfully",
+              factory.createIntCounter("closeCons", "Total number of closeCons completed successfully",
                   "closeCons"),
-              f.createIntCounter("closeConFailures",
+              factory.createIntCounter("closeConFailures",
                   "Total number of closeCon attempts that have failed", "closeCons"),
-              f.createIntCounter("closeConTimeouts",
+              factory.createIntCounter("closeConTimeouts",
                   "Total number of closeCon attempts that have timed out", "closeCons"),
-              f.createLongCounter("closeConTime",
+              factory.createLongCounter("closeConTime",
                   "Total amount of time, in nanoseconds spent doing closeCons", "nanoseconds"),
 
-              f.createIntGauge("primaryAcksInProgress",
+              factory.createIntGauge("primaryAcksInProgress",
                   "Current number of primaryAcks being executed", "primaryAcks"),
-              f.createIntCounter("primaryAcks",
+              factory.createIntCounter("primaryAcks",
                   "Total number of primaryAcks completed successfully", "primaryAcks"),
-              f.createIntCounter("primaryAckFailures",
+              factory.createIntCounter("primaryAckFailures",
                   "Total number of primaryAck attempts that have failed", "primaryAcks"),
-              f.createIntCounter("primaryAckTimeouts",
+              factory.createIntCounter("primaryAckTimeouts",
                   "Total number of primaryAck attempts that have timed out", "primaryAcks"),
-              f.createLongCounter("primaryAckTime",
+              factory.createLongCounter("primaryAckTime",
                   "Total amount of time, in nanoseconds spent doing primaryAcks", "nanoseconds"),
 
-              f.createIntGauge("pingsInProgress", "Current number of pings being executed",
+              factory.createIntGauge("pingsInProgress", "Current number of pings being executed",
                   "pings"),
-              f.createIntCounter("pings", "Total number of pings completed successfully", "pings"),
-              f.createIntCounter("pingFailures", "Total number of ping attempts that have failed",
+              factory.createIntCounter("pings", "Total number of pings completed successfully", "pings"),
+              factory.createIntCounter("pingFailures", "Total number of ping attempts that have failed",
                   "pings"),
-              f.createIntCounter("pingTimeouts",
+              factory.createIntCounter("pingTimeouts",
                   "Total number of ping attempts that have timed out", "pings"),
-              f.createLongCounter("pingTime",
+              factory.createLongCounter("pingTime",
                   "Total amount of time, in nanoseconds spent doing pings", "nanoseconds"),
 
-              f.createIntGauge("registerInstantiatorsInProgress",
+              factory.createIntGauge("registerInstantiatorsInProgress",
                   "Current number of registerInstantiators being executed",
                   "registerInstantiators"),
-              f.createIntCounter("registerInstantiators",
+              factory.createIntCounter("registerInstantiators",
                   "Total number of registerInstantiators completed successfully",
                   "registerInstantiators"),
-              f.createIntCounter("registerInstantiatorsFailures",
+              factory.createIntCounter("registerInstantiatorsFailures",
                   "Total number of registerInstantiators attempts that have failed",
                   "registerInstantiators"),
-              f.createIntCounter("registerInstantiatorsTimeouts",
+              factory.createIntCounter("registerInstantiatorsTimeouts",
                   "Total number of registerInstantiators attempts that have timed out",
                   "registerInstantiators"),
-              f.createLongCounter("registerInstantiatorsTime",
+              factory.createLongCounter("registerInstantiatorsTime",
                   "Total amount of time, in nanoseconds spent doing registerInstantiators",
                   "nanoseconds"),
 
-              f.createIntGauge("registerDataSerializersInProgress",
+              factory.createIntGauge("registerDataSerializersInProgress",
                   "Current number of registerDataSerializers being executed",
                   "registerDataSerializers"),
-              f.createIntCounter("registerDataSerializers",
+              factory.createIntCounter("registerDataSerializers",
                   "Total number of registerDataSerializers completed successfully",
                   "registerDataSerializers"),
-              f.createIntCounter("registerDataSerializersFailures",
+              factory.createIntCounter("registerDataSerializersFailures",
                   "Total number of registerDataSerializers attempts that have failed",
                   "registerDataSerializers"),
-              f.createIntCounter("registerDataSerializersTimeouts",
+              factory.createIntCounter("registerDataSerializersTimeouts",
                   "Total number of registerDataSerializers attempts that have timed out",
                   "registerDataSerializers"),
-              f.createLongCounter("registerDataSerializersTime",
+              factory.createLongCounter("registerDataSerializersTime",
                   "Total amount of time, in nanoseconds spent doing registerDataSerializers",
                   "nanoseconds"),
 
-              f.createIntGauge("connections", "Current number of connections", "connections"),
-              f.createIntCounter("connects", "Total number of times a connection has been created.",
+              factory.createIntGauge("connections", "Current number of connections", "connections"),
+              factory.createIntCounter("connects", "Total number of times a connection has been created.",
                   "connects"),
-              f.createIntCounter("disconnects",
+              factory.createIntCounter("disconnects",
                   "Total number of times a connection has been destroyed.", "disconnects"),
-              f.createIntGauge("putAllsInProgress", "Current number of putAlls being executed",
+              factory.createIntGauge("putAllsInProgress", "Current number of putAlls being executed",
                   "putAlls"),
-              f.createIntCounter("putAlls", "Total number of putAlls completed successfully",
+              factory.createIntCounter("putAlls", "Total number of putAlls completed successfully",
                   "putAlls"),
-              f.createIntCounter("putAllFailures",
+              factory.createIntCounter("putAllFailures",
                   "Total number of putAll attempts that have failed", "putAlls"),
-              f.createIntCounter("putAllTimeouts",
+              factory.createIntCounter("putAllTimeouts",
                   "Total number of putAll attempts that have timed out", "putAlls"),
-              f.createLongCounter("putAllTime",
+              factory.createLongCounter("putAllTime",
                   "Total amount of time, in nanoseconds spent doing putAlls", "nanoseconds"),
-              f.createIntGauge("removeAllsInProgress",
+              factory.createIntGauge("removeAllsInProgress",
                   "Current number of removeAlls being executed", "removeAlls"),
-              f.createIntCounter("removeAlls", "Total number of removeAlls completed successfully",
+              factory.createIntCounter("removeAlls", "Total number of removeAlls completed successfully",
                   "removeAlls"),
-              f.createIntCounter("removeAllFailures",
+              factory.createIntCounter("removeAllFailures",
                   "Total number of removeAll attempts that have failed", "removeAlls"),
-              f.createIntCounter("removeAllTimeouts",
+              factory.createIntCounter("removeAllTimeouts",
                   "Total number of removeAll attempts that have timed out", "removeAlls"),
-              f.createLongCounter("removeAllTime",
+              factory.createLongCounter("removeAllTime",
                   "Total amount of time, in nanoseconds spent doing removeAlls", "nanoseconds"),
-              f.createIntGauge("getAllsInProgress", "Current number of getAlls being executed",
+              factory.createIntGauge("getAllsInProgress", "Current number of getAlls being executed",
                   "getAlls"),
-              f.createIntCounter("getAlls", "Total number of getAlls completed successfully",
+              factory.createIntCounter("getAlls", "Total number of getAlls completed successfully",
                   "getAlls"),
-              f.createIntCounter("getAllFailures",
+              factory.createIntCounter("getAllFailures",
                   "Total number of getAll attempts that have failed", "getAlls"),
-              f.createIntCounter("getAllTimeouts",
+              factory.createIntCounter("getAllTimeouts",
                   "Total number of getAll attempts that have timed out", "getAlls"),
-              f.createLongCounter("getAllTime",
+              factory.createLongCounter("getAllTime",
                   "Total amount of time, in nanoseconds spent doing getAlls", "nanoseconds"),
-              f.createLongCounter("receivedBytes",
+              factory.createLongCounter("receivedBytes",
                   "Total number of bytes received (as responses) from server over a client-to-server connection.",
                   "bytes"),
-              f.createLongCounter("sentBytes",
+              factory.createLongCounter("sentBytes",
                   "Total number of bytes sent to server over a client-to-server connection.",
                   "bytes"),
-              f.createIntGauge("messagesBeingReceived",
+              factory.createIntGauge("messagesBeingReceived",
                   "Current number of message being received off the network or being processed after reception over a client-to-server connection.",
                   "messages"),
-              f.createLongGauge("messageBytesBeingReceived",
+              factory.createLongGauge("messageBytesBeingReceived",
                   "Current number of bytes consumed by messages being received or processed over a client-to-server connection.",
                   "bytes"),
 
-              f.createIntGauge("executeFunctionsInProgress",
+              factory.createIntGauge("executeFunctionsInProgress",
                   "Current number of Functions being executed", "executeFunctions"),
-              f.createIntCounter("executeFunctions",
+              factory.createIntCounter("executeFunctions",
                   "Total number of Functions completed successfully", "executeFunctions"),
-              f.createIntCounter("executeFunctionFailures",
+              factory.createIntCounter("executeFunctionFailures",
                   "Total number of Function attempts that have failed", "executeFunctions"),
-              f.createIntCounter("executeFunctionTimeouts",
+              factory.createIntCounter("executeFunctionTimeouts",
                   "Total number of Function attempts that have timed out", "executeFunctions"),
-              f.createLongCounter("executeFunctionTime",
+              factory.createLongCounter("executeFunctionTime",
                   "Total amount of time, in nanoseconds spent doing Functions", "nanoseconds"),
 
-              f.createIntGauge("asyncExecuteFunctionsInProgress",
+              factory.createIntGauge("asyncExecuteFunctionsInProgress",
                   "Current number of Functions being executed asynchronously",
                   "asyncExecuteFunctions"),
-              f.createIntCounter("asyncExecuteFunctions",
+              factory.createIntCounter("asyncExecuteFunctions",
                   "Total number of asynchronous Functions completed successfully",
                   "asyncExecuteFunctions"),
-              f.createIntCounter("asyncExecuteFunctionFailures",
+              factory.createIntCounter("asyncExecuteFunctionFailures",
                   "Total number of asynchronous Function attempts that have failed",
                   "asyncExecuteFunctions"),
-              f.createIntCounter("asyncExecuteFunctionTimeouts",
+              factory.createIntCounter("asyncExecuteFunctionTimeouts",
                   "Total number of asynchronous Function attempts that have timed out",
                   "asyncExecuteFunctions"),
-              f.createLongCounter("asyncExecuteFunctionTime",
+              factory.createLongCounter("asyncExecuteFunctionTime",
                   "Total amount of time, in nanoseconds spent doing asynchronous Functions",
                   "nanoseconds"),
 
-              f.createIntGauge("getClientPRMetadataInProgress",
+              factory.createIntGauge("getClientPRMetadataInProgress",
                   "Current number of getClientPRMetadata operations being executed",
                   "getClientPRMetadata"),
-              f.createIntCounter("getClientPRMetadataFailures",
+              factory.createIntCounter("getClientPRMetadataFailures",
                   "Total number of getClientPRMetadata operation attempts that have failed",
                   "getClientPRMetadata"),
-              f.createIntCounter("getClientPRMetadataSuccessful",
+              factory.createIntCounter("getClientPRMetadataSuccessful",
                   "Total number of getClientPRMetadata operations completed successfully",
                   "getClientPRMetadata"),
-              f.createIntCounter("getClientPRMetadataTimeouts",
+              factory.createIntCounter("getClientPRMetadataTimeouts",
                   "Total number of getClientPRMetadata operation attempts that have timed out",
                   "getClientPRMetadata"),
-              f.createLongCounter("getClientPRMetadataTime",
+              factory.createLongCounter("getClientPRMetadataTime",
                   "Total amount of time, in nanoseconds spent doing getClientPRMetadata successfully/unsuccessfully",
                   "nanoseconds"),
 
-              f.createIntGauge("getClientPartitionAttributesInProgress",
+              factory.createIntGauge("getClientPartitionAttributesInProgress",
                   "Current number of getClientPartitionAttributes operations being executed",
                   "getClientPartitionAttributes"),
-              f.createIntCounter("getClientPartitionAttributesFailures",
+              factory.createIntCounter("getClientPartitionAttributesFailures",
                   "Total number of getClientPartitionAttributes operation attempts that have failed",
                   "getClientPartitionAttributes"),
-              f.createIntCounter("getClientPartitionAttributesSuccessful",
+              factory.createIntCounter("getClientPartitionAttributesSuccessful",
                   "Total number of getClientPartitionAttributes operations completed successfully",
                   "getClientPartitionAttributes"),
-              f.createIntCounter("getClientPartitionAttributesTimeouts",
+              factory.createIntCounter("getClientPartitionAttributesTimeouts",
                   "Total number of getClientPartitionAttributes operation attempts that have timed out",
                   "getClientPartitionAttributes"),
-              f.createLongCounter("getClientPartitionAttributesTime",
+              factory.createLongCounter("getClientPartitionAttributesTime",
                   "Total amount of time, in nanoseconds spent doing getClientPartitionAttributes successfully/unsuccessfully.",
                   "nanoseconds"),
 
-              f.createIntGauge("getPDXTypeByIdInProgress",
+              factory.createIntGauge("getPDXTypeByIdInProgress",
                   "Current number of getPDXTypeById operations being executed", "getPDXTypeById"),
-              f.createIntCounter("getPDXTypeByIdFailures",
+              factory.createIntCounter("getPDXTypeByIdFailures",
                   "Total number of getPDXTypeById operation attempts that have failed",
                   "getPDXTypeById"),
-              f.createIntCounter("getPDXTypeByIdSuccessful",
+              factory.createIntCounter("getPDXTypeByIdSuccessful",
                   "Total number of getPDXTypeById operations completed successfully",
                   "getPDXTypeById"),
-              f.createIntCounter("getPDXTypeByIdTimeouts",
+              factory.createIntCounter("getPDXTypeByIdTimeouts",
                   "Total number of getPDXTypeById operation attempts that have timed out",
                   "getPDXTypeById"),
-              f.createLongCounter("getPDXTypeByIdTime",
+              factory.createLongCounter("getPDXTypeByIdTime",
                   "Total amount of time, in nanoseconds spent doing getPDXTypeById successfully/unsuccessfully.",
                   "nanoseconds"),
 
-              f.createIntGauge("getPDXIdForTypeInProgress",
+              factory.createIntGauge("getPDXIdForTypeInProgress",
                   "Current number of getPDXIdForType operations being executed", "getPDXIdForType"),
-              f.createIntCounter("getPDXIdForTypeFailures",
+              factory.createIntCounter("getPDXIdForTypeFailures",
                   "Total number of getPDXIdForType operation attempts that have failed",
                   "getPDXIdForType"),
-              f.createIntCounter("getPDXIdForTypeSuccessful",
+              factory.createIntCounter("getPDXIdForTypeSuccessful",
                   "Total number of getPDXIdForType operations completed successfully",
                   "getPDXIdForType"),
-              f.createIntCounter("getPDXIdForTypeTimeouts",
+              factory.createIntCounter("getPDXIdForTypeTimeouts",
                   "Total number of getPDXIdForType operation attempts that have timed out",
                   "getPDXIdForType"),
-              f.createLongCounter("getPDXIdForTypeTime",
+              factory.createLongCounter("getPDXIdForTypeTime",
                   "Total amount of time, in nanoseconds spent doing getPDXIdForType successfully/unsuccessfully.",
                   "nanoseconds"),
 
-              f.createIntGauge("addPdxTypeInProgress",
+              factory.createIntGauge("addPdxTypeInProgress",
                   "Current number of addPdxType operations being executed", "addPdxType"),
-              f.createIntCounter("addPdxTypeFailures",
+              factory.createIntCounter("addPdxTypeFailures",
                   "Total number of addPdxType operation attempts that have failed", "addPdxType"),
-              f.createIntCounter("addPdxTypeSuccessful",
+              factory.createIntCounter("addPdxTypeSuccessful",
                   "Total number of addPdxType operations completed successfully", "addPdxType"),
-              f.createIntCounter("addPdxTypeTimeouts",
+              factory.createIntCounter("addPdxTypeTimeouts",
                   "Total number of addPdxType operation attempts that have timed out",
                   "addPdxType"),
-              f.createLongCounter("addPdxTypeTime",
+              factory.createLongCounter("addPdxTypeTime",
                   "Total amount of time, in nanoseconds spent doing addPdxType successfully/unsuccessfully.",
                   "nanoseconds"),});
 
-      sendType = f.createType("ClientSendStats", "Statistics about client to server communication",
+      sendType = factory.createType("ClientSendStats", "Statistics about client to server communication",
           new StatisticDescriptor[] {
               ///////////////////////////////////////////////////////////////////////
               /*
-               * f.createIntGauge("opSendsInProgress", "Current number of op sends being executed",
-               * "sends"), f.createIntCounter("opSends",
+               * factory.createIntGauge("opSendsInProgress", "Current number of op sends being executed",
+               * "sends"), factory.createIntCounter("opSends",
                * "Total number of op sends that have completed successfully", "sends"),
-               * f.createIntCounter("opSendFailures", "Total number of op sends that have failed",
-               * "sends"), f.createLongCounter("opSendTime",
+               * factory.createIntCounter("opSendFailures", "Total number of op sends that have failed",
+               * "sends"), factory.createLongCounter("opSendTime",
                * "Total amount of time, in nanoseconds spent doing op sends", "nanoseconds"),
                */
               ///////////////////////////////////////////////////////////////////////
-              f.createIntGauge("getSendsInProgress", "Current number of get sends being executed",
+              factory.createIntGauge("getSendsInProgress", "Current number of get sends being executed",
                   "sends"),
-              f.createIntCounter("getSends",
+              factory.createIntCounter("getSends",
                   "Total number of get sends that have completed successfully", "sends"),
-              f.createIntCounter("getSendFailures", "Total number of get sends that have failed",
+              factory.createIntCounter("getSendFailures", "Total number of get sends that have failed",
                   "sends"),
-              f.createLongCounter("getSendTime",
+              factory.createLongCounter("getSendTime",
                   "Total amount of time, in nanoseconds spent doing get sends", "nanoseconds"),
-              f.createIntGauge("putSendsInProgress", "Current number of put sends being executed",
+              factory.createIntGauge("putSendsInProgress", "Current number of put sends being executed",
                   "sends"),
-              f.createIntCounter("putSends",
+              factory.createIntCounter("putSends",
                   "Total number of put sends that have completed successfully", "sends"),
-              f.createIntCounter("putSendFailures", "Total number of put sends that have failed",
+              factory.createIntCounter("putSendFailures", "Total number of put sends that have failed",
                   "sends"),
-              f.createLongCounter("putSendTime",
+              factory.createLongCounter("putSendTime",
                   "Total amount of time, in nanoseconds spent doing put sends", "nanoseconds"),
-              f.createIntGauge("destroySendsInProgress",
+              factory.createIntGauge("destroySendsInProgress",
                   "Current number of destroy sends being executed", "sends"),
-              f.createIntCounter("destroySends",
+              factory.createIntCounter("destroySends",
                   "Total number of destroy sends that have completed successfully", "sends"),
-              f.createIntCounter("destroySendFailures",
+              factory.createIntCounter("destroySendFailures",
                   "Total number of destroy sends that have failed", "sends"),
-              f.createLongCounter("destroySendTime",
+              factory.createLongCounter("destroySendTime",
                   "Total amount of time, in nanoseconds spent doing destroy sends", "nanoseconds"),
-              f.createIntGauge("destroyRegionSendsInProgress",
+              factory.createIntGauge("destroyRegionSendsInProgress",
                   "Current number of destroyRegion sends being executed", "sends"),
-              f.createIntCounter("destroyRegionSends",
+              factory.createIntCounter("destroyRegionSends",
                   "Total number of destroyRegion sends that have completed successfully", "sends"),
-              f.createIntCounter("destroyRegionSendFailures",
+              factory.createIntCounter("destroyRegionSendFailures",
                   "Total number of destroyRegion sends that have failed", "sends"),
-              f.createLongCounter("destroyRegionSendTime",
+              factory.createLongCounter("destroyRegionSendTime",
                   "Total amount of time, in nanoseconds spent doing destroyRegion sends",
                   "nanoseconds"),
-              f.createIntGauge("clearSendsInProgress",
+              factory.createIntGauge("clearSendsInProgress",
                   "Current number of clear sends being executed", "sends"),
-              f.createIntCounter("clearSends",
+              factory.createIntCounter("clearSends",
                   "Total number of clear sends that have completed successfully", "sends"),
-              f.createIntCounter("clearSendFailures",
+              factory.createIntCounter("clearSendFailures",
                   "Total number of clear sends that have failed", "sends"),
-              f.createLongCounter("clearSendTime",
+              factory.createLongCounter("clearSendTime",
                   "Total amount of time, in nanoseconds spent doing clear sends", "nanoseconds"),
-              f.createIntGauge("containsKeySendsInProgress",
+              factory.createIntGauge("containsKeySendsInProgress",
                   "Current number of containsKey sends being executed", "sends"),
-              f.createIntCounter("containsKeySends",
+              factory.createIntCounter("containsKeySends",
                   "Total number of containsKey sends that have completed successfully", "sends"),
-              f.createIntCounter("containsKeySendFailures",
+              factory.createIntCounter("containsKeySendFailures",
                   "Total number of containsKey sends that have failed", "sends"),
-              f.createLongCounter("containsKeySendTime",
+              factory.createLongCounter("containsKeySendTime",
                   "Total amount of time, in nanoseconds spent doing containsKey sends",
                   "nanoseconds"),
-              f.createIntGauge("keySetSendsInProgress",
+              factory.createIntGauge("keySetSendsInProgress",
                   "Current number of keySet sends being executed", "sends"),
-              f.createIntCounter("keySetSends",
+              factory.createIntCounter("keySetSends",
                   "Total number of keySet sends that have completed successfully", "sends"),
-              f.createIntCounter("keySetSendFailures",
+              factory.createIntCounter("keySetSendFailures",
                   "Total number of keySet sends that have failed", "sends"),
-              f.createLongCounter("keySetSendTime",
+              factory.createLongCounter("keySetSendTime",
                   "Total amount of time, in nanoseconds spent doing keySet sends", "nanoseconds"),
 
-              f.createIntGauge("commitSendsInProgress",
+              factory.createIntGauge("commitSendsInProgress",
                   "Current number of commit sends being executed", "sends"),
-              f.createIntCounter("commitSendFailures",
+              factory.createIntCounter("commitSendFailures",
                   "Total number of commit sends that have failed", "sends"),
-              f.createIntCounter("commitSends", "Total number of commit sends that have failed",
+              factory.createIntCounter("commitSends", "Total number of commit sends that have failed",
                   "sends"),
-              f.createLongCounter("commitSendTime",
+              factory.createLongCounter("commitSendTime",
                   "Total amount of time, in nanoseconds spent doing commits", "nanoseconds"),
-              f.createIntGauge("rollbackSendsInProgress",
+              factory.createIntGauge("rollbackSendsInProgress",
                   "Current number of rollback sends being executed", "sends"),
-              f.createIntCounter("rollbackSendFailures",
+              factory.createIntCounter("rollbackSendFailures",
                   "Total number of rollback sends that have failed", "sends"),
-              f.createIntCounter("rollbackSends", "Total number of rollback sends that have failed",
+              factory.createIntCounter("rollbackSends", "Total number of rollback sends that have failed",
                   "sends"),
-              f.createLongCounter("rollbackSendTime",
+              factory.createLongCounter("rollbackSendTime",
                   "Total amount of time, in nanoseconds spent doing rollbacks", "nanoseconds"),
-              f.createIntGauge("getEntrySendsInProgress",
+              factory.createIntGauge("getEntrySendsInProgress",
                   "Current number of getEntry sends being executed", "sends"),
-              f.createIntCounter("getEntrySendFailures",
+              factory.createIntCounter("getEntrySendFailures",
                   "Total number of getEntry sends that have failed", "sends"),
-              f.createIntCounter("getEntrySends", "Total number of getEntry sends that have failed",
+              factory.createIntCounter("getEntrySends", "Total number of getEntry sends that have failed",
                   "sends"),
-              f.createLongCounter("getEntrySendTime",
+              factory.createLongCounter("getEntrySendTime",
                   "Total amount of time, in nanoseconds spent sending getEntry messages",
                   "nanoseconds"),
-              f.createIntGauge("jtaSynchronizationSendsInProgress",
+              factory.createIntGauge("jtaSynchronizationSendsInProgress",
                   "Current number of jtaSynchronization sends being executed", "sends"),
-              f.createIntCounter("jtaSynchronizationSendFailures",
+              factory.createIntCounter("jtaSynchronizationSendFailures",
                   "Total number of jtaSynchronization sends that have failed", "sends"),
-              f.createIntCounter("jtaSynchronizationSends",
+              factory.createIntCounter("jtaSynchronizationSends",
                   "Total number of jtaSynchronization sends that have failed", "sends"),
-              f.createLongCounter("jtaSynchronizationSendTime",
+              factory.createLongCounter("jtaSynchronizationSendTime",
                   "Total amount of time, in nanoseconds spent doing jtaSynchronizations",
                   "nanoseconds"),
-              f.createIntGauge("txFailoverSendsInProgress",
+              factory.createIntGauge("txFailoverSendsInProgress",
                   "Current number of txFailover sends being executed", "sends"),
-              f.createIntCounter("txFailoverSendFailures",
+              factory.createIntCounter("txFailoverSendFailures",
                   "Total number of txFailover sends that have failed", "sends"),
-              f.createIntCounter("txFailoverSends",
+              factory.createIntCounter("txFailoverSends",
                   "Total number of txFailover sends that have failed", "sends"),
-              f.createLongCounter("txFailoverSendTime",
+              factory.createLongCounter("txFailoverSendTime",
                   "Total amount of time, in nanoseconds spent doing txFailovers", "nanoseconds"),
-              f.createIntGauge("sizeSendsInProgress", "Current number of size sends being executed",
+              factory.createIntGauge("sizeSendsInProgress", "Current number of size sends being executed",
                   "sends"),
-              f.createIntCounter("sizeSendFailures", "Total number of size sends that have failed",
+              factory.createIntCounter("sizeSendFailures", "Total number of size sends that have failed",
                   "sends"),
-              f.createIntCounter("sizeSends", "Total number of size sends that have failed",
+              factory.createIntCounter("sizeSends", "Total number of size sends that have failed",
                   "sends"),
-              f.createLongCounter("sizeSendTime",
+              factory.createLongCounter("sizeSendTime",
                   "Total amount of time, in nanoseconds spent doing sizes", "nanoseconds"),
-              f.createIntGauge("invalidateSendsInProgress",
+              factory.createIntGauge("invalidateSendsInProgress",
                   "Current number of invalidate sends being executed", "sends"),
-              f.createIntCounter("invalidateSendFailures",
+              factory.createIntCounter("invalidateSendFailures",
                   "Total number of invalidate sends that have failed", "sends"),
-              f.createIntCounter("invalidateSends",
+              factory.createIntCounter("invalidateSends",
                   "Total number of invalidate sends that have failed", "sends"),
-              f.createLongCounter("invalidateSendTime",
+              factory.createLongCounter("invalidateSendTime",
                   "Total amount of time, in nanoseconds spent doing invalidates", "nanoseconds"),
-              f.createIntGauge("registerInterestSendsInProgress",
+              factory.createIntGauge("registerInterestSendsInProgress",
                   "Current number of registerInterest sends being executed", "sends"),
-              f.createIntCounter("registerInterestSends",
+              factory.createIntCounter("registerInterestSends",
                   "Total number of registerInterest sends that have completed successfully",
                   "sends"),
-              f.createIntCounter("registerInterestSendFailures",
+              factory.createIntCounter("registerInterestSendFailures",
                   "Total number of registerInterest sends that have failed", "sends"),
-              f.createLongCounter("registerInterestSendTime",
+              factory.createLongCounter("registerInterestSendTime",
                   "Total amount of time, in nanoseconds spent doing registerInterest sends",
                   "nanoseconds"),
-              f.createIntGauge("unregisterInterestSendsInProgress",
+              factory.createIntGauge("unregisterInterestSendsInProgress",
                   "Current number of unregisterInterest sends being executed", "sends"),
-              f.createIntCounter("unregisterInterestSends",
+              factory.createIntCounter("unregisterInterestSends",
                   "Total number of unregisterInterest sends that have completed successfully",
                   "sends"),
-              f.createIntCounter("unregisterInterestSendFailures",
+              factory.createIntCounter("unregisterInterestSendFailures",
                   "Total number of unregisterInterest sends that have failed", "sends"),
-              f.createLongCounter("unregisterInterestSendTime",
+              factory.createLongCounter("unregisterInterestSendTime",
                   "Total amount of time, in nanoseconds spent doing unregisterInterest sends",
                   "nanoseconds"),
-              f.createIntGauge("querySendsInProgress",
+              factory.createIntGauge("querySendsInProgress",
                   "Current number of query sends being executed", "sends"),
-              f.createIntCounter("querySends",
+              factory.createIntCounter("querySends",
                   "Total number of query sends that have completed successfully", "sends"),
-              f.createIntCounter("querySendFailures",
+              factory.createIntCounter("querySendFailures",
                   "Total number of query sends that have failed", "sends"),
-              f.createLongCounter("querySendTime",
+              factory.createLongCounter("querySendTime",
                   "Total amount of time, in nanoseconds spent doing query sends", "nanoseconds"),
-              f.createIntGauge("createCQSendsInProgress",
+              factory.createIntGauge("createCQSendsInProgress",
                   "Current number of createCQ sends being executed", "sends"),
-              f.createIntCounter("createCQSends",
+              factory.createIntCounter("createCQSends",
                   "Total number of createCQ sends that have completed successfully", "sends"),
-              f.createIntCounter("createCQSendFailures",
+              factory.createIntCounter("createCQSendFailures",
                   "Total number of createCQ sends that have failed", "sends"),
-              f.createLongCounter("createCQSendTime",
+              factory.createLongCounter("createCQSendTime",
                   "Total amount of time, in nanoseconds spent doing createCQ sends", "nanoseconds"),
-              f.createIntGauge("stopCQSendsInProgress",
+              factory.createIntGauge("stopCQSendsInProgress",
                   "Current number of stopCQ sends being executed", "sends"),
-              f.createIntCounter("stopCQSends",
+              factory.createIntCounter("stopCQSends",
                   "Total number of stopCQ sends that have completed successfully", "sends"),
-              f.createIntCounter("stopCQSendFailures",
+              factory.createIntCounter("stopCQSendFailures",
                   "Total number of stopCQ sends that have failed", "sends"),
-              f.createLongCounter("stopCQSendTime",
+              factory.createLongCounter("stopCQSendTime",
                   "Total amount of time, in nanoseconds spent doing stopCQ sends", "nanoseconds"),
-              f.createIntGauge("closeCQSendsInProgress",
+              factory.createIntGauge("closeCQSendsInProgress",
                   "Current number of closeCQ sends being executed", "sends"),
-              f.createIntCounter("closeCQSends",
+              factory.createIntCounter("closeCQSends",
                   "Total number of closeCQ sends that have completed successfully", "sends"),
-              f.createIntCounter("closeCQSendFailures",
+              factory.createIntCounter("closeCQSendFailures",
                   "Total number of closeCQ sends that have failed", "sends"),
-              f.createLongCounter("closeCQSendTime",
+              factory.createLongCounter("closeCQSendTime",
                   "Total amount of time, in nanoseconds spent doing closeCQ sends", "nanoseconds"),
-              f.createIntGauge("gatewayBatchSendsInProgress",
+              factory.createIntGauge("gatewayBatchSendsInProgress",
                   "Current number of gatewayBatch sends being executed", "sends"),
-              f.createIntCounter("gatewayBatchSends",
+              factory.createIntCounter("gatewayBatchSends",
                   "Total number of gatewayBatch sends that have completed successfully", "sends"),
-              f.createIntCounter("gatewayBatchSendFailures",
+              factory.createIntCounter("gatewayBatchSendFailures",
                   "Total number of gatewayBatch sends that have failed", "sends"),
-              f.createLongCounter("gatewayBatchSendTime",
+              factory.createLongCounter("gatewayBatchSendTime",
                   "Total amount of time, in nanoseconds spent doing gatewayBatch sends",
                   "nanoseconds"),
-              f.createIntGauge("getDurableCQsSendsInProgressId",
+              factory.createIntGauge("getDurableCQsSendsInProgressId",
                   "Current number of getDurableCQs sends being executed", "sends"),
-              f.createIntCounter("getDurableCQsSends",
+              factory.createIntCounter("getDurableCQsSends",
                   "Total number of getDurableCQs sends that have completed successfully", "sends"),
-              f.createIntCounter("getDurableCQsSendFailures",
+              factory.createIntCounter("getDurableCQsSendFailures",
                   "Total number of getDurableCQs sends that have failed", "sends"),
-              f.createLongCounter("getDurableCQsSendTime",
+              factory.createLongCounter("getDurableCQsSendTime",
                   "Total amount of time, in nanoseconds spent doing getDurableCQs sends",
                   "nanoseconds"),
-              f.createIntGauge("readyForEventsSendsInProgress",
+              factory.createIntGauge("readyForEventsSendsInProgress",
                   "Current number of readyForEvents sends being executed", "sends"),
-              f.createIntCounter("readyForEventsSends",
+              factory.createIntCounter("readyForEventsSends",
                   "Total number of readyForEvents sends that have completed successfully", "sends"),
-              f.createIntCounter("readyForEventsSendFailures",
+              factory.createIntCounter("readyForEventsSendFailures",
                   "Total number of readyForEvents sends that have failed", "sends"),
-              f.createLongCounter("readyForEventsSendTime",
+              factory.createLongCounter("readyForEventsSendTime",
                   "Total amount of time, in nanoseconds spent doing readyForEvents sends",
                   "nanoseconds"),
-              f.createIntGauge("makePrimarySendsInProgress",
+              factory.createIntGauge("makePrimarySendsInProgress",
                   "Current number of makePrimary sends being executed", "sends"),
-              f.createIntCounter("makePrimarySends",
+              factory.createIntCounter("makePrimarySends",
                   "Total number of makePrimary sends that have completed successfully", "sends"),
-              f.createIntCounter("makePrimarySendFailures",
+              factory.createIntCounter("makePrimarySendFailures",
                   "Total number of makePrimary sends that have failed", "sends"),
-              f.createLongCounter("makePrimarySendTime",
+              factory.createLongCounter("makePrimarySendTime",
                   "Total amount of time, in nanoseconds spent doing makePrimary sends",
                   "nanoseconds"),
-              f.createIntGauge("closeConSendsInProgress",
+              factory.createIntGauge("closeConSendsInProgress",
                   "Current number of closeCon sends being executed", "sends"),
-              f.createIntCounter("closeConSends",
+              factory.createIntCounter("closeConSends",
                   "Total number of closeCon sends that have completed successfully", "sends"),
-              f.createIntCounter("closeConSendFailures",
+              factory.createIntCounter("closeConSendFailures",
                   "Total number of closeCon sends that have failed", "sends"),
-              f.createLongCounter("closeConSendTime",
+              factory.createLongCounter("closeConSendTime",
                   "Total amount of time, in nanoseconds spent doing closeCon sends", "nanoseconds"),
-              f.createIntGauge("primaryAckSendsInProgress",
+              factory.createIntGauge("primaryAckSendsInProgress",
                   "Current number of primaryAck sends being executed", "sends"),
-              f.createIntCounter("primaryAckSends",
+              factory.createIntCounter("primaryAckSends",
                   "Total number of primaryAck sends that have completed successfully", "sends"),
-              f.createIntCounter("primaryAckSendFailures",
+              factory.createIntCounter("primaryAckSendFailures",
                   "Total number of primaryAck sends that have failed", "sends"),
-              f.createLongCounter("primaryAckSendTime",
+              factory.createLongCounter("primaryAckSendTime",
                   "Total amount of time, in nanoseconds spent doing primaryAck sends",
                   "nanoseconds"),
-              f.createIntGauge("pingSendsInProgress", "Current number of ping sends being executed",
+              factory.createIntGauge("pingSendsInProgress", "Current number of ping sends being executed",
                   "sends"),
-              f.createIntCounter("pingSends",
+              factory.createIntCounter("pingSends",
                   "Total number of ping sends that have completed successfully", "sends"),
-              f.createIntCounter("pingSendFailures", "Total number of ping sends that have failed",
+              factory.createIntCounter("pingSendFailures", "Total number of ping sends that have failed",
                   "sends"),
-              f.createLongCounter("pingSendTime",
+              factory.createLongCounter("pingSendTime",
                   "Total amount of time, in nanoseconds spent doing ping sends", "nanoseconds"),
-              f.createIntGauge("registerInstantiatorsSendsInProgress",
+              factory.createIntGauge("registerInstantiatorsSendsInProgress",
                   "Current number of registerInstantiators sends being executed", "sends"),
-              f.createIntCounter("registerInstantiatorsSends",
+              factory.createIntCounter("registerInstantiatorsSends",
                   "Total number of registerInstantiators sends that have completed successfully",
                   "sends"),
-              f.createIntCounter("registerInstantiatorsSendFailures",
+              factory.createIntCounter("registerInstantiatorsSendFailures",
                   "Total number of registerInstantiators sends that have failed", "sends"),
-              f.createLongCounter("registerInstantiatorsSendTime",
+              factory.createLongCounter("registerInstantiatorsSendTime",
                   "Total amount of time, in nanoseconds spent doing registerInstantiators sends",
                   "nanoseconds"),
-              f.createIntGauge("registerDataSerializersSendInProgress",
+              factory.createIntGauge("registerDataSerializersSendInProgress",
                   "Current number of registerDataSerializers sends being executed", "sends"),
-              f.createIntCounter("registerDataSerializersSends",
+              factory.createIntCounter("registerDataSerializersSends",
                   "Total number of registerDataSerializers sends that have completed successfully",
                   "sends"),
-              f.createIntCounter("registerDataSerializersSendFailures",
+              factory.createIntCounter("registerDataSerializersSendFailures",
                   "Total number of registerDataSerializers sends that have failed", "sends"),
-              f.createLongCounter("registerDataSerializersSendTime",
+              factory.createLongCounter("registerDataSerializersSendTime",
                   "Total amount of time, in nanoseconds spent doing registerDataSerializers sends",
                   "nanoseconds"),
-              f.createIntGauge("putAllSendsInProgress",
+              factory.createIntGauge("putAllSendsInProgress",
                   "Current number of putAll sends being executed", "sends"),
-              f.createIntCounter("putAllSends",
+              factory.createIntCounter("putAllSends",
                   "Total number of putAll sends that have completed successfully", "sends"),
-              f.createIntCounter("putAllSendFailures",
+              factory.createIntCounter("putAllSendFailures",
                   "Total number of putAll sends that have failed", "sends"),
-              f.createLongCounter("putAllSendTime",
+              factory.createLongCounter("putAllSendTime",
                   "Total amount of time, in nanoseconds spent doing putAll sends", "nanoseconds"),
-              f.createIntGauge("removeAllSendsInProgress",
+              factory.createIntGauge("removeAllSendsInProgress",
                   "Current number of removeAll sends being executed", "sends"),
-              f.createIntCounter("removeAllSends",
+              factory.createIntCounter("removeAllSends",
                   "Total number of removeAll sends that have completed successfully", "sends"),
-              f.createIntCounter("removeAllSendFailures",
+              factory.createIntCounter("removeAllSendFailures",
                   "Total number of removeAll sends that have failed", "sends"),
-              f.createLongCounter("removeAllSendTime",
+              factory.createLongCounter("removeAllSendTime",
                   "Total amount of time, in nanoseconds spent doing removeAll sends",
                   "nanoseconds"),
-              f.createIntGauge("getAllSendsInProgress",
+              factory.createIntGauge("getAllSendsInProgress",
                   "Current number of getAll sends being executed", "sends"),
-              f.createIntCounter("getAllSends",
+              factory.createIntCounter("getAllSends",
                   "Total number of getAll sends that have completed successfully", "sends"),
-              f.createIntCounter("getAllSendFailures",
+              factory.createIntCounter("getAllSendFailures",
                   "Total number of getAll sends that have failed", "sends"),
-              f.createLongCounter("getAllSendTime",
+              factory.createLongCounter("getAllSendTime",
                   "Total amount of time, in nanoseconds spent doing getAll sends", "nanoseconds"),
-              f.createIntGauge("executeFunctionSendsInProgress",
+              factory.createIntGauge("executeFunctionSendsInProgress",
                   "Current number of Function sends being executed", "sends"),
-              f.createIntCounter("executeFunctionSends",
+              factory.createIntCounter("executeFunctionSends",
                   "Total number of Function sends that have completed successfully", "sends"),
-              f.createIntCounter("executeFunctionSendFailures",
+              factory.createIntCounter("executeFunctionSendFailures",
                   "Total number of Function sends that have failed", "sends"),
-              f.createLongCounter("executeFunctionSendTime",
+              factory.createLongCounter("executeFunctionSendTime",
                   "Total amount of time, in nanoseconds spent doing Function sends", "nanoseconds"),
-              f.createIntGauge("asyncExecuteFunctionSendsInProgress",
+              factory.createIntGauge("asyncExecuteFunctionSendsInProgress",
                   "Current number of Function sends being executed asynchronously", "sends"),
-              f.createIntCounter("asyncExecuteFunctionSends",
+              factory.createIntCounter("asyncExecuteFunctionSends",
                   "Total number of asynchronous Function sends that have completed successfully",
                   "sends"),
-              f.createIntCounter("asyncExecuteFunctionSendFailures",
+              factory.createIntCounter("asyncExecuteFunctionSendFailures",
                   "Total number of asynchronous Function sends that have failed", "sends"),
-              f.createLongCounter("asyncExecuteFunctionSendTime",
+              factory.createLongCounter("asyncExecuteFunctionSendTime",
                   "Total amount of time, in nanoseconds spent doing asynchronous Function sends",
                   "nanoseconds"),
-              f.createIntGauge("getClientPRMetadataSendsInProgress",
+              factory.createIntGauge("getClientPRMetadataSendsInProgress",
                   "Current number of getClientPRMetadata operation's request messages being send from the client to server",
                   "sends"),
-              f.createIntCounter("getClientPRMetadataSendFailures",
+              factory.createIntCounter("getClientPRMetadataSendFailures",
                   "Total number of getClientPRMetadata operation's request messages not sent successfully from the client to server",
                   "sends"),
-              f.createIntCounter("getClientPRMetadataSendsSuccessful",
+              factory.createIntCounter("getClientPRMetadataSendsSuccessful",
                   "Total number of getClientPRMetadata operation's request messages sent successfully from the client to server",
                   "sends"),
-              f.createLongCounter("getClientPRMetadataSendTime",
+              factory.createLongCounter("getClientPRMetadataSendTime",
                   "Total amount of time, in nanoseconds spent sending getClientPRMetadata operation's request messages successfully/unsuccessfully from the client to server",
                   "nanoseconds"),
-              f.createIntGauge("getClientPartitionAttributesSendsInProgress",
+              factory.createIntGauge("getClientPartitionAttributesSendsInProgress",
                   "Current number of getClientPartitionAttributes operation's request messages being send from the client to server",
                   "sends"),
-              f.createIntCounter("getClientPartitionAttributesSendFailures",
+              factory.createIntCounter("getClientPartitionAttributesSendFailures",
                   "Total number of getClientPartitionAttributes operation's request messages not sent successfully from the client to server",
                   "sends"),
-              f.createIntCounter("getClientPartitionAttributesSendsSuccessful",
+              factory.createIntCounter("getClientPartitionAttributesSendsSuccessful",
                   "Total number of getClientPartitionAttributes operation's request messages sent successfully from the client to server",
                   "sends"),
-              f.createLongCounter("getClientPartitionAttributesSendTime",
+              factory.createLongCounter("getClientPartitionAttributesSendTime",
                   "Total amount of time, in nanoseconds spent sending getClientPartitionAttributes operation's request messages successfully/unsuccessfully from the client to server",
                   "nanoseconds"),
-              f.createIntGauge("getPDXTypeByIdSendsInProgress",
+              factory.createIntGauge("getPDXTypeByIdSendsInProgress",
                   "Current number of getPDXTypeById operation's request messages being send from the client to server",
                   "sends"),
-              f.createIntCounter("getPDXTypeByIdSendFailures",
+              factory.createIntCounter("getPDXTypeByIdSendFailures",
                   "Total number of getPDXTypeById operation's request messages not sent successfully from the client to server",
                   "sends"),
-              f.createIntCounter("getPDXTypeByIdSendsSuccessful",
+              factory.createIntCounter("getPDXTypeByIdSendsSuccessful",
                   "Total number of getPDXTypeById operation's request messages sent successfully from the client to server",
                   "sends"),
-              f.createLongCounter("getPDXTypeByIdSendTime",
+              factory.createLongCounter("getPDXTypeByIdSendTime",
                   "Total amount of time, in nanoseconds spent sending getPDXTypeById operation's request messages successfully/unsuccessfully from the client to server",
                   "nanoseconds"),
-              f.createIntGauge("getPDXIdForTypeSendsInProgress",
+              factory.createIntGauge("getPDXIdForTypeSendsInProgress",
                   "Current number of getPDXIdForType operation's request messages being send from the client to server",
                   "sends"),
-              f.createIntCounter("getPDXIdForTypeSendFailures",
+              factory.createIntCounter("getPDXIdForTypeSendFailures",
                   "Total number of getPDXIdForType operation's request messages not sent successfully from the client to server",
                   "sends"),
-              f.createIntCounter("getPDXIdForTypeSendsSuccessful",
+              factory.createIntCounter("getPDXIdForTypeSendsSuccessful",
                   "Total number of getPDXIdForType operation's request messages sent successfully from the client to server",
                   "sends"),
-              f.createLongCounter("getPDXIdForTypeSendTime",
+              factory.createLongCounter("getPDXIdForTypeSendTime",
                   "Total amount of time, in nanoseconds spent sending getPDXIdForType operation's request messages successfully/unsuccessfully from the client to server",
                   "nanoseconds"),
-              f.createIntGauge("addPdxTypeSendsInProgress",
+              factory.createIntGauge("addPdxTypeSendsInProgress",
                   "Current number of addPdxType operation's request messages being send from the client to server",
                   "sends"),
-              f.createIntCounter("addPdxTypeSendFailures",
+              factory.createIntCounter("addPdxTypeSendFailures",
                   "Total number of addPdxType operation's request messages not sent successfully from the client to server",
                   "sends"),
-              f.createIntCounter("addPdxTypeSendsSuccessful",
+              factory.createIntCounter("addPdxTypeSendsSuccessful",
                   "Total number of addPdxType operation's request messages sent successfully from the client to server",
                   "sends"),
-              f.createLongCounter("addPdxTypeSendTime",
+              factory.createLongCounter("addPdxTypeSendTime",
                   "Total amount of time, in nanoseconds spent sending addPdxType operation's request messages successfully/unsuccessfully from the client to server",
                   "nanoseconds"),});
       ///////////////////////////////////////////////////////////////////////
@@ -1713,6 +1701,7 @@ public class ConnectionStats implements MessageStats {
 
   public ConnectionStats(StatisticsFactory factory, String name,
       PoolStats poolStats/* , GatewayStats gatewayStats */) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(type, "ClientStats-" + name);
     this.sendStats = factory.createAtomicStatistics(sendType, "ClientSendStats-" + name);
     this.poolStats = poolStats;
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 59fad1c..d811c82 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
@@ -221,7 +221,7 @@ public class EndpointManagerImpl implements EndpointManager {
       PoolImpl pool = (PoolImpl) PoolManager.find(this.poolName);
       if (pool != null) {
         if (pool.getGatewaySender() != null) {
-          stats = new ConnectionStats(new DummyStatisticsFactory(), statName,
+          stats = new ConnectionStats(new DummyStatisticsFactory(distributedSystem.getStatisticsFactory()), statName,
               this.poolStats/* , this.gatewayStats */);
         }
       }
@@ -238,7 +238,7 @@ public class EndpointManagerImpl implements EndpointManager {
   }
 
   public synchronized Map<ServerLocation, ConnectionStats> getAllStats() {
-    return new HashMap<ServerLocation, ConnectionStats>(statMap);
+    return new HashMap<>(statMap);
   }
 
   public int getConnectedServerCount() {
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 e200864..2fbad5f 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
@@ -238,7 +238,7 @@ public class PoolImpl implements InternalPool {
     }
     StatisticsFactory statFactory = null;
     if (this.gatewaySender != null) {
-      statFactory = new DummyStatisticsFactory();
+      statFactory = new DummyStatisticsFactory(this.internalDistributedSystem.getStatisticsFactory());
     } else {
       statFactory = this.internalDistributedSystem.getInternalDistributedSystemStats();
     }
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 e198adc..b2e0b4d 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
@@ -30,7 +30,7 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class CqQueryVsdStats {
   /** The <code>StatisticsType</code> of the statistics */
-  private static final StatisticsType _type;
+  private StatisticsType _type;
 
   /** Name of the created CQs statistic */
   protected static final String CQ_INITIAL_RESULTS_TIME = "cqInitialResultsTime";
@@ -57,60 +57,58 @@ public class CqQueryVsdStats {
   protected static final String QUEUED_CQ_LISTENER_EVENTS = "queuedCqListenerEvents";
 
   /** Id of the initial results time statistic */
-  private static final int _cqInitialResultsTimeId;
+  private int _cqInitialResultsTimeId;
 
   /** Id of the num inserts statistic */
-  private static final int _numInsertsId;
+  private int _numInsertsId;
 
   /** Id of the num updates statistic */
-  private static final int _numUpdatesId;
+  private int _numUpdatesId;
 
   /** Id of the num deletes statistic */
-  private static final int _numDeletesId;
+  private int _numDeletesId;
 
   /** Id of the num events statistic */
-  private static final int _numEventsId;
+  private int _numEventsId;
 
   /** Id of the num queued events in the ha queue for the cq statistic */
-  private static final int _numHAQueuedEventsId;
+  private int _numHAQueuedEventsId;
 
   /** Id of the num cqListener invocation statistic */
-  private static final int _numCqListenerInvocationsId;
+  private int _numCqListenerInvocationsId;
 
   /** Id for the queued CQ events size during execute with initial results */
-  private static final int _queuedCqListenerEventsId;
+  private int _queuedCqListenerEventsId;
 
   /**
    * Static initializer to create and initialize the <code>StatisticsType</code>
    */
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "CqQueryStats";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    _type = f.createType(statName, statName,
-        new StatisticDescriptor[] {f.createLongCounter(CQ_INITIAL_RESULTS_TIME,
+    _type = factory.createType(statName, statName,
+        new StatisticDescriptor[] {factory.createLongCounter(CQ_INITIAL_RESULTS_TIME,
             "The total amount of time, in nanoseconds, it took to do this initial query and send the results to the client.",
             "nanoseconds"),
 
-            f.createLongCounter(CQ_INSERTS, "Total number of inserts done on this cq.",
+            factory.createLongCounter(CQ_INSERTS, "Total number of inserts done on this cq.",
                 "operations"),
 
-            f.createLongCounter(CQ_UPDATES, "Total number of updates done on this cq.",
+            factory.createLongCounter(CQ_UPDATES, "Total number of updates done on this cq.",
                 "operations"),
 
-            f.createLongCounter(CQ_DELETES, "Total number of deletes done on this cq.",
+            factory.createLongCounter(CQ_DELETES, "Total number of deletes done on this cq.",
                 "operations"),
 
-            f.createLongCounter(CQ_EVENTS,
+            factory.createLongCounter(CQ_EVENTS,
                 "Total number of inserts, updates, and deletes done on this cq.", "operations"),
 
-            f.createLongGauge(NUM_HA_QUEUED_CQ_EVENTS, "Number of events in this cq.", "events"),
+            factory.createLongGauge(NUM_HA_QUEUED_CQ_EVENTS, "Number of events in this cq.", "events"),
 
-            f.createLongCounter(CQ_LISTENER_INVOCATIONS, "Total number of CqListener invocations.",
+            factory.createLongCounter(CQ_LISTENER_INVOCATIONS, "Total number of CqListener invocations.",
                 "operations"),
 
-            f.createLongGauge(QUEUED_CQ_LISTENER_EVENTS,
+            factory.createLongGauge(QUEUED_CQ_LISTENER_EVENTS,
                 "Number of events queued while CQ registration is in progress. This is not the main cq queue but a temporary internal one used while the cq is starting up.",
                 "events"),});
 
@@ -136,6 +134,7 @@ public class CqQueryVsdStats {
    * @param name The name of the <code>Statistics</code>
    */
   public CqQueryVsdStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this._stats = factory.createAtomicStatistics(_type, "CqQueryStats-" + name);
   }
 
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 2e82394..dec51b2 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
@@ -27,45 +27,43 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class IndexStats {
 
-  private static final StatisticsType type;
-
-  private static final int numKeysId;
-  private static final int numValuesId;
-  private static final int numUpdatesId;
-  private static final int numUsesId;
-  private static final int updateTimeId;
-  private static final int useTimeId;
-  private static final int updatesInProgressId;
-  private static final int usesInProgressId;
-  private static final int readLockCountId;
-  private static final int numMapIndexKeysId;
-  private static final int numBucketIndexesId;
+  private StatisticsType type;
+
+  private int numKeysId;
+  private int numValuesId;
+  private int numUpdatesId;
+  private int numUsesId;
+  private int updateTimeId;
+  private int useTimeId;
+  private int updatesInProgressId;
+  private int usesInProgressId;
+  private int readLockCountId;
+  private int numMapIndexKeysId;
+  private int numBucketIndexesId;
 
   /** The Statistics object that we delegate most behavior to */
   private final Statistics stats;
 
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
+  private void initializeStats(StatisticsFactory factory) {
     final String numKeysDesc = "Number of keys in this index";
     final String numValuesDesc = "Number of values in this index";
     final String numUpdatesDesc = "Number of updates that have completed on this index";
     final String numUsesDesc = "Number of times this index has been used while executing a query";
     final String updateTimeDesc = "Total time spent updating this index";
 
-    type = f.createType("IndexStats", "Statistics about a query index",
-        new StatisticDescriptor[] {f.createLongGauge("numKeys", numKeysDesc, "keys"),
-            f.createLongGauge("numValues", numValuesDesc, "values"),
-            f.createLongCounter("numUpdates", numUpdatesDesc, "operations"),
-            f.createLongCounter("numUses", numUsesDesc, "operations"),
-            f.createLongCounter("updateTime", updateTimeDesc, "nanoseconds"),
-            f.createLongCounter("useTime", "Total time spent using this index", "nanoseconds"),
-            f.createIntGauge("updatesInProgress", "Current number of updates in progress.",
+    type = factory.createType("IndexStats", "Statistics about a query index",
+        new StatisticDescriptor[] {factory.createLongGauge("numKeys", numKeysDesc, "keys"),
+            factory.createLongGauge("numValues", numValuesDesc, "values"),
+            factory.createLongCounter("numUpdates", numUpdatesDesc, "operations"),
+            factory.createLongCounter("numUses", numUsesDesc, "operations"),
+            factory.createLongCounter("updateTime", updateTimeDesc, "nanoseconds"),
+            factory.createLongCounter("useTime", "Total time spent using this index", "nanoseconds"),
+            factory.createIntGauge("updatesInProgress", "Current number of updates in progress.",
                 "updates"),
-            f.createIntGauge("usesInProgress", "Current number of uses in progress.", "uses"),
-            f.createIntGauge("readLockCount", "Current number of read locks taken.", "uses"),
-            f.createLongGauge("numMapIndexKeys", "Number of keys in this Map index", "keys"),
-            f.createIntGauge("numBucketIndexes",
+            factory.createIntGauge("usesInProgress", "Current number of uses in progress.", "uses"),
+            factory.createIntGauge("readLockCount", "Current number of read locks taken.", "uses"),
+            factory.createLongGauge("numMapIndexKeys", "Number of keys in this Map index", "keys"),
+            factory.createIntGauge("numBucketIndexes",
                 "Number of bucket indexes in the partitioned region", "indexes"),});
 
     // Initialize id fields
@@ -87,6 +85,7 @@ public class IndexStats {
    * factory.
    */
   public IndexStats(StatisticsFactory factory, String indexName) {
+    initializeStats(factory);
     stats = factory.createAtomicStatistics(type, indexName);
   }
 
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 fdffef4..86bd935 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
@@ -41,201 +41,201 @@ public class DistributionStats implements DMStats {
 
   ////////////////// Statistic "Id" Fields //////////////////
 
-  private static final StatisticsType type;
-  private static final int sentMessagesId;
-  private static final int sentCommitMessagesId;
-  private static final int commitWaitsId;
-  private static final int sentMessagesTimeId;
-  private static final int sentMessagesMaxTimeId;
-  private static final int broadcastMessagesId;
-  private static final int broadcastMessagesTimeId;
-  private static final int receivedMessagesId;
-  private static final int receivedBytesId;
-  private static final int sentBytesId;
-  private static final int processedMessagesId;
-  private static final int processedMessagesTimeId;
-  private static final int messageProcessingScheduleTimeId;
-  private static final int messageChannelTimeId;
-  private static final int udpDispatchRequestTimeId;
-  private static final int replyMessageTimeId;
-  private static final int distributeMessageTimeId;
-  private static final int nodesId;
-  private static final int overflowQueueSizeId;
-  private static final int processingThreadsId;
-  private static final int serialThreadsId;
-  private static final int waitingThreadsId;
-  private static final int highPriorityThreadsId;
-  private static final int partitionedRegionThreadsId;
-  private static final int functionExecutionThreadsId;
-  private static final int partitionedRegionThreadJobsId;
-  private static final int functionExecutionThreadJobsId;
-  private static final int waitingQueueSizeId;
-  private static final int overflowQueueThrottleTimeId;
-  private static final int overflowQueueThrottleCountId;
-  private static final int highPriorityQueueSizeId;
-  private static final int highPriorityQueueThrottleTimeId;
-  private static final int highPriorityQueueThrottleCountId;
-  private static final int partitionedRegionQueueSizeId;
-  private static final int partitionedRegionQueueThrottleTimeId;
-  private static final int partitionedRegionQueueThrottleCountId;
-  private static final int functionExecutionQueueSizeId;
-  private static final int functionExecutionQueueThrottleCountId;
-  private static final int functionExecutionQueueThrottleTimeId;
-  private static final int serialQueueSizeId;
-  private static final int serialQueueBytesId;
-  private static final int serialPooledThreadId;
-  private static final int serialQueueThrottleTimeId;
-  private static final int serialQueueThrottleCountId;
-  private static final int replyWaitsInProgressId;
-  private static final int replyWaitsCompletedId;
-  private static final int replyWaitTimeId;
-  private static final int replyTimeoutsId;
-  private static final int replyWaitMaxTimeId;
-  private static final int receiverConnectionsId;
-  private static final int failedAcceptsId;
-  private static final int failedConnectsId;
-  private static final int reconnectAttemptsId;
-  private static final int lostConnectionLeaseId;
-  private static final int sharedOrderedSenderConnectionsId;
-  private static final int sharedUnorderedSenderConnectionsId;
-  private static final int threadOrderedSenderConnectionsId;
-  private static final int threadUnorderedSenderConnectionsId;
-
-  private static final int syncSocketWritesInProgressId;
-  private static final int syncSocketWriteTimeId;
-  private static final int syncSocketWritesId;
-  private static final int syncSocketWriteBytesId;
-
-  private static final int ucastReadsId;
-  private static final int ucastReadBytesId;
-  private static final int ucastWritesId;
-  private static final int ucastWriteBytesId;
-  private static final int ucastRetransmitsId;
-
-  private static final int mcastReadsId;
-  private static final int mcastReadBytesId;
-  private static final int mcastWritesId;
-  private static final int mcastWriteBytesId;
-  private static final int mcastRetransmitsId;
-  private static final int mcastRetransmitRequestsId;
-
-  private static final int serializationTimeId;
-  private static final int serializationsId;
-  private static final int serializedBytesId;
-
-  private static final int pdxSerializationsId;
-  private static final int pdxSerializedBytesId;
-
-  private static final int deserializationTimeId;
-  private static final int deserializationsId;
-  private static final int deserializedBytesId;
-  private static final int pdxDeserializationsId;
-  private static final int pdxDeserializedBytesId;
-  private static final int pdxInstanceDeserializationsId;
-  private static final int pdxInstanceDeserializationTimeId;
-  private static final int pdxInstanceCreationsId;
-
-  private static final int msgSerializationTimeId;
-  private static final int msgDeserializationTimeId;
-
-  private static final int udpMsgEncryptionTimeId;
-  private static final int udpMsgDecryptionTimeId;
-
-  private static final int batchSendTimeId;
-  private static final int batchCopyTimeId;
-  private static final int batchWaitTimeId;
-  private static final int batchFlushTimeId;
-
-  private static final int threadOwnedReceiversId;
-  private static final int threadOwnedReceiversId2;
-
-  private static final int asyncSocketWritesInProgressId;
-  private static final int asyncSocketWritesId;
-  private static final int asyncSocketWriteRetriesId;
-  private static final int asyncSocketWriteTimeId;
-  private static final int asyncSocketWriteBytesId;
-
-  private static final int socketLocksInProgressId;
-  private static final int socketLocksId;
-  private static final int socketLockTimeId;
-
-  private static final int bufferAcquiresInProgressId;
-  private static final int bufferAcquiresId;
-  private static final int bufferAcquireTimeId;
-
-  private static final int asyncQueueAddTimeId;
-  private static final int asyncQueueRemoveTimeId;
-
-  private static final int asyncQueuesId;
-  private static final int asyncQueueFlushesInProgressId;
-  private static final int asyncQueueFlushesCompletedId;
-  private static final int asyncQueueFlushTimeId;
-  private static final int asyncQueueTimeoutExceededId;
-  private static final int asyncQueueSizeExceededId;
-  private static final int asyncDistributionTimeoutExceededId;
-  private static final int asyncQueueSizeId;
-  private static final int asyncQueuedMsgsId;
-  private static final int asyncDequeuedMsgsId;
-  private static final int asyncConflatedMsgsId;
-
-  private static final int asyncThreadsId;
-  private static final int asyncThreadInProgressId;
-  private static final int asyncThreadCompletedId;
-  private static final int asyncThreadTimeId;
-
-  private static final int receiverDirectBufferSizeId;
-  private static final int receiverHeapBufferSizeId;
-  private static final int senderDirectBufferSizeId;
-  private static final int senderHeapBufferSizeId;
-
-  private static final int messagesBeingReceivedId;
-  private static final int messageBytesBeingReceivedId;
-
-  private static final int serialThreadStartsId;
-  private static final int viewThreadStartsId;
-  private static final int processingThreadStartsId;
-  private static final int highPriorityThreadStartsId;
-  private static final int waitingThreadStartsId;
-  private static final int partitionedRegionThreadStartsId;
-  private static final int functionExecutionThreadStartsId;
-  private static final int serialPooledThreadStartsId;
-  private static final int TOSentMsgId;
-
-  private static final int replyHandoffTimeId;
-
-  private static final int viewThreadsId;
-  private static final int serialThreadJobsId;
-  private static final int viewProcessorThreadJobsId;
-  private static final int serialPooledThreadJobsId;
-  private static final int pooledMessageThreadJobsId;
-  private static final int highPriorityThreadJobsId;
-  private static final int waitingPoolThreadJobsId;
-
-  private static final int eldersId;
-  private static final int initialImageMessagesInFlightId;
-  private static final int initialImageRequestsInProgressId;
+  private StatisticsType type;
+  private int sentMessagesId;
+  private int sentCommitMessagesId;
+  private int commitWaitsId;
+  private int sentMessagesTimeId;
+  private int sentMessagesMaxTimeId;
+  private int broadcastMessagesId;
+  private int broadcastMessagesTimeId;
+  private int receivedMessagesId;
+  private int receivedBytesId;
+  private int sentBytesId;
+  private int processedMessagesId;
+  private int processedMessagesTimeId;
+  private int messageProcessingScheduleTimeId;
+  private int messageChannelTimeId;
+  private int udpDispatchRequestTimeId;
+  private int replyMessageTimeId;
+  private int distributeMessageTimeId;
+  private int nodesId;
+  private int overflowQueueSizeId;
+  private int processingThreadsId;
+  private int serialThreadsId;
+  private int waitingThreadsId;
+  private int highPriorityThreadsId;
+  private int partitionedRegionThreadsId;
+  private int functionExecutionThreadsId;
+  private int partitionedRegionThreadJobsId;
+  private int functionExecutionThreadJobsId;
+  private int waitingQueueSizeId;
+  private int overflowQueueThrottleTimeId;
+  private int overflowQueueThrottleCountId;
+  private int highPriorityQueueSizeId;
+  private int highPriorityQueueThrottleTimeId;
+  private int highPriorityQueueThrottleCountId;
+  private int partitionedRegionQueueSizeId;
+  private int partitionedRegionQueueThrottleTimeId;
+  private int partitionedRegionQueueThrottleCountId;
+  private int functionExecutionQueueSizeId;
+  private int functionExecutionQueueThrottleCountId;
+  private int functionExecutionQueueThrottleTimeId;
+  private int serialQueueSizeId;
+  private int serialQueueBytesId;
+  private int serialPooledThreadId;
+  private int serialQueueThrottleTimeId;
+  private int serialQueueThrottleCountId;
+  private int replyWaitsInProgressId;
+  private int replyWaitsCompletedId;
+  private int replyWaitTimeId;
+  private int replyTimeoutsId;
+  private int replyWaitMaxTimeId;
+  private int receiverConnectionsId;
+  private int failedAcceptsId;
+  private int failedConnectsId;
+  private int reconnectAttemptsId;
+  private int lostConnectionLeaseId;
+  private int sharedOrderedSenderConnectionsId;
+  private int sharedUnorderedSenderConnectionsId;
+  private int threadOrderedSenderConnectionsId;
+  private int threadUnorderedSenderConnectionsId;
+
+  private int syncSocketWritesInProgressId;
+  private int syncSocketWriteTimeId;
+  private int syncSocketWritesId;
+  private int syncSocketWriteBytesId;
+
+  private int ucastReadsId;
+  private int ucastReadBytesId;
+  private int ucastWritesId;
+  private int ucastWriteBytesId;
+  private int ucastRetransmitsId;
+
+  private int mcastReadsId;
+  private int mcastReadBytesId;
+  private int mcastWritesId;
+  private int mcastWriteBytesId;
+  private int mcastRetransmitsId;
+  private int mcastRetransmitRequestsId;
+
+  private int serializationTimeId;
+  private int serializationsId;
+  private int serializedBytesId;
+
+  private int pdxSerializationsId;
+  private int pdxSerializedBytesId;
+
+  private int deserializationTimeId;
+  private int deserializationsId;
+  private int deserializedBytesId;
+  private int pdxDeserializationsId;
+  private int pdxDeserializedBytesId;
+  private int pdxInstanceDeserializationsId;
+  private int pdxInstanceDeserializationTimeId;
+  private int pdxInstanceCreationsId;
+
+  private int msgSerializationTimeId;
+  private int msgDeserializationTimeId;
+
+  private int udpMsgEncryptionTimeId;
+  private int udpMsgDecryptionTimeId;
+
+  private int batchSendTimeId;
+  private int batchCopyTimeId;
+  private int batchWaitTimeId;
+  private int batchFlushTimeId;
+
+  private int threadOwnedReceiversId;
+  private int threadOwnedReceiversId2;
+
+  private int asyncSocketWritesInProgressId;
+  private int asyncSocketWritesId;
+  private int asyncSocketWriteRetriesId;
+  private int asyncSocketWriteTimeId;
+  private int asyncSocketWriteBytesId;
+
+  private int socketLocksInProgressId;
+  private int socketLocksId;
+  private int socketLockTimeId;
+
+  private int bufferAcquiresInProgressId;
+  private int bufferAcquiresId;
+  private int bufferAcquireTimeId;
+
+  private int asyncQueueAddTimeId;
+  private int asyncQueueRemoveTimeId;
+
+  private int asyncQueuesId;
+  private int asyncQueueFlushesInProgressId;
+  private int asyncQueueFlushesCompletedId;
+  private int asyncQueueFlushTimeId;
+  private int asyncQueueTimeoutExceededId;
+  private int asyncQueueSizeExceededId;
+  private int asyncDistributionTimeoutExceededId;
+  private int asyncQueueSizeId;
+  private int asyncQueuedMsgsId;
+  private int asyncDequeuedMsgsId;
+  private int asyncConflatedMsgsId;
+
+  private int asyncThreadsId;
+  private int asyncThreadInProgressId;
+  private int asyncThreadCompletedId;
+  private int asyncThreadTimeId;
+
+  private int receiverDirectBufferSizeId;
+  private int receiverHeapBufferSizeId;
+  private int senderDirectBufferSizeId;
+  private int senderHeapBufferSizeId;
+
+  private int messagesBeingReceivedId;
+  private int messageBytesBeingReceivedId;
+
+  private int serialThreadStartsId;
+  private int viewThreadStartsId;
+  private int processingThreadStartsId;
+  private int highPriorityThreadStartsId;
+  private int waitingThreadStartsId;
+  private int partitionedRegionThreadStartsId;
+  private int functionExecutionThreadStartsId;
+  private int serialPooledThreadStartsId;
+  private int TOSentMsgId;
+
+  private int replyHandoffTimeId;
+
+  private int viewThreadsId;
+  private int serialThreadJobsId;
+  private int viewProcessorThreadJobsId;
+  private int serialPooledThreadJobsId;
+  private int pooledMessageThreadJobsId;
+  private int highPriorityThreadJobsId;
+  private int waitingPoolThreadJobsId;
+
+  private int eldersId;
+  private int initialImageMessagesInFlightId;
+  private int initialImageRequestsInProgressId;
 
   // For GMSHealthMonitor
-  private static final int heartbeatRequestsSentId;
-  private static final int heartbeatRequestsReceivedId;
-  private static final int heartbeatsSentId;
-  private static final int heartbeatsReceivedId;
-  private static final int suspectsSentId;
-  private static final int suspectsReceivedId;
-  private static final int finalCheckRequestsSentId;
-  private static final int finalCheckRequestsReceivedId;
-  private static final int finalCheckResponsesSentId;
-  private static final int finalCheckResponsesReceivedId;
-  private static final int tcpFinalCheckRequestsSentId;
-  private static final int tcpFinalCheckRequestsReceivedId;
-  private static final int tcpFinalCheckResponsesSentId;
-  private static final int tcpFinalCheckResponsesReceivedId;
-  private static final int udpFinalCheckRequestsSentId;
-  private static final int udpFinalCheckRequestsReceivedId;
-  private static final int udpFinalCheckResponsesSentId;
-  private static final int udpFinalCheckResponsesReceivedId;
-
-  static {
+  private int heartbeatRequestsSentId;
+  private int heartbeatRequestsReceivedId;
+  private int heartbeatsSentId;
+  private int heartbeatsReceivedId;
+  private int suspectsSentId;
+  private int suspectsReceivedId;
+  private int finalCheckRequestsSentId;
+  private int finalCheckRequestsReceivedId;
+  private int finalCheckResponsesSentId;
+  private int finalCheckResponsesReceivedId;
+  private int tcpFinalCheckRequestsSentId;
+  private int tcpFinalCheckRequestsReceivedId;
+  private int tcpFinalCheckResponsesSentId;
+  private int tcpFinalCheckResponsesReceivedId;
+  private int udpFinalCheckRequestsSentId;
+  private int udpFinalCheckRequestsReceivedId;
+  private int udpFinalCheckResponsesSentId;
+  private int udpFinalCheckResponsesReceivedId;
+
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "DistributionStats";
     String statDescription = "Statistics on the gemfire distribution layer.";
 
@@ -439,305 +439,303 @@ public class DistributionStats implements DMStats {
     final String udpFinalCheckResponsesReceivedDesc =
         "UDP final check responses that this member has received.";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    type = f.createType(statName, statDescription, new StatisticDescriptor[] {
-        f.createLongCounter("sentMessages", sentMessagesDesc, "messages"),
-        f.createLongCounter("commitMessages", sentCommitMessagesDesc, "messages"),
-        f.createLongCounter("commitWaits", commitWaitsDesc, "messages"),
-        f.createLongCounter("sentMessagesTime", sentMessagesTimeDesc, "nanoseconds", false),
-        f.createLongGauge("sentMessagesMaxTime", sentMessagesMaxTimeDesc, "milliseconds", false),
-        f.createLongCounter("broadcastMessages", broadcastMessagesDesc, "messages"),
-        f.createLongCounter("broadcastMessagesTime", broadcastMessagesTimeDesc, "nanoseconds",
+    type = factory.createType(statName, statDescription, new StatisticDescriptor[] {
+        factory.createLongCounter("sentMessages", sentMessagesDesc, "messages"),
+        factory.createLongCounter("commitMessages", sentCommitMessagesDesc, "messages"),
+        factory.createLongCounter("commitWaits", commitWaitsDesc, "messages"),
+        factory.createLongCounter("sentMessagesTime", sentMessagesTimeDesc, "nanoseconds", false),
+        factory.createLongGauge("sentMessagesMaxTime", sentMessagesMaxTimeDesc, "milliseconds", false),
+        factory.createLongCounter("broadcastMessages", broadcastMessagesDesc, "messages"),
+        factory.createLongCounter("broadcastMessagesTime", broadcastMessagesTimeDesc, "nanoseconds",
             false),
-        f.createLongCounter("receivedMessages", receivedMessagesDesc, "messages"),
-        f.createLongCounter("receivedBytes", receivedBytesDesc, "bytes"),
-        f.createLongCounter("sentBytes", sentBytesDesc, "bytes"),
-        f.createLongCounter("processedMessages", processedMessagesDesc, "messages"),
-        f.createLongCounter("processedMessagesTime", processedMessagesTimeDesc, "nanoseconds",
+        factory.createLongCounter("receivedMessages", receivedMessagesDesc, "messages"),
+        factory.createLongCounter("receivedBytes", receivedBytesDesc, "bytes"),
+        factory.createLongCounter("sentBytes", sentBytesDesc, "bytes"),
+        factory.createLongCounter("processedMessages", processedMessagesDesc, "messages"),
+        factory.createLongCounter("processedMessagesTime", processedMessagesTimeDesc, "nanoseconds",
             false),
-        f.createLongCounter("messageProcessingScheduleTime", messageProcessingScheduleTimeDesc,
+        factory.createLongCounter("messageProcessingScheduleTime", messageProcessingScheduleTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("overflowQueueSize", overflowQueueSizeDesc, "messages"),
-        f.createIntGauge("waitingQueueSize", waitingQueueSizeDesc, "messages"),
-        f.createIntGauge("overflowQueueThrottleCount", overflowQueueThrottleCountDesc, "delays"),
-        f.createLongCounter("overflowQueueThrottleTime", overflowQueueThrottleTimeDesc,
+        factory.createIntGauge("overflowQueueSize", overflowQueueSizeDesc, "messages"),
+        factory.createIntGauge("waitingQueueSize", waitingQueueSizeDesc, "messages"),
+        factory.createIntGauge("overflowQueueThrottleCount", overflowQueueThrottleCountDesc, "delays"),
+        factory.createLongCounter("overflowQueueThrottleTime", overflowQueueThrottleTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("highPriorityQueueSize", highPriorityQueueSizeDesc, "messages"),
-        f.createIntGauge("highPriorityQueueThrottleCount", highPriorityQueueThrottleCountDesc,
+        factory.createIntGauge("highPriorityQueueSize", highPriorityQueueSizeDesc, "messages"),
+        factory.createIntGauge("highPriorityQueueThrottleCount", highPriorityQueueThrottleCountDesc,
             "delays"),
-        f.createLongCounter("highPriorityQueueThrottleTime", highPriorityQueueThrottleTimeDesc,
+        factory.createLongCounter("highPriorityQueueThrottleTime", highPriorityQueueThrottleTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("partitionedRegionQueueSize", highPriorityQueueSizeDesc, "messages"),
-        f.createIntGauge("partitionedRegionQueueThrottleCount", highPriorityQueueThrottleCountDesc,
+        factory.createIntGauge("partitionedRegionQueueSize", highPriorityQueueSizeDesc, "messages"),
+        factory.createIntGauge("partitionedRegionQueueThrottleCount", highPriorityQueueThrottleCountDesc,
             "delays"),
-        f.createLongCounter("partitionedRegionQueueThrottleTime", highPriorityQueueThrottleTimeDesc,
+        factory.createLongCounter("partitionedRegionQueueThrottleTime", highPriorityQueueThrottleTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("functionExecutionQueueSize", highPriorityQueueSizeDesc, "messages"),
-        f.createIntGauge("functionExecutionQueueThrottleCount", highPriorityQueueThrottleCountDesc,
+        factory.createIntGauge("functionExecutionQueueSize", highPriorityQueueSizeDesc, "messages"),
+        factory.createIntGauge("functionExecutionQueueThrottleCount", highPriorityQueueThrottleCountDesc,
             "delays"),
-        f.createLongCounter("functionExecutionQueueThrottleTime", highPriorityQueueThrottleTimeDesc,
+        factory.createLongCounter("functionExecutionQueueThrottleTime", highPriorityQueueThrottleTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("serialQueueSize", serialQueueSizeDesc, "messages"),
-        f.createIntGauge("serialQueueBytes", serialQueueBytesDesc, "bytes"),
-        f.createIntCounter("serialPooledThread", serialPooledThreadDesc, "threads"),
-        f.createIntGauge("serialQueueThrottleCount", serialQueueThrottleCountDesc, "delays"),
-        f.createLongCounter("serialQueueThrottleTime", serialQueueThrottleTimeDesc, "nanoseconds",
+        factory.createIntGauge("serialQueueSize", serialQueueSizeDesc, "messages"),
+        factory.createIntGauge("serialQueueBytes", serialQueueBytesDesc, "bytes"),
+        factory.createIntCounter("serialPooledThread", serialPooledThreadDesc, "threads"),
+        factory.createIntGauge("serialQueueThrottleCount", serialQueueThrottleCountDesc, "delays"),
+        factory.createLongCounter("serialQueueThrottleTime", serialQueueThrottleTimeDesc, "nanoseconds",
             false),
-        f.createIntGauge("serialThreads", serialThreadsDesc, "threads"),
-        f.createIntGauge("processingThreads", processingThreadsDesc, "threads"),
-        f.createIntGauge("highPriorityThreads", highPriorityThreadsDesc, "threads"),
-        f.createIntGauge("partitionedRegionThreads", partitionedRegionThreadsDesc, "threads"),
-        f.createIntGauge("functionExecutionThreads", functionExecutionThreadsDesc, "threads"),
-        f.createIntGauge("waitingThreads", waitingThreadsDesc, "threads"),
-        f.createLongCounter("messageChannelTime", messageChannelTimeDesc, "nanoseconds", false),
-        f.createLongCounter("udpDispatchRequestTime", udpDispatchRequestTimeDesc, "nanoseconds",
+        factory.createIntGauge("serialThreads", serialThreadsDesc, "threads"),
+        factory.createIntGauge("processingThreads", processingThreadsDesc, "threads"),
+        factory.createIntGauge("highPriorityThreads", highPriorityThreadsDesc, "threads"),
+        factory.createIntGauge("partitionedRegionThreads", partitionedRegionThreadsDesc, "threads"),
+        factory.createIntGauge("functionExecutionThreads", functionExecutionThreadsDesc, "threads"),
+        factory.createIntGauge("waitingThreads", waitingThreadsDesc, "threads"),
+        factory.createLongCounter("messageChannelTime", messageChannelTimeDesc, "nanoseconds", false),
+        factory.createLongCounter("udpDispatchRequestTime", udpDispatchRequestTimeDesc, "nanoseconds",
             false),
-        f.createLongCounter("replyMessageTime", replyMessageTimeDesc, "nanoseconds", false),
-        f.createLongCounter("distributeMessageTime", distributeMessageTimeDesc, "nanoseconds",
+        factory.createLongCounter("replyMessageTime", replyMessageTimeDesc, "nanoseconds", false),
+        factory.createLongCounter("distributeMessageTime", distributeMessageTimeDesc, "nanoseconds",
             false),
-        f.createIntGauge("nodes", nodesDesc, "nodes"),
-        f.createIntGauge("replyWaitsInProgress", replyWaitsInProgressDesc, "operations"),
-        f.createIntCounter("replyWaitsCompleted", replyWaitsCompletedDesc, "operations"),
-        f.createLongCounter("replyWaitTime", replyWaitTimeDesc, "nanoseconds", false),
-        f.createLongGauge("replyWaitMaxTime", replyWaitMaxTimeDesc, "milliseconds", false),
-        f.createLongCounter("replyTimeouts", replyTimeoutsDesc, "timeouts", false),
-        f.createIntGauge("receivers", receiverConnectionsDesc, "sockets"),
-        f.createIntGauge("sendersSO", sharedOrderedSenderConnectionsDesc, "sockets"),
-        f.createIntGauge("sendersSU", sharedUnorderedSenderConnectionsDesc, "sockets"),
-        f.createIntGauge("sendersTO", threadOrderedSenderConnectionsDesc, "sockets"),
-        f.createIntGauge("sendersTU", threadUnorderedSenderConnectionsDesc, "sockets"),
-        f.createIntCounter("failedAccepts", failedAcceptsDesc, "accepts"),
-        f.createIntCounter("failedConnects", failedConnectsDesc, "connects"),
-        f.createIntCounter("reconnectAttempts", reconnectAttemptsDesc, "connects"),
-        f.createIntCounter("senderTimeouts", lostConnectionLeaseDesc, "expirations"),
-
-        f.createIntGauge("syncSocketWritesInProgress",
+        factory.createIntGauge("nodes", nodesDesc, "nodes"),
+        factory.createIntGauge("replyWaitsInProgress", replyWaitsInProgressDesc, "operations"),
+        factory.createIntCounter("replyWaitsCompleted", replyWaitsCompletedDesc, "operations"),
+        factory.createLongCounter("replyWaitTime", replyWaitTimeDesc, "nanoseconds", false),
+        factory.createLongGauge("replyWaitMaxTime", replyWaitMaxTimeDesc, "milliseconds", false),
+        factory.createLongCounter("replyTimeouts", replyTimeoutsDesc, "timeouts", false),
+        factory.createIntGauge("receivers", receiverConnectionsDesc, "sockets"),
+        factory.createIntGauge("sendersSO", sharedOrderedSenderConnectionsDesc, "sockets"),
+        factory.createIntGauge("sendersSU", sharedUnorderedSenderConnectionsDesc, "sockets"),
+        factory.createIntGauge("sendersTO", threadOrderedSenderConnectionsDesc, "sockets"),
+        factory.createIntGauge("sendersTU", threadUnorderedSenderConnectionsDesc, "sockets"),
+        factory.createIntCounter("failedAccepts", failedAcceptsDesc, "accepts"),
+        factory.createIntCounter("failedConnects", failedConnectsDesc, "connects"),
+        factory.createIntCounter("reconnectAttempts", reconnectAttemptsDesc, "connects"),
+        factory.createIntCounter("senderTimeouts", lostConnectionLeaseDesc, "expirations"),
+
+        factory.createIntGauge("syncSocketWritesInProgress",
             "Current number of synchronous/blocking socket write calls in progress.", "writes"),
-        f.createLongCounter("syncSocketWriteTime",
+        factory.createLongCounter("syncSocketWriteTime",
             "Total amount of time, in nanoseconds, spent in synchronous/blocking socket write calls.",
             "nanoseconds"),
-        f.createIntCounter("syncSocketWrites",
+        factory.createIntCounter("syncSocketWrites",
             "Total number of completed synchronous/blocking socket write calls.", "writes"),
-        f.createLongCounter("syncSocketWriteBytes",
+        factory.createLongCounter("syncSocketWriteBytes",
             "Total number of bytes sent out in synchronous/blocking mode on sockets.", "bytes"),
 
-        f.createIntCounter("ucastReads", "Total number of unicast datagrams received", "datagrams"),
-        f.createLongCounter("ucastReadBytes", "Total number of bytes received in unicast datagrams",
+        factory.createIntCounter("ucastReads", "Total number of unicast datagrams received", "datagrams"),
+        factory.createLongCounter("ucastReadBytes", "Total number of bytes received in unicast datagrams",
             "bytes"),
-        f.createIntCounter("ucastWrites", "Total number of unicast datagram socket write calls.",
+        factory.createIntCounter("ucastWrites", "Total number of unicast datagram socket write calls.",
             "writes"),
-        f.createLongCounter("ucastWriteBytes",
+        factory.createLongCounter("ucastWriteBytes",
             "Total number of bytes sent out on unicast datagram sockets.", "bytes"),
-        f.createIntCounter("ucastRetransmits",
+        factory.createIntCounter("ucastRetransmits",
             "Total number of unicast datagram socket retransmissions", "writes"),
 
-        f.createIntCounter("mcastReads", "Total number of multicast datagrams received",
+        factory.createIntCounter("mcastReads", "Total number of multicast datagrams received",
             "datagrams"),
-        f.createLongCounter("mcastReadBytes",
+        factory.createLongCounter("mcastReadBytes",
             "Total number of bytes received in multicast datagrams", "bytes"),
-        f.createIntCounter("mcastWrites", "Total number of multicast datagram socket write calls.",
+        factory.createIntCounter("mcastWrites", "Total number of multicast datagram socket write calls.",
             "writes"),
-        f.createLongCounter("mcastWriteBytes",
+        factory.createLongCounter("mcastWriteBytes",
             "Total number of bytes sent out on multicast datagram sockets.", "bytes"),
-        f.createIntCounter("mcastRetransmits",
+        factory.createIntCounter("mcastRetransmits",
             "Total number of multicast datagram socket retransmissions", "writes"),
-        f.createIntCounter("mcastRetransmitRequests",
+        factory.createIntCounter("mcastRetransmitRequests",
             "Total number of multicast datagram socket retransmission requests sent to other processes",
             "requests"),
 
-        f.createLongCounter("serializationTime",
+        factory.createLongCounter("serializationTime",
             "Total amount of time, in nanoseconds, spent serializing objects. This includes pdx serializations.",
             "nanoseconds"),
-        f.createIntCounter("serializations",
+        factory.createIntCounter("serializations",
             "Total number of object serialization calls. This includes pdx serializations.", "ops"),
-        f.createLongCounter("serializedBytes",
+        factory.createLongCounter("serializedBytes",
             "Total number of bytes produced by object serialization. This includes pdx serializations.",
             "bytes"),
-        f.createIntCounter("pdxSerializations", "Total number of pdx serializations.", "ops"),
-        f.createLongCounter("pdxSerializedBytes",
+        factory.createIntCounter("pdxSerializations", "Total number of pdx serializations.", "ops"),
+        factory.createLongCounter("pdxSerializedBytes",
             "Total number of bytes produced by pdx serialization.", "bytes"),
-        f.createLongCounter("deserializationTime",
+        factory.createLongCounter("deserializationTime",
             "Total amount of time, in nanoseconds, spent deserializing objects. This includes deserialization that results in a PdxInstance.",
             "nanoseconds"),
-        f.createIntCounter("deserializations",
+        factory.createIntCounter("deserializations",
             "Total number of object deserialization calls. This includes deserialization that results in a PdxInstance.",
             "ops"),
-        f.createLongCounter("deserializedBytes",
+        factory.createLongCounter("deserializedBytes",
             "Total number of bytes read by object deserialization. This includes deserialization that results in a PdxInstance.",
             "bytes"),
-        f.createIntCounter("pdxDeserializations", "Total number of pdx deserializations.", "ops"),
-        f.createLongCounter("pdxDeserializedBytes",
+        factory.createIntCounter("pdxDeserializations", "Total number of pdx deserializations.", "ops"),
+        factory.createLongCounter("pdxDeserializedBytes",
             "Total number of bytes read by pdx deserialization.", "bytes"),
-        f.createLongCounter("msgSerializationTime",
+        factory.createLongCounter("msgSerializationTime",
             "Total amount of time, in nanoseconds, spent serializing messages.", "nanoseconds"),
-        f.createLongCounter("msgDeserializationTime",
+        factory.createLongCounter("msgDeserializationTime",
             "Total amount of time, in nanoseconds, spent deserializing messages.", "nanoseconds"),
-        f.createLongCounter("udpMsgEncryptionTime",
+        factory.createLongCounter("udpMsgEncryptionTime",
             "Total amount of time, in nanoseconds, spent encrypting udp messages.", "nanoseconds"),
-        f.createLongCounter("udpMsgDecryptionTime",
+        factory.createLongCounter("udpMsgDecryptionTime",
             "Total amount of time, in nanoseconds, spent decrypting udp messages.", "nanoseconds"),
-        f.createIntCounter("pdxInstanceDeserializations",
+        factory.createIntCounter("pdxInstanceDeserializations",
             "Total number of times getObject has been called on a PdxInstance.", "ops"),
-        f.createLongCounter("pdxInstanceDeserializationTime",
+        factory.createLongCounter("pdxInstanceDeserializationTime",
             "Total amount of time, in nanoseconds, spent deserializing PdxInstances by calling getObject.",
             "nanoseconds"),
-        f.createIntCounter("pdxInstanceCreations",
+        factory.createIntCounter("pdxInstanceCreations",
             "Total number of times a deserialization created a PdxInstance.", "ops"),
 
-        f.createLongCounter("batchSendTime",
+        factory.createLongCounter("batchSendTime",
             "Total amount of time, in nanoseconds, spent queueing and flushing message batches",
             "nanoseconds"),
-        f.createLongCounter("batchWaitTime", "Reserved for future use", "nanoseconds"),
-        f.createLongCounter("batchCopyTime",
+        factory.createLongCounter("batchWaitTime", "Reserved for future use", "nanoseconds"),
+        factory.createLongCounter("batchCopyTime",
             "Total amount of time, in nanoseconds, spent copying messages for batched transmission",
             "nanoseconds"),
-        f.createLongCounter("batchFlushTime",
+        factory.createLongCounter("batchFlushTime",
             "Total amount of time, in nanoseconds, spent flushing batched messages to the network",
             "nanoseconds"),
 
-        f.createIntGauge("asyncSocketWritesInProgress",
+        factory.createIntGauge("asyncSocketWritesInProgress",
             "Current number of non-blocking socket write calls in progress.", "writes"),
-        f.createIntCounter("asyncSocketWrites",
+        factory.createIntCounter("asyncSocketWrites",
             "Total number of non-blocking socket write calls completed.", "writes"),
-        f.createIntCounter("asyncSocketWriteRetries",
+        factory.createIntCounter("asyncSocketWriteRetries",
             "Total number of retries needed to write a single block of data using non-blocking socket write calls.",
             "writes"),
-        f.createLongCounter("asyncSocketWriteTime",
+        factory.createLongCounter("asyncSocketWriteTime",
             "Total amount of time, in nanoseconds, spent in non-blocking socket write calls.",
             "nanoseconds"),
-        f.createLongCounter("asyncSocketWriteBytes",
+        factory.createLongCounter("asyncSocketWriteBytes",
             "Total number of bytes sent out on non-blocking sockets.", "bytes"),
 
-        f.createLongCounter("asyncQueueAddTime",
+        factory.createLongCounter("asyncQueueAddTime",
             "Total amount of time, in nanoseconds, spent in adding messages to async queue.",
             "nanoseconds"),
-        f.createLongCounter("asyncQueueRemoveTime",
+        factory.createLongCounter("asyncQueueRemoveTime",
             "Total amount of time, in nanoseconds, spent in removing messages from async queue.",
             "nanoseconds"),
 
-        f.createIntGauge("asyncQueues", asyncQueuesDesc, "queues"),
-        f.createIntGauge("asyncQueueFlushesInProgress", asyncQueueFlushesInProgressDesc,
+        factory.createIntGauge("asyncQueues", asyncQueuesDesc, "queues"),
+        factory.createIntGauge("asyncQueueFlushesInProgress", asyncQueueFlushesInProgressDesc,
             "operations"),
-        f.createIntCounter("asyncQueueFlushesCompleted", asyncQueueFlushesCompletedDesc,
+        factory.createIntCounter("asyncQueueFlushesCompleted", asyncQueueFlushesCompletedDesc,
             "operations"),
-        f.createLongCounter("asyncQueueFlushTime", asyncQueueFlushTimeDesc, "nanoseconds", false),
-        f.createIntCounter("asyncQueueTimeoutExceeded", asyncQueueTimeoutExceededDesc, "timeouts"),
-        f.createIntCounter("asyncQueueSizeExceeded", asyncQueueSizeExceededDesc, "operations"),
-        f.createIntCounter("asyncDistributionTimeoutExceeded", asyncDistributionTimeoutExceededDesc,
+        factory.createLongCounter("asyncQueueFlushTime", asyncQueueFlushTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("asyncQueueTimeoutExceeded", asyncQueueTimeoutExceededDesc, "timeouts"),
+        factory.createIntCounter("asyncQueueSizeExceeded", asyncQueueSizeExceededDesc, "operations"),
+        factory.createIntCounter("asyncDistributionTimeoutExceeded", asyncDistributionTimeoutExceededDesc,
             "operations"),
-        f.createLongGauge("asyncQueueSize", asyncQueueSizeDesc, "bytes"),
-        f.createLongCounter("asyncQueuedMsgs", asyncQueuedMsgsDesc, "msgs"),
-        f.createLongCounter("asyncDequeuedMsgs", asyncDequeuedMsgsDesc, "msgs"),
-        f.createLongCounter("asyncConflatedMsgs", asyncConflatedMsgsDesc, "msgs"),
+        factory.createLongGauge("asyncQueueSize", asyncQueueSizeDesc, "bytes"),
+        factory.createLongCounter("asyncQueuedMsgs", asyncQueuedMsgsDesc, "msgs"),
+        factory.createLongCounter("asyncDequeuedMsgs", asyncDequeuedMsgsDesc, "msgs"),
+        factory.createLongCounter("asyncConflatedMsgs", asyncConflatedMsgsDesc, "msgs"),
 
-        f.createIntGauge("asyncThreads", asyncThreadsDesc, "threads"),
-        f.createIntGauge("asyncThreadInProgress", asyncThreadInProgressDesc, "operations"),
-        f.createIntCounter("asyncThreadCompleted", asyncThreadCompletedDesc, "operations"),
-        f.createLongCounter("asyncThreadTime", asyncThreadTimeDesc, "nanoseconds", false),
+        factory.createIntGauge("asyncThreads", asyncThreadsDesc, "threads"),
+        factory.createIntGauge("asyncThreadInProgress", asyncThreadInProgressDesc, "operations"),
+        factory.createIntCounter("asyncThreadCompleted", asyncThreadCompletedDesc, "operations"),
+        factory.createLongCounter("asyncThreadTime", asyncThreadTimeDesc, "nanoseconds", false),
 
-        f.createLongGauge("receiversTO",
+        factory.createLongGauge("receiversTO",
             "Number of receiver threads owned by non-receiver threads in other members.",
             "threads"),
-        f.createLongGauge("receiversTO2",
+        factory.createLongGauge("receiversTO2",
             "Number of receiver threads owned in turn by receiver threads in other members",
             "threads"),
 
-        f.createLongGauge("receiverDirectBufferSize", receiverDirectBufferSizeDesc, "bytes"),
-        f.createLongGauge("receiverHeapBufferSize", receiverHeapBufferSizeDesc, "bytes"),
-        f.createLongGauge("senderDirectBufferSize", senderDirectBufferSizeDesc, "bytes"),
-        f.createLongGauge("senderHeapBufferSize", senderHeapBufferSizeDesc, "bytes"),
-        f.createIntGauge("socketLocksInProgress",
+        factory.createLongGauge("receiverDirectBufferSize", receiverDirectBufferSizeDesc, "bytes"),
+        factory.createLongGauge("receiverHeapBufferSize", receiverHeapBufferSizeDesc, "bytes"),
+        factory.createLongGauge("senderDirectBufferSize", senderDirectBufferSizeDesc, "bytes"),
+        factory.createLongGauge("senderHeapBufferSize", senderHeapBufferSizeDesc, "bytes"),
+        factory.createIntGauge("socketLocksInProgress",
             "Current number of threads waiting to lock a socket", "threads", false),
-        f.createIntCounter("socketLocks", "Total number of times a socket has been locked.",
+        factory.createIntCounter("socketLocks", "Total number of times a socket has been locked.",
             "locks"),
-        f.createLongCounter("socketLockTime",
+        factory.createLongCounter("socketLockTime",
             "Total amount of time, in nanoseconds, spent locking a socket", "nanoseconds", false),
-        f.createIntGauge("bufferAcquiresInProgress",
+        factory.createIntGauge("bufferAcquiresInProgress",
             "Current number of threads waiting to acquire a buffer", "threads", false),
-        f.createIntCounter("bufferAcquires", "Total number of times a buffer has been acquired.",
+        factory.createIntCounter("bufferAcquires", "Total number of times a buffer has been acquired.",
             "operations"),
-        f.createLongCounter("bufferAcquireTime",
+        factory.createLongCounter("bufferAcquireTime",
             "Total amount of time, in nanoseconds, spent acquiring a socket", "nanoseconds", false),
 
-        f.createIntGauge("messagesBeingReceived",
+        factory.createIntGauge("messagesBeingReceived",
             "Current number of message being received off the network or being processed after reception.",
             "messages"),
-        f.createLongGauge("messageBytesBeingReceived",
+        factory.createLongGauge("messageBytesBeingReceived",
             "Current number of bytes consumed by messages being received or processed.", "bytes"),
 
-        f.createLongCounter("serialThreadStarts",
+        factory.createLongCounter("serialThreadStarts",
             "Total number of times a thread has been created for the serial message executor.",
             "starts", false),
-        f.createLongCounter("viewThreadStarts",
+        factory.createLongCounter("viewThreadStarts",
             "Total number of times a thread has been created for the view message executor.",
             "starts", false),
-        f.createLongCounter("processingThreadStarts",
+        factory.createLongCounter("processingThreadStarts",
             "Total number of times a thread has been created for the pool processing normal messages.",
             "starts", false),
-        f.createLongCounter("highPriorityThreadStarts",
+        factory.createLongCounter("highPriorityThreadStarts",
             "Total number of times a thread has been created for the pool handling high priority messages.",
             "starts", false),
-        f.createLongCounter("waitingThreadStarts",
+        factory.createLongCounter("waitingThreadStarts",
             "Total number of times a thread has been created for the waiting pool.", "starts",
             false),
-        f.createLongCounter("partitionedRegionThreadStarts",
+        factory.createLongCounter("partitionedRegionThreadStarts",
             "Total number of times a thread has been created for the pool handling partitioned region messages.",
             "starts", false),
-        f.createLongCounter("functionExecutionThreadStarts",
+        factory.createLongCounter("functionExecutionThreadStarts",
             "Total number of times a thread has been created for the pool handling function execution messages.",
             "starts", false),
-        f.createLongCounter("serialPooledThreadStarts",
+        factory.createLongCounter("serialPooledThreadStarts",
             "Total number of times a thread has been created for the serial pool(s).", "starts",
             false),
-        f.createLongCounter("TOSentMsgs", "Total number of messages sent on thread owned senders",
+        factory.createLongCounter("TOSentMsgs", "Total number of messages sent on thread owned senders",
             "messages", false),
-        f.createLongCounter("replyHandoffTime", replyHandoffTimeDesc, "nanoseconds"),
+        factory.createLongCounter("replyHandoffTime", replyHandoffTimeDesc, "nanoseconds"),
 
-        f.createIntGauge("partitionedRegionThreadJobs", partitionedRegionThreadJobsDesc,
+        factory.createIntGauge("partitionedRegionThreadJobs", partitionedRegionThreadJobsDesc,
             "messages"),
-        f.createIntGauge("functionExecutionThreadJobs", functionExecutionThreadJobsDesc,
+        factory.createIntGauge("functionExecutionThreadJobs", functionExecutionThreadJobsDesc,
             "messages"),
-        f.createIntGauge("viewThreads", viewThreadsDesc, "threads"),
-        f.createIntGauge("serialThreadJobs", serialThreadJobsDesc, "messages"),
-        f.createIntGauge("viewThreadJobs", viewThreadJobsDesc, "messages"),
-        f.createIntGauge("serialPooledThreadJobs", serialPooledThreadJobsDesc, "messages"),
-        f.createIntGauge("processingThreadJobs", processingThreadJobsDesc, "messages"),
-        f.createIntGauge("highPriorityThreadJobs", highPriorityThreadJobsDesc, "messages"),
-        f.createIntGauge("waitingThreadJobs", waitingThreadJobsDesc, "messages"),
-
-        f.createIntGauge("elders", eldersDesc, "elders"),
-        f.createIntGauge("initialImageMessagesInFlight", initialImageMessagesInFlightDesc,
+        factory.createIntGauge("viewThreads", viewThreadsDesc, "threads"),
+        factory.createIntGauge("serialThreadJobs", serialThreadJobsDesc, "messages"),
+        factory.createIntGauge("viewThreadJobs", viewThreadJobsDesc, "messages"),
+        factory.createIntGauge("serialPooledThreadJobs", serialPooledThreadJobsDesc, "messages"),
+        factory.createIntGauge("processingThreadJobs", processingThreadJobsDesc, "messages"),
+        factory.createIntGauge("highPriorityThreadJobs", highPriorityThreadJobsDesc, "messages"),
+        factory.createIntGauge("waitingThreadJobs", waitingThreadJobsDesc, "messages"),
+
+        factory.createIntGauge("elders", eldersDesc, "elders"),
+        factory.createIntGauge("initialImageMessagesInFlight", initialImageMessagesInFlightDesc,
             "messages"),
-        f.createIntGauge("initialImageRequestsInProgress", initialImageRequestsInProgressDesc,
+        factory.createIntGauge("initialImageRequestsInProgress", initialImageRequestsInProgressDesc,
             "requests"),
 
         // For GMSHealthMonitor
-        f.createLongCounter("heartbeatRequestsSent", heartbeatRequestsSentDesc, "messages"),
-        f.createLongCounter("heartbeatRequestsReceived", heartbeatRequestsReceivedDesc, "messages"),
-        f.createLongCounter("heartbeatsSent", heartbeatsSentDesc, "messages"),
-        f.createLongCounter("heartbeatsReceived", heartbeatsReceivedDesc, "messages"),
-        f.createLongCounter("suspectsSent", suspectsSentDesc, "messages"),
-        f.createLongCounter("suspectsReceived", suspectsReceivedDesc, "messages"),
-        f.createLongCounter("finalCheckRequestsSent", finalCheckRequestsSentDesc, "messages"),
-        f.createLongCounter("finalCheckRequestsReceived", finalCheckRequestsReceivedDesc,
+        factory.createLongCounter("heartbeatRequestsSent", heartbeatRequestsSentDesc, "messages"),
+        factory.createLongCounter("heartbeatRequestsReceived", heartbeatRequestsReceivedDesc, "messages"),
+        factory.createLongCounter("heartbeatsSent", heartbeatsSentDesc, "messages"),
+        factory.createLongCounter("heartbeatsReceived", heartbeatsReceivedDesc, "messages"),
+        factory.createLongCounter("suspectsSent", suspectsSentDesc, "messages"),
+        factory.createLongCounter("suspectsReceived", suspectsReceivedDesc, "messages"),
+        factory.createLongCounter("finalCheckRequestsSent", finalCheckRequestsSentDesc, "messages"),
+        factory.createLongCounter("finalCheckRequestsReceived", finalCheckRequestsReceivedDesc,
             "messages"),
-        f.createLongCounter("finalCheckResponsesSent", finalCheckResponsesSentDesc, "messages"),
-        f.createLongCounter("finalCheckResponsesReceived", finalCheckResponsesReceivedDesc,
+        factory.createLongCounter("finalCheckResponsesSent", finalCheckResponsesSentDesc, "messages"),
+        factory.createLongCounter("finalCheckResponsesReceived", finalCheckResponsesReceivedDesc,
             "messages"),
-        f.createLongCounter("tcpFinalCheckRequestsSent", tcpFinalCheckRequestsSentDesc, "messages"),
-        f.createLongCounter("tcpFinalCheckRequestsReceived", tcpFinalCheckRequestsReceivedDesc,
+        factory.createLongCounter("tcpFinalCheckRequestsSent", tcpFinalCheckRequestsSentDesc, "messages"),
+        factory.createLongCounter("tcpFinalCheckRequestsReceived", tcpFinalCheckRequestsReceivedDesc,
             "messages"),
-        f.createLongCounter("tcpFinalCheckResponsesSent", tcpFinalCheckResponsesSentDesc,
+        factory.createLongCounter("tcpFinalCheckResponsesSent", tcpFinalCheckResponsesSentDesc,
             "messages"),
-        f.createLongCounter("tcpFinalCheckResponsesReceived", tcpFinalCheckResponsesReceivedDesc,
+        factory.createLongCounter("tcpFinalCheckResponsesReceived", tcpFinalCheckResponsesReceivedDesc,
             "messages"),
-        f.createLongCounter("udpFinalCheckRequestsSent", udpFinalCheckRequestsSentDesc, "messages"),
-        f.createLongCounter("udpFinalCheckRequestsReceived", udpFinalCheckRequestsReceivedDesc,
+        factory.createLongCounter("udpFinalCheckRequestsSent", udpFinalCheckRequestsSentDesc, "messages"),
+        factory.createLongCounter("udpFinalCheckRequestsReceived", udpFinalCheckRequestsReceivedDesc,
             "messages"),
-        f.createLongCounter("udpFinalCheckResponsesSent", udpFinalCheckResponsesSentDesc,
+        factory.createLongCounter("udpFinalCheckResponsesSent", udpFinalCheckResponsesSentDesc,
             "messages"),
-        f.createLongCounter("udpFinalCheckResponsesReceived", udpFinalCheckResponsesReceivedDesc,
+        factory.createLongCounter("udpFinalCheckResponsesReceived", udpFinalCheckResponsesReceivedDesc,
             "messages"),});
 
     // Initialize id fields
@@ -942,27 +940,19 @@ public class DistributionStats implements DMStats {
    * Creates a new <code>DistributionStats</code> and registers itself with the given statistics
    * factory.
    */
-  public DistributionStats(StatisticsFactory f, long statId) {
-    this.stats = f.createAtomicStatistics(type, "distributionStats", statId);
-    // this.replyHandoffHistogram = new HistogramStats("ReplyHandOff", "nanoseconds", f,
+  public DistributionStats(StatisticsFactory factory, long statId) {
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(type, "distributionStats", statId);
+    // this.replyHandoffHistogram = new HistogramStats("ReplyHandOff", "nanoseconds", factory,
     // new long[] {100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000},
     // false);
-    // this.replyWaitHistogram = new HistogramStats("ReplyWait", "nanoseconds", f,
+    // this.replyWaitHistogram = new HistogramStats("ReplyWait", "nanoseconds", factory,
     // new long[] {100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000},
     // false);
     Buffers.initBufferStats(this);
   }
 
   /**
-   * Used by tests to create an instance given its already existings stats.
-   */
-  public DistributionStats(Statistics stats) {
-    this.stats = stats;
-    // this.replyHandoffHistogram = null;
-    // this.replyWaitHistogram = null;
-  }
-
-  /**
    * Returns the current NanoTime or, if clock stats are disabled, zero.
    *
    * @since GemFire 5.0
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 cc32d18..fa38b24 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
@@ -20,7 +20,6 @@ import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.Reader;
 import java.lang.reflect.Array;
 import java.net.InetAddress;
 import java.util.ArrayList;
@@ -37,10 +36,8 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.StringTokenizer;
 import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.logging.log4j.Logger;
@@ -52,11 +49,8 @@ import org.apache.geode.GemFireConfigException;
 import org.apache.geode.GemFireIOException;
 import org.apache.geode.LogWriter;
 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;
@@ -87,8 +81,6 @@ import org.apache.geode.internal.cache.CacheServerImpl;
 import org.apache.geode.internal.cache.EventID;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.internal.cache.execute.FunctionServiceStats;
-import org.apache.geode.internal.cache.execute.FunctionStats;
 import org.apache.geode.internal.cache.tier.sockets.EncryptorImpl;
 import org.apache.geode.internal.cache.xmlcache.CacheServerCreation;
 import org.apache.geode.internal.i18n.LocalizedStrings;
@@ -105,14 +97,9 @@ import org.apache.geode.internal.offheap.MemoryAllocator;
 import org.apache.geode.internal.offheap.OffHeapStorage;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.internal.security.SecurityServiceFactory;
-import org.apache.geode.internal.statistics.DummyStatisticsImpl;
 import org.apache.geode.internal.statistics.GemFireStatSampler;
-import org.apache.geode.internal.statistics.LocalStatisticsImpl;
-import org.apache.geode.internal.statistics.StatisticsImpl;
-import org.apache.geode.internal.statistics.StatisticsManager;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 import org.apache.geode.internal.statistics.platform.LinuxProcFsStatistics;
-import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
 import org.apache.geode.internal.tcp.ConnectionTable;
 import org.apache.geode.management.ManagementException;
 import org.apache.geode.security.GemFireSecurityException;
@@ -232,11 +219,6 @@ public class InternalDistributedSystem extends DistributedSystem {
   private boolean isLoner = false;
 
   /**
-   * The sampler for this DistributedSystem.
-   */
-  private GemFireStatSampler sampler = null;
-
-  /**
    * A set of listeners that are invoked when this connection to the distributed system is
    * disconnected
    */
@@ -539,7 +521,8 @@ public class InternalDistributedSystem extends DistributedSystem {
     this.creationStack =
         TEST_CREATION_STACK_GENERATOR.get().generateCreationStack(this.originalConfig);
 
-    this.internalDistributedSystemStats = new InternalDistributedSystemStats(this.statsDisabled);
+    this.internalDistributedSystemStats = new InternalDistributedSystemStats(this.statsDisabled,this.getConfig(),
+        this,new StatisticsTypeFactoryImpl());
   }
 
   //////////////////// Instance Methods ////////////////////
@@ -813,12 +796,6 @@ public class InternalDistributedSystem extends DistributedSystem {
       } catch (IOException e) {
         throw new GemFireIOException("Problem finishing a locator service start", e);
       }
-
-      if (!statsDisabled) {
-        this.sampler = new GemFireStatSampler(this);
-        this.sampler.start();
-      }
-
       if (this.logWriterAppender != null) {
         LogWriterAppenders.startupComplete(LogWriterAppenders.Identifier.MAIN);
       }
@@ -1012,13 +989,6 @@ public class InternalDistributedSystem extends DistributedSystem {
   }
 
   /**
-   * Returns the stat sampler
-   */
-  public GemFireStatSampler getStatSampler() {
-    return this.sampler;
-  }
-
-  /**
    * Has this system started the disconnect process?
    */
   protected volatile boolean isDisconnecting = false;
@@ -1452,15 +1422,10 @@ public class InternalDistributedSystem extends DistributedSystem {
         doShutdownListeners(shutdownListeners);
       }
 
-      this.getInternalDistributedSystemStats().closeFunctionStats();
+      this.getInternalDistributedSystemStats().closeStats();
 
       (new FunctionServiceManager()).unregisterAllFunctions();
 
-      if (this.sampler != null) {
-        this.sampler.stop();
-        this.sampler = null;
-      }
-
       if (!this.attemptingToReconnect) {
         if (this.logWriterAppender != null) {
           LogWriterAppenders.destroy(LogWriterAppenders.Identifier.MAIN);
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 3e14fba..e4bdb52 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
@@ -385,11 +385,7 @@ public class InternalLocator extends Locator implements ConnectListener {
    * @param startDistributedSystem if true locator will start its own distributed system
    */
   private InternalLocator(int port, File logF, InternalLogWriter logWriter,
-      // LOG: 3 non-null sources: GemFireDistributionLocator, InternalDistributedSystem,
-      // LocatorLauncher
       InternalLogWriter securityLogWriter,
-      // LOG: 1 non-null source: GemFireDistributionLocator(same instance as logWriter),
-      // InternalDistributedSystem
       InetAddress bindAddress, String hostnameForClients, Properties distributedSystemProperties,
       DistributionConfigImpl cfg, boolean startDistributedSystem) {
 
@@ -476,7 +472,7 @@ public class InternalLocator extends Locator implements ConnectListener {
     this.handler = new PrimaryHandler(this, locatorListener);
 
     ThreadGroup group = LoggingThreadGroup.createThreadGroup("Distribution locators", logger);
-    this.stats = new LocatorStats();
+    this.stats = new LocatorStats(this.getDistributedSystem().getStatisticsFactory());
 
     this.server = new TcpServerFactory().makeTcpServer(port, this.bindAddress, null, this.config,
         this.handler, new DelayedPoolStatHelper(), group, this.toString(), this);
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 37a8b48..5de76b4 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
@@ -53,37 +53,36 @@ public class LocatorStats {
   private AtomicLong serverLoadUpdates = new AtomicLong();
 
 
-  private static final int _KNOWN_LOCATORS;
-  private static final int _REQUESTS_TO_LOCATOR;
-  private static final int _RESPONSES_FROM_LOCATOR;
-  private static final int _ENDPOINTS_KNOWN;
-  private static final int _REQUESTS_IN_PROGRESS;
-  private static final int _REQUEST_TIME;
-  private static final int _RESPONSE_TIME;
-  private static final int _SERVER_LOAD_UPDATES;
+  private int _KNOWN_LOCATORS;
+  private int _REQUESTS_TO_LOCATOR;
+  private int _RESPONSES_FROM_LOCATOR;
+  private int _ENDPOINTS_KNOWN;
+  private int _REQUESTS_IN_PROGRESS;
+  private int _REQUEST_TIME;
+  private int _RESPONSE_TIME;
+  private int _SERVER_LOAD_UPDATES;
 
 
   private Statistics _stats = null;
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "LocatorStats";
     String statDescription = "Statistics on the gemfire locator.";
     String serverThreadsDesc =
         "The number of location requests currently being processed by the thread pool.";
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    type = f.createType(statName, statDescription, new StatisticDescriptor[] {
-        f.createIntGauge(KNOWN_LOCATORS, "Number of locators known to this locator", LOCATORS),
-        f.createLongCounter(REQUESTS_TO_LOCATOR,
+    type = factory.createType(statName, statDescription, new StatisticDescriptor[] {
+        factory.createIntGauge(KNOWN_LOCATORS, "Number of locators known to this locator", LOCATORS),
+        factory.createLongCounter(REQUESTS_TO_LOCATOR,
             "Number of requests this locator has received from clients", "requests"),
-        f.createLongCounter(RESPONSES_FROM_LOCATOR,
+        factory.createLongCounter(RESPONSES_FROM_LOCATOR,
             "Number of responses this locator has sent to clients", "responses"),
-        f.createIntGauge(ENDPOINTS_KNOWN, "Number of servers this locator knows about", "servers"),
-        f.createIntGauge(REQUESTS_IN_PROGRESS, serverThreadsDesc, "requests"),
-        f.createLongCounter(REQUEST_TIME, "Time spent processing server location requests",
+        factory.createIntGauge(ENDPOINTS_KNOWN, "Number of servers this locator knows about", "servers"),
+        factory.createIntGauge(REQUESTS_IN_PROGRESS, serverThreadsDesc, "requests"),
+        factory.createLongCounter(REQUEST_TIME, "Time spent processing server location requests",
             "nanoseconds"),
-        f.createLongCounter(RESPONSE_TIME, "Time spent sending location responses to clients",
+        factory.createLongCounter(RESPONSE_TIME, "Time spent sending location responses to clients",
             "nanoseconds"),
-        f.createLongCounter(SERVER_LOAD_UPDATES,
+        factory.createLongCounter(SERVER_LOAD_UPDATES,
             "Total number of times a server load update has been received.", "updates"),});
 
     _REQUESTS_IN_PROGRESS = type.nameToId(REQUESTS_IN_PROGRESS);
@@ -99,7 +98,9 @@ public class LocatorStats {
   /**
    * Creates a new <code>LocatorStats</code> and registers itself with the given statistics factory.
    */
-  public LocatorStats() {}
+  public LocatorStats(StatisticsFactory factory) {
+    initializeStats(factory);
+  }
 
   /**
    * Called when the DS comes online so we can hookup the stats
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/RuntimeDistributionConfigImpl.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/RuntimeDistributionConfigImpl.java
index bb22e3f..603cc4c 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/RuntimeDistributionConfigImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/RuntimeDistributionConfigImpl.java
@@ -99,7 +99,7 @@ public class RuntimeDistributionConfigImpl extends DistributionConfigImpl {
       value = new File("");
     }
     try {
-      this.ds.getStatSampler().changeArchive(value);
+      this.ds.getInternalDistributedSystemStats().getStatSampler().changeArchive(value);
     } catch (GemFireIOException ex) {
       throw new IllegalArgumentException(ex.getMessage());
     }
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 8fb94c0..5973a00 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
@@ -36,81 +36,81 @@ public class DLockStats implements DistributedLockStats {
   // Statistic "Id" Fields
   // -------------------------------------------------------------------------
 
-  private static final StatisticsType type;
-
-  private static final int grantorsId;
-  private static final int servicesId;
-  private static final int tokensId;
-  private static final int grantTokensId;
-  private static final int requestQueuesId;
-  private static final int serialQueueSizeId;
-  private static final int serialThreadsId;
-  private static final int waitingQueueSizeId;
-  private static final int waitingThreadsId;
-  private static final int lockWaitsInProgressId;
-  private static final int lockWaitsCompletedId;
-  private static final int lockWaitTimeId;
-  private static final int lockWaitsFailedId;
-  private static final int lockWaitFailedTimeId;
-  private static final int grantWaitsInProgressId;
-  private static final int grantWaitsCompletedId;
-  private static final int grantWaitTimeId;
-  private static final int grantWaitsNotGrantorId;
-  private static final int grantWaitNotGrantorTimeId;
-  private static final int grantWaitsTimeoutId;
-  private static final int grantWaitTimeoutTimeId;
-  private static final int grantWaitsNotHolderId;
-  private static final int grantWaitNotHolderTimeId;
-  private static final int grantWaitsFailedId;
-  private static final int grantWaitFailedTimeId;
-  private static final int grantWaitsSuspendedId;
-  private static final int grantWaitSuspendedTimeId;
-  private static final int grantWaitsDestroyedId;
-  private static final int grantWaitDestroyedTimeId;
-  private static final int createGrantorsInProgressId;
-  private static final int createGrantorsCompletedId;
-  private static final int createGrantorTimeId;
-  private static final int serviceCreatesInProgressId;
-  private static final int serviceCreatesCompletedId;
-  private static final int serviceCreateLatchTimeId;
-  private static final int serviceInitLatchTimeId;
-  private static final int grantorWaitsInProgressId;
-  private static final int grantorWaitsCompletedId;
-  private static final int grantorWaitTimeId;
-  private static final int grantorWaitsFailedId;
-  private static final int grantorWaitFailedTimeId;
-  private static final int grantorThreadsInProgressId;
-  private static final int grantorThreadsCompletedId;
-  private static final int grantorThreadExpireAndGrantLocksTimeId;
-  private static final int grantorThreadHandleRequestTimeoutsTimeId;
-  private static final int grantorThreadRemoveUnusedTokensTimeId;
-  private static final int grantorThreadTimeId;
-  private static final int pendingRequestsId;
-  private static final int destroyReadWaitsInProgressId;
-  private static final int destroyReadWaitsCompletedId;
-  private static final int destroyReadWaitTimeId;
-  private static final int destroyReadWaitsFailedId;
-  private static final int destroyReadWaitFailedTimeId;
-  private static final int destroyWriteWaitsInProgressId;
-  private static final int destroyWriteWaitsCompletedId;
-  private static final int destroyWriteWaitTimeId;
-  private static final int destroyWriteWaitsFailedId;
-  private static final int destroyWriteWaitFailedTimeId;
-  private static final int destroyReadsId;
-  private static final int destroyWritesId;
-  private static final int lockReleasesInProgressId;
-  private static final int lockReleasesCompletedId;
-  private static final int lockReleaseTimeId;
-  private static final int becomeGrantorRequestsId;
-  private static final int freeResourcesCompletedId;
-  private static final int freeResourcesFailedId;
+  private StatisticsType type;
+
+  private int grantorsId;
+  private int servicesId;
+  private int tokensId;
+  private int grantTokensId;
+  private int requestQueuesId;
+  private int serialQueueSizeId;
+  private int serialThreadsId;
+  private int waitingQueueSizeId;
+  private int waitingThreadsId;
+  private int lockWaitsInProgressId;
+  private int lockWaitsCompletedId;
+  private int lockWaitTimeId;
+  private int lockWaitsFailedId;
+  private int lockWaitFailedTimeId;
+  private int grantWaitsInProgressId;
+  private int grantWaitsCompletedId;
+  private int grantWaitTimeId;
+  private int grantWaitsNotGrantorId;
+  private int grantWaitNotGrantorTimeId;
+  private int grantWaitsTimeoutId;
+  private int grantWaitTimeoutTimeId;
+  private int grantWaitsNotHolderId;
+  private int grantWaitNotHolderTimeId;
+  private int grantWaitsFailedId;
+  private int grantWaitFailedTimeId;
+  private int grantWaitsSuspendedId;
+  private int grantWaitSuspendedTimeId;
+  private int grantWaitsDestroyedId;
+  private int grantWaitDestroyedTimeId;
+  private int createGrantorsInProgressId;
+  private int createGrantorsCompletedId;
+  private int createGrantorTimeId;
+  private int serviceCreatesInProgressId;
+  private int serviceCreatesCompletedId;
+  private int serviceCreateLatchTimeId;
+  private int serviceInitLatchTimeId;
+  private int grantorWaitsInProgressId;
+  private int grantorWaitsCompletedId;
+  private int grantorWaitTimeId;
+  private int grantorWaitsFailedId;
+  private int grantorWaitFailedTimeId;
+  private int grantorThreadsInProgressId;
+  private int grantorThreadsCompletedId;
+  private int grantorThreadExpireAndGrantLocksTimeId;
+  private int grantorThreadHandleRequestTimeoutsTimeId;
+  private int grantorThreadRemoveUnusedTokensTimeId;
+  private int grantorThreadTimeId;
+  private int pendingRequestsId;
+  private int destroyReadWaitsInProgressId;
+  private int destroyReadWaitsCompletedId;
+  private int destroyReadWaitTimeId;
+  private int destroyReadWaitsFailedId;
+  private int destroyReadWaitFailedTimeId;
+  private int destroyWriteWaitsInProgressId;
+  private int destroyWriteWaitsCompletedId;
+  private int destroyWriteWaitTimeId;
+  private int destroyWriteWaitsFailedId;
+  private int destroyWriteWaitFailedTimeId;
+  private int destroyReadsId;
+  private int destroyWritesId;
+  private int lockReleasesInProgressId;
+  private int lockReleasesCompletedId;
+  private int lockReleaseTimeId;
+  private int becomeGrantorRequestsId;
+  private int freeResourcesCompletedId;
+  private int freeResourcesFailedId;
 
   /** returns the current nano time, if time stats are enabled */
   static long getStatTime() {
     return DistributionStats.getStatTime();
   }
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "DLockStats";
     String statDescription = "Statistics on the gemfire distribution lock service.";
 
@@ -241,90 +241,88 @@ public class DLockStats implements DistributedLockStats {
     final String freeResourcesFailedDesc =
         "Total number of times this member has attempted to free resources for a distributed lock which remained in use.";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    type = f.createType(statName, statDescription, new StatisticDescriptor[] {
-        f.createIntGauge("grantors", grantorsDesc, "grantors"),
-        f.createIntGauge("services", servicesDesc, "services"),
-        f.createIntGauge("tokens", tokensDesc, "tokens"),
-        f.createIntGauge("grantTokens", grantTokensDesc, "grantTokens"),
-        f.createIntGauge("requestQueues", requestQueuesDesc, "requestQueues"),
-        f.createIntGauge("serialQueueSize", serialQueueSizeDesc, "messages"),
-        f.createIntGauge("serialThreads", serialThreadsDesc, "threads"),
-        f.createIntGauge("waitingQueueSize", waitingQueueSizeDesc, "messages"),
-        f.createIntGauge("waitingThreads", waitingThreadsDesc, "threads"),
-        f.createIntGauge("lockWaitsInProgress", lockWaitsInProgressDesc, "operations"),
-        f.createIntCounter("lockWaitsCompleted", lockWaitsCompletedDesc, "operations"),
-        f.createLongCounter("lockWaitTime", lockWaitTimeDesc, "nanoseconds", false),
-        f.createIntCounter("lockWaitsFailed", lockWaitsFailedDesc, "operations"),
-        f.createLongCounter("lockWaitFailedTime", lockWaitFailedTimeDesc, "nanoseconds", false),
-        f.createIntGauge("grantWaitsInProgress", grantWaitsInProgressDesc, "operations"),
-        f.createIntCounter("grantWaitsCompleted", grantWaitsCompletedDesc, "operations"),
-        f.createLongCounter("grantWaitTime", grantWaitTimeDesc, "nanoseconds", false),
-        f.createIntCounter("grantWaitsNotGrantor", grantWaitsNotGrantorDesc, "operations"),
-        f.createLongCounter("grantWaitNotGrantorTime", grantWaitNotGrantorTimeDesc, "nanoseconds",
+    type = factory.createType(statName, statDescription, new StatisticDescriptor[] {
+        factory.createIntGauge("grantors", grantorsDesc, "grantors"),
+        factory.createIntGauge("services", servicesDesc, "services"),
+        factory.createIntGauge("tokens", tokensDesc, "tokens"),
+        factory.createIntGauge("grantTokens", grantTokensDesc, "grantTokens"),
+        factory.createIntGauge("requestQueues", requestQueuesDesc, "requestQueues"),
+        factory.createIntGauge("serialQueueSize", serialQueueSizeDesc, "messages"),
+        factory.createIntGauge("serialThreads", serialThreadsDesc, "threads"),
+        factory.createIntGauge("waitingQueueSize", waitingQueueSizeDesc, "messages"),
+        factory.createIntGauge("waitingThreads", waitingThreadsDesc, "threads"),
+        factory.createIntGauge("lockWaitsInProgress", lockWaitsInProgressDesc, "operations"),
+        factory.createIntCounter("lockWaitsCompleted", lockWaitsCompletedDesc, "operations"),
+        factory.createLongCounter("lockWaitTime", lockWaitTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("lockWaitsFailed", lockWaitsFailedDesc, "operations"),
+        factory.createLongCounter("lockWaitFailedTime", lockWaitFailedTimeDesc, "nanoseconds", false),
+        factory.createIntGauge("grantWaitsInProgress", grantWaitsInProgressDesc, "operations"),
+        factory.createIntCounter("grantWaitsCompleted", grantWaitsCompletedDesc, "operations"),
+        factory.createLongCounter("grantWaitTime", grantWaitTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("grantWaitsNotGrantor", grantWaitsNotGrantorDesc, "operations"),
+        factory.createLongCounter("grantWaitNotGrantorTime", grantWaitNotGrantorTimeDesc, "nanoseconds",
             false),
-        f.createIntCounter("grantWaitsTimeout", grantWaitsTimeoutDesc, "operations"),
-        f.createLongCounter("grantWaitTimeoutTime", grantWaitTimeoutTimeDesc, "nanoseconds", false),
-        f.createIntCounter("grantWaitsNotHolder", grantWaitsNotHolderDesc, "operations"),
-        f.createLongCounter("grantWaitNotHolderTime", grantWaitNotHolderTimeDesc, "nanoseconds",
+        factory.createIntCounter("grantWaitsTimeout", grantWaitsTimeoutDesc, "operations"),
+        factory.createLongCounter("grantWaitTimeoutTime", grantWaitTimeoutTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("grantWaitsNotHolder", grantWaitsNotHolderDesc, "operations"),
+        factory.createLongCounter("grantWaitNotHolderTime", grantWaitNotHolderTimeDesc, "nanoseconds",
             false),
-        f.createIntCounter("grantWaitsFailed", grantWaitsFailedDesc, "operations"),
-        f.createLongCounter("grantWaitFailedTime", grantWaitFailedTimeDesc, "nanoseconds", false),
-        f.createIntCounter("grantWaitsSuspended", grantWaitsSuspendedDesc, "operations"),
-        f.createLongCounter("grantWaitSuspendedTime", grantWaitSuspendedTimeDesc, "nanoseconds",
+        factory.createIntCounter("grantWaitsFailed", grantWaitsFailedDesc, "operations"),
+        factory.createLongCounter("grantWaitFailedTime", grantWaitFailedTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("grantWaitsSuspended", grantWaitsSuspendedDesc, "operations"),
+        factory.createLongCounter("grantWaitSuspendedTime", grantWaitSuspendedTimeDesc, "nanoseconds",
             false),
-        f.createIntCounter("grantWaitsDestroyed", grantWaitsDestroyedDesc, "operations"),
-        f.createLongCounter("grantWaitDestroyedTime", grantWaitDestroyedTimeDesc, "nanoseconds",
+        factory.createIntCounter("grantWaitsDestroyed", grantWaitsDestroyedDesc, "operations"),
+        factory.createLongCounter("grantWaitDestroyedTime", grantWaitDestroyedTimeDesc, "nanoseconds",
             false),
-        f.createIntGauge("createGrantorsInProgress", createGrantorsInProgressDesc, "operations"),
-        f.createIntCounter("createGrantorsCompleted", createGrantorsCompletedDesc, "operations"),
-        f.createLongCounter("createGrantorTime", createGrantorTimeDesc, "nanoseconds", false),
-        f.createIntGauge("serviceCreatesInProgress", serviceCreatesInProgressDesc, "operations"),
-        f.createIntCounter("serviceCreatesCompleted", serviceCreatesCompletedDesc, "operations"),
-        f.createLongCounter("serviceCreateLatchTime", serviceCreateLatchTimeDesc, "nanoseconds",
+        factory.createIntGauge("createGrantorsInProgress", createGrantorsInProgressDesc, "operations"),
+        factory.createIntCounter("createGrantorsCompleted", createGrantorsCompletedDesc, "operations"),
+        factory.createLongCounter("createGrantorTime", createGrantorTimeDesc, "nanoseconds", false),
+        factory.createIntGauge("serviceCreatesInProgress", serviceCreatesInProgressDesc, "operations"),
+        factory.createIntCounter("serviceCreatesCompleted", serviceCreatesCompletedDesc, "operations"),
+        factory.createLongCounter("serviceCreateLatchTime", serviceCreateLatchTimeDesc, "nanoseconds",
             false),
-        f.createLongCounter("serviceInitLatchTime", serviceInitLatchTimeDesc, "nanoseconds", false),
-        f.createIntGauge("grantorWaitsInProgress", grantorWaitsInProgressDesc, "operations"),
-        f.createIntCounter("grantorWaitsCompleted", grantorWaitsCompletedDesc, "operations"),
-        f.createLongCounter("grantorWaitTime", grantorWaitTimeDesc, "nanoseconds", false),
-        f.createIntCounter("grantorWaitsFailed", grantorWaitsFailedDesc, "operations"),
-        f.createLongCounter("grantorWaitFailedTime", grantorWaitFailedTimeDesc, "nanoseconds",
+        factory.createLongCounter("serviceInitLatchTime", serviceInitLatchTimeDesc, "nanoseconds", false),
+        factory.createIntGauge("grantorWaitsInProgress", grantorWaitsInProgressDesc, "operations"),
+        factory.createIntCounter("grantorWaitsCompleted", grantorWaitsCompletedDesc, "operations"),
+        factory.createLongCounter("grantorWaitTime", grantorWaitTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("grantorWaitsFailed", grantorWaitsFailedDesc, "operations"),
+        factory.createLongCounter("grantorWaitFailedTime", grantorWaitFailedTimeDesc, "nanoseconds",
             false),
-        f.createIntGauge("grantorThreadsInProgress", grantorThreadsInProgressDesc, "operations"),
-        f.createIntCounter("grantorThreadsCompleted", grantorThreadsCompletedDesc, "operations"),
-        f.createLongCounter("grantorThreadExpireAndGrantLocksTime",
+        factory.createIntGauge("grantorThreadsInProgress", grantorThreadsInProgressDesc, "operations"),
+        factory.createIntCounter("grantorThreadsCompleted", grantorThreadsCompletedDesc, "operations"),
+        factory.createLongCounter("grantorThreadExpireAndGrantLocksTime",
             grantorThreadExpireAndGrantLocksTimeDesc, "nanoseconds", false),
-        f.createLongCounter("grantorThreadHandleRequestTimeoutsTime",
+        factory.createLongCounter("grantorThreadHandleRequestTimeoutsTime",
             grantorThreadHandleRequestTimeoutsTimeDesc, "nanoseconds", false),
-        f.createLongCounter("grantorThreadRemoveUnusedTokensTime",
+        factory.createLongCounter("grantorThreadRemoveUnusedTokensTime",
             grantorThreadRemoveUnusedTokensTimeDesc, "nanoseconds", false),
-        f.createLongCounter("grantorThreadTime", grantorThreadTimeDesc, "nanoseconds", false),
-        f.createIntGauge("pendingRequests", pendingRequestsDesc, "pendingRequests"),
-        f.createIntGauge("destroyReadWaitsInProgress", destroyReadWaitsInProgressDesc,
+        factory.createLongCounter("grantorThreadTime", grantorThreadTimeDesc, "nanoseconds", false),
+        factory.createIntGauge("pendingRequests", pendingRequestsDesc, "pendingRequests"),
+        factory.createIntGauge("destroyReadWaitsInProgress", destroyReadWaitsInProgressDesc,
             "operations"),
-        f.createIntCounter("destroyReadWaitsCompleted", destroyReadWaitsCompletedDesc,
+        factory.createIntCounter("destroyReadWaitsCompleted", destroyReadWaitsCompletedDesc,
             "operations"),
-        f.createLongCounter("destroyReadWaitTime", destroyReadWaitTimeDesc, "nanoseconds", false),
-        f.createIntCounter("destroyReadWaitsFailed", destroyReadWaitsFailedDesc, "operations"),
-        f.createLongCounter("destroyReadWaitFailedTime", destroyReadWaitFailedTimeDesc,
+        factory.createLongCounter("destroyReadWaitTime", destroyReadWaitTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("destroyReadWaitsFailed", destroyReadWaitsFailedDesc, "operations"),
+        factory.createLongCounter("destroyReadWaitFailedTime", destroyReadWaitFailedTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("destroyWriteWaitsInProgress", destroyWriteWaitsInProgressDesc,
+        factory.createIntGauge("destroyWriteWaitsInProgress", destroyWriteWaitsInProgressDesc,
             "operations"),
-        f.createIntCounter("destroyWriteWaitsCompleted", destroyWriteWaitsCompletedDesc,
+        factory.createIntCounter("destroyWriteWaitsCompleted", destroyWriteWaitsCompletedDesc,
             "operations"),
-        f.createLongCounter("destroyWriteWaitTime", destroyWriteWaitTimeDesc, "nanoseconds", false),
-        f.createIntCounter("destroyWriteWaitsFailed", destroyWriteWaitsFailedDesc, "operations"),
-        f.createLongCounter("destroyWriteWaitFailedTime", destroyWriteWaitFailedTimeDesc,
+        factory.createLongCounter("destroyWriteWaitTime", destroyWriteWaitTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("destroyWriteWaitsFailed", destroyWriteWaitsFailedDesc, "operations"),
+        factory.createLongCounter("destroyWriteWaitFailedTime", destroyWriteWaitFailedTimeDesc,
             "nanoseconds", false),
-        f.createIntGauge("destroyReads", destroyReadsDesc, "destroyReads"),
-        f.createIntGauge("destroyWrites", destroyWritesDesc, "destroyWrites"),
-        f.createIntGauge("lockReleasesInProgress", lockReleasesInProgressDesc, "operations"),
-        f.createIntCounter("lockReleasesCompleted", lockReleasesCompletedDesc, "operations"),
-        f.createLongCounter("lockReleaseTime", lockReleaseTimeDesc, "nanoseconds", false),
-        f.createIntCounter("becomeGrantorRequests", becomeGrantorRequestsDesc, "operations"),
-        f.createIntCounter("freeResourcesCompleted", freeResourcesCompletedDesc, "operations"),
-        f.createIntCounter("freeResourcesFailed", freeResourcesFailedDesc, "operations"),});
+        factory.createIntGauge("destroyReads", destroyReadsDesc, "destroyReads"),
+        factory.createIntGauge("destroyWrites", destroyWritesDesc, "destroyWrites"),
+        factory.createIntGauge("lockReleasesInProgress", lockReleasesInProgressDesc, "operations"),
+        factory.createIntCounter("lockReleasesCompleted", lockReleasesCompletedDesc, "operations"),
+        factory.createLongCounter("lockReleaseTime", lockReleaseTimeDesc, "nanoseconds", false),
+        factory.createIntCounter("becomeGrantorRequests", becomeGrantorRequestsDesc, "operations"),
+        factory.createIntCounter("freeResourcesCompleted", freeResourcesCompletedDesc, "operations"),
+        factory.createIntCounter("freeResourcesFailed", freeResourcesFailedDesc, "operations"),});
 
     // Initialize id fields
     grantorsId = type.nameToId("grantors");
@@ -406,15 +404,9 @@ public class DLockStats implements DistributedLockStats {
   /**
    * Creates a new <code>DLockStats</code> and registers itself with the given statistics factory.
    */
-  public DLockStats(StatisticsFactory f, long statId) {
-    this.stats = f.createAtomicStatistics(type, "dlockStats", statId);
-  }
-
-  /**
-   * Used by tests to create an instance given its already existings stats.
-   */
-  public DLockStats(Statistics stats) {
-    this.stats = stats;
+  public DLockStats(StatisticsFactory factory, long statId) {
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(type, "dlockStats", statId);
   }
 
   // -------------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AddStatListenerResponse.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AddStatListenerResponse.java
index 96eb914..0295d59 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AddStatListenerResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AddStatListenerResponse.java
@@ -41,7 +41,7 @@ public class AddStatListenerResponse extends AdminResponse {
     AddStatListenerResponse m = new AddStatListenerResponse();
     m.setRecipient(recipient);
     GemFireStatSampler sampler = null;
-    sampler = dm.getSystem().getStatSampler();
+    sampler = dm.getSystem().getInternalDistributedSystemStats().getStatSampler();
     if (sampler != null) {
       m.listenerId = sampler.addListener(recipient, resourceId, statName);
     }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AdminConsoleDisconnectMessage.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AdminConsoleDisconnectMessage.java
index 1baf38c..d49822c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AdminConsoleDisconnectMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/AdminConsoleDisconnectMessage.java
@@ -88,7 +88,7 @@ public class AdminConsoleDisconnectMessage extends PooledDistributionMessage {
             this.getSender()));
       }
     }
-    GemFireStatSampler sampler = sys.getStatSampler();
+    GemFireStatSampler sampler = sys.getInternalDistributedSystemStats().getStatSampler();
     if (sampler != null) {
       sampler.removeListenersByRecipient(this.getSender());
     }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/CancelStatListenerResponse.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/CancelStatListenerResponse.java
index e869767..cf1516b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/CancelStatListenerResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/CancelStatListenerResponse.java
@@ -41,7 +41,7 @@ public class CancelStatListenerResponse extends AdminResponse {
     CancelStatListenerResponse m = new CancelStatListenerResponse();
     m.setRecipient(recipient);
     GemFireStatSampler sampler = null;
-    sampler = dm.getSystem().getStatSampler();
+    sampler = dm.getSystem().getInternalDistributedSystemStats().getStatSampler();
     if (sampler != null) {
       sampler.removeListener(listenerId);
     }
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 9ecb440..85bcb85 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
@@ -33,481 +33,468 @@ public class CachePerfStats {
 
   ////////////////// Static fields ///////////////////////////
 
-  private static final StatisticsType type;
-
-  protected static final int loadsInProgressId;
-  protected static final int loadsCompletedId;
-  protected static final int loadTimeId;
-  protected static final int netloadsInProgressId;
-  protected static final int netloadsCompletedId;
-  protected static final int netloadTimeId;
-  protected static final int netsearchesInProgressId;
-  protected static final int netsearchesCompletedId;
-  protected static final int netsearchTimeId;
-  protected static final int cacheWriterCallsInProgressId;
-  protected static final int cacheWriterCallsCompletedId;
-  protected static final int cacheWriterCallTimeId;
-  protected static final int cacheListenerCallsInProgressId;
-  protected static final int cacheListenerCallsCompletedId;
-  protected static final int cacheListenerCallTimeId;
-  protected static final int getInitialImagesInProgressId;
-  protected static final int getInitialImagesCompletedId;
-  protected static final int deltaGetInitialImagesCompletedId;
-  protected static final int getInitialImageTimeId;
-  protected static final int getInitialImageKeysReceivedId;
-  protected static final int regionsId;
-  protected static final int partitionedRegionsId;
-  protected static final int destroysId;
-  protected static final int createsId;
-  protected static final int putsId;
-  protected static final int putTimeId;
-  protected static final int putallsId;
-  protected static final int putallTimeId;
-  protected static final int removeAllsId;
-  protected static final int removeAllTimeId;
-  protected static final int updatesId;
-  protected static final int updateTimeId;
-  protected static final int invalidatesId;
-  protected static final int getsId;
-  protected static final int getTimeId;
-  protected static final int eventQueueSizeId;
-  protected static final int eventQueueThrottleTimeId;
-  protected static final int eventQueueThrottleCountId;
-  protected static final int eventThreadsId;
-  protected static final int missesId;
-  protected static final int queryExecutionsId;
-  protected static final int queryExecutionTimeId;
-  protected static final int queryResultsHashCollisionsId;
-  protected static final int queryResultsHashCollisionProbeTimeId;
-  protected static final int partitionedRegionQueryRetriesId;
-
-  protected static final int txSuccessLifeTimeId;
-  protected static final int txFailedLifeTimeId;
-  protected static final int txRollbackLifeTimeId;
-  protected static final int txCommitsId;
-  protected static final int txFailuresId;
-  protected static final int txRollbacksId;
-  protected static final int txCommitTimeId;
-  protected static final int txFailureTimeId;
-  protected static final int txRollbackTimeId;
-  protected static final int txCommitChangesId;
-  protected static final int txFailureChangesId;
-  protected static final int txRollbackChangesId;
-  protected static final int txConflictCheckTimeId;
-
-  protected static final int reliableQueuedOpsId;
-  protected static final int reliableQueueSizeId;
-  protected static final int reliableQueueMaxId;
-  protected static final int reliableRegionsId;
-  protected static final int reliableRegionsMissingId;
-  protected static final int reliableRegionsQueuingId;
-  protected static final int reliableRegionsMissingFullAccessId;
-  protected static final int reliableRegionsMissingLimitedAccessId;
-  protected static final int reliableRegionsMissingNoAccessId;
-  protected static final int entryCountId;
-  protected static final int eventsQueuedId;
-  protected static final int retriesId;
-
-  protected static final int diskTasksWaitingId;
-  protected static final int evictorJobsStartedId;
-  protected static final int evictorJobsCompletedId;
-  protected static final int evictorQueueSizeId;
-
-  protected static final int evictWorkTimeId;
-
-
-  protected static final int indexUpdateInProgressId;
-  protected static final int indexUpdateCompletedId;
-  protected static final int indexUpdateTimeId;
-  protected static final int clearsId;
-  protected static final int indexInitializationInProgressId;
-  protected static final int indexInitializationCompletedId;
-  protected static final int indexInitializationTimeId;
-
-  /** Id of the meta data refresh statistic */
-  protected static final int metaDataRefreshCountId;
-
-  protected static final int conflatedEventsId;
-  protected static final int tombstoneCountId;
-  protected static final int tombstoneGCCountId;
-  protected static final int tombstoneOverhead1Id;
-  protected static final int tombstoneOverhead2Id;
-  protected static final int clearTimeoutsId;
-
-  protected static final int deltaUpdatesId;
-  protected static final int deltaUpdatesTimeId;
-  protected static final int deltaFailedUpdatesId;
-
-  protected static final int deltasPreparedId;
-  protected static final int deltasPreparedTimeId;
-  protected static final int deltasSentId;
-
-  protected static final int deltaFullValuesSentId;
-  protected static final int deltaFullValuesRequestedId;
-
-  protected static final int importedEntriesCountId;
-  protected static final int importTimeId;
-  protected static final int exportedEntriesCountId;
-  protected static final int exportTimeId;
-
-  protected static final int compressionCompressTimeId;
-  protected static final int compressionDecompressTimeId;
-  protected static final int compressionCompressionsId;
-  protected static final int compressionDecompressionsId;
-  protected static final int compressionPreCompressedBytesId;
-  protected static final int compressionPostCompressedBytesId;
-
-  /** The Statistics object that we delegate most behavior to */
+  private StatisticsType type;
+
+  protected int loadsInProgressId;
+  protected int loadsCompletedId;
+  protected int loadTimeId;
+  protected int netloadsInProgressId;
+  protected int netloadsCompletedId;
+  protected int netloadTimeId;
+  protected int netsearchesInProgressId;
+  protected int netsearchesCompletedId;
+  protected int netsearchTimeId;
+  protected int cacheWriterCallsInProgressId;
+  protected int cacheWriterCallsCompletedId;
+  protected int cacheWriterCallTimeId;
+  protected int cacheListenerCallsInProgressId;
+  protected int cacheListenerCallsCompletedId;
+  protected int cacheListenerCallTimeId;
+  protected int getInitialImagesInProgressId;
+  protected int getInitialImagesCompletedId;
+  protected int deltaGetInitialImagesCompletedId;
+  protected int getInitialImageTimeId;
+  protected int getInitialImageKeysReceivedId;
+  protected int regionsId;
+  protected int partitionedRegionsId;
+  protected int destroysId;
+  protected int createsId;
+  protected int putsId;
+  protected int putTimeId;
+  protected int putallsId;
+  protected int putallTimeId;
+  protected int removeAllsId;
+  protected int removeAllTimeId;
+  protected int updatesId;
+  protected int updateTimeId;
+  protected int invalidatesId;
+  protected int getsId;
+  protected int getTimeId;
+  protected int eventQueueSizeId;
+  protected int eventQueueThrottleTimeId;
+  protected int eventQueueThrottleCountId;
+  protected int eventThreadsId;
+  protected int missesId;
+  protected int queryExecutionsId;
+  protected int queryExecutionTimeId;
+  protected int queryResultsHashCollisionsId;
+  protected int queryResultsHashCollisionProbeTimeId;
+  protected int partitionedRegionQueryRetriesId;
+
+  protected int txSuccessLifeTimeId;
+  protected int txFailedLifeTimeId;
+  protected int txRollbackLifeTimeId;
+  protected int txCommitsId;
+  protected int txFailuresId;
+  protected int txRollbacksId;
+  protected int txCommitTimeId;
+  protected int txFailureTimeId;
+  protected int txRollbackTimeId;
+  protected int txCommitChangesId;
+  protected int txFailureChangesId;
+  protected int txRollbackChangesId;
+  protected int txConflictCheckTimeId;
+
+  protected int reliableQueuedOpsId;
+  protected int reliableQueueSizeId;
+  protected int reliableQueueMaxId;
+  protected int reliableRegionsId;
+  protected int reliableRegionsMissingId;
+  protected int reliableRegionsQueuingId;
+  protected int reliableRegionsMissingFullAccessId;
+  protected int reliableRegionsMissingLimitedAccessId;
+  protected int reliableRegionsMissingNoAccessId;
+  protected int entryCountId;
+  protected int eventsQueuedId;
+  protected int retriesId;
+
+  protected int diskTasksWaitingId;
+  protected int evictorJobsStartedId;
+  protected int evictorJobsCompletedId;
+  protected int evictorQueueSizeId;
+
+  protected int evictWorkTimeId;
+
+
+  protected int indexUpdateInProgressId;
+  protected int indexUpdateCompletedId;
+  protected int indexUpdateTimeId;
+  protected int clearsId;
+  protected int indexInitializationInProgressId;
+  protected int indexInitializationCompletedId;
+  protected int indexInitializationTimeId;
+
+  /**
+   * Id of the meta data refresh statistic
+   */
+  protected int metaDataRefreshCountId;
+
+  protected int conflatedEventsId;
+  protected int tombstoneCountId;
+  protected int tombstoneGCCountId;
+  protected int tombstoneOverhead1Id;
+  protected int tombstoneOverhead2Id;
+  protected int clearTimeoutsId;
+
+  protected int deltaUpdatesId;
+  protected int deltaUpdatesTimeId;
+  protected int deltaFailedUpdatesId;
+
+  protected int deltasPreparedId;
+  protected int deltasPreparedTimeId;
+  protected int deltasSentId;
+
+  protected int deltaFullValuesSentId;
+  protected int deltaFullValuesRequestedId;
+
+  protected int importedEntriesCountId;
+  protected int importTimeId;
+  protected int exportedEntriesCountId;
+  protected int exportTimeId;
+
+  protected int compressionCompressTimeId;
+  protected int compressionDecompressTimeId;
+  protected int compressionCompressionsId;
+  protected int compressionDecompressionsId;
+  protected int compressionPreCompressedBytesId;
+  protected int compressionPostCompressedBytesId;
+
+  /**
+   * The Statistics object that we delegate most behavior to
+   */
   protected final Statistics stats;
 
-  //////////////////////// Static methods ////////////////////////
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    final String loadsInProgressDesc =
-        "Current number of threads in this cache doing a cache load.";
-    final String loadsCompletedDesc =
-        "Total number of times a load on this cache has completed (as a result of either a local get() or a remote netload).";
-    final String loadTimeDesc = "Total time spent invoking loaders on this cache.";
-    final String netloadsInProgressDesc =
-        "Current number of threads doing a network load initiated by a get() in this cache.";
-    final String netloadsCompletedDesc =
-        "Total number of times a network load initiated on this cache has completed.";
-    final String netloadTimeDesc = "Total time spent doing network loads on this cache.";
-    final String netsearchesInProgressDesc =
-        "Current number of threads doing a network search initiated by a get() in this cache.";
-    final String netsearchesCompletedDesc =
-        "Total number of times network searches initiated by this cache have completed.";
-    final String netsearchTimeDesc = "Total time spent doing network searches for cache values.";
-    final String cacheWriterCallsInProgressDesc =
-        "Current number of threads doing a cache writer call.";
-    final String cacheWriterCallsCompletedDesc =
-        "Total number of times a cache writer call has completed.";
-    final String cacheWriterCallTimeDesc = "Total time spent doing cache writer calls.";
-    final String cacheListenerCallsInProgressDesc =
-        "Current number of threads doing a cache listener call.";
-    final String cacheListenerCallsCompletedDesc =
-        "Total number of times a cache listener call has completed.";
-    final String cacheListenerCallTimeDesc = "Total time spent doing cache listener calls.";
-    final String getInitialImagesInProgressDesc =
-        "Current number of getInitialImage operations currently in progress.";
-    final String getInitialImagesCompletedDesc =
-        "Total number of times getInitialImages (both delta and full GII) initiated by this cache have completed.";
-    final String deltaGetInitialImagesCompletedDesc =
-        "Total number of times delta getInitialImages initiated by this cache have completed.";
-    final String getInitialImageTimeDesc =
-        "Total time spent doing getInitialImages for region creation.";
-    final String getInitialImageKeysReceivedDesc =
-        "Total number of keys received while doing getInitialImage operations.";
-    final String regionsDesc = "The current number of regions in the cache.";
-    final String partitionedRegionsDesc = "The current number of partitioned regions in the cache.";
-    final String destroysDesc =
-        "The total number of times a cache object entry has been destroyed in this cache.";
-    final String updatesDesc =
-        "The total number of updates originating remotely that have been applied to this cache.";
-    final String updateTimeDesc = "Total time spent performing an update.";
-    final String invalidatesDesc =
-        "The total number of times an existing cache object entry value in this cache has been invalidated";
-    final String getsDesc =
-        "The total number of times a successful get has been done on this cache.";
-    final String createsDesc = "The total number of times an entry is added to this cache.";
-    final String putsDesc =
-        "The total number of times an entry is added or replaced in this cache as a result of a local operation (put(), create(), or get() which results in load, netsearch, or netloading a value). Note that this only counts puts done explicitly on this cache. It does not count updates pushed from other caches.";
-    final String putTimeDesc =
-        "Total time spent adding or replacing an entry in this cache as a result of a local operation.  This includes synchronizing on the map, invoking cache callbacks, sending messages to other caches and waiting for responses (if required).";
-    final String putallsDesc =
-        "The total number of times a map is added or replaced in this cache as a result of a local operation. Note that this only counts putAlls done explicitly on this cache. It does not count updates pushed from other caches.";
-    final String putallTimeDesc =
-        "Total time spent replacing a map in this cache as a result of a local operation.  This includes synchronizing on the map, invoking cache callbacks, sending messages to other caches and waiting for responses (if required).";
-    final String removeAllsDesc =
-        "The total number of removeAll operations that originated in this cache. Note that this only counts removeAlls done explicitly on this cache. It does not count removes pushed from other caches.";
-    final String removeAllTimeDesc =
-        "Total time spent performing removeAlls that originated in this cache. This includes time spent waiting for the removeAll to be done in remote caches (if required).";
-    final String getTimeDesc =
-        "Total time spent doing get operations from this cache (including netsearch and netload)";
-    final String eventQueueSizeDesc = "The number of cache events waiting to be processed.";
-    final String eventQueueThrottleTimeDesc =
-        "The total amount of time, in nanoseconds, spent delayed by the event queue throttle.";
-    final String eventQueueThrottleCountDesc =
-        "The total number of times a thread was delayed in adding an event to the event queue.";
-    final String eventThreadsDesc = "The number of threads currently processing events.";
-    final String missesDesc =
-        "Total number of times a get on the cache did not find a value already in local memory. The number of hits (i.e. gets that did not miss) can be calculated by subtracting misses from gets.";
-    final String queryExecutionsDesc = "Total number of times some query has been executed";
-    final String queryExecutionTimeDesc = "Total time spent executing queries";
-    final String queryResultsHashCollisionsDesc =
-        "Total number of times an hash code collision occurred when inserting an object into an OQL result set or rehashing it";
-    final String queryResultsHashCollisionProbeTimeDesc =
-        "Total time spent probing the hashtable in an OQL result set due to hash code collisions, includes reads, writes, and rehashes";
-    final String partitionedRegionOQLQueryRetriesDesc =
-        "Total number of times an OQL Query on a Partitioned Region had to be retried";
-    final String txSuccessLifeTimeDesc =
-        "The total amount of time, in nanoseconds, spent in a transaction before a successful commit. The time measured starts at transaction begin and ends when commit is called.";
-    final String txFailedLifeTimeDesc =
-        "The total amount of time, in nanoseconds, spent in a transaction before a failed commit. The time measured starts at transaction begin and ends when commit is called.";
-    final String txRollbackLifeTimeDesc =
-        "The total amount of time, in nanoseconds, spent in a transaction before an explicit rollback. The time measured starts at transaction begin and ends when rollback is called.";
-    final String txCommitsDesc = "Total number times a transaction commit has succeeded.";
-    final String txFailuresDesc = "Total number times a transaction commit has failed.";
-    final String txRollbacksDesc =
-        "Total number times a transaction has been explicitly rolled back.";
-    final String txCommitTimeDesc =
-        "The total amount of time, in nanoseconds, spent doing successful transaction commits.";
-    final String txFailureTimeDesc =
-        "The total amount of time, in nanoseconds, spent doing failed transaction commits.";
-    final String txRollbackTimeDesc =
-        "The total amount of time, in nanoseconds, spent doing explicit transaction rollbacks.";
-    final String txCommitChangesDesc = "Total number of changes made by committed transactions.";
-    final String txFailureChangesDesc = "Total number of changes lost by failed transactions.";
-    final String txRollbackChangesDesc =
-        "Total number of changes lost by explicit transaction rollbacks.";
-    final String txConflictCheckTimeDesc =
-        "The total amount of time, in nanoseconds, spent doing conflict checks during transaction commit";
-    final String reliableQueuedOpsDesc =
-        "Current number of cache operations queued for distribution to required roles.";
-    final String reliableQueueSizeDesc =
-        "Current size in megabytes of disk used to queue for distribution to required roles.";
-    final String reliableQueueMaxDesc =
-        "Maximum size in megabytes allotted for disk usage to queue for distribution to required roles.";
-    final String reliableRegionsDesc = "Current number of regions configured for reliability.";
-    final String reliableRegionsMissingDesc =
-        "Current number regions configured for reliability that are missing required roles.";
-    final String reliableRegionsQueuingDesc =
-        "Current number regions configured for reliability that are queuing for required roles.";
-    final String reliableRegionsMissingFullAccessDesc =
-        "Current number of regions configured for reliablity that are missing require roles with full access";
-    final String reliableRegionsMissingLimitedAccessDesc =
-        "Current number of regions configured for reliablity that are missing required roles with Limited access";
-    final String reliableRegionsMissingNoAccessDesc =
-        "Current number of regions configured for reliablity that are missing required roles with No access";
-    final String clearsDesc = "The total number of times a clear has been done on this cache.";
-    final String nonSingleHopsDesc =
-        "Total number of times client request observed more than one hop during operation.";
-    final String metaDataRefreshCountDesc =
-        "Total number of times the meta data is refreshed due to hopping observed.";
-    final String conflatedEventsDesc =
-        "Number of events not delivered due to conflation.  Typically this means that the event arrived after a later event was already applied to the cache.";
-    final String tombstoneCountDesc =
-        "Number of destroyed entries that are retained for concurrent modification detection";
-    final String tombstoneGCCountDesc =
-        "Number of garbage-collections performed on destroyed entries";
-    final String tombstoneOverhead1Desc =
-        "Amount of memory consumed by destroyed entries in replicated or partitioned regions";
-    final String tombstoneOverhead2Desc =
-        "Amount of memory consumed by destroyed entries in non-replicated regions";
-    final String clearTimeoutsDesc =
-        "Number of timeouts waiting for events concurrent to a clear() operation to be received and applied before performing the clear()";
-    final String deltaUpdatesDesc =
-        "The total number of times entries in this cache are updated through delta bytes.";
-    final String deltaUpdatesTimeDesc =
-        "Total time spent applying the received delta bytes to entries in this cache.";
-    final String deltaFailedUpdatesDesc =
-        "The total number of times entries in this cache failed to be updated through delta bytes.";
-    final String deltasPreparedDesc = "The total number of times delta was prepared in this cache.";
-    final String deltasPreparedTimeDesc = "Total time spent preparing delta bytes in this cache.";
-    final String deltasSentDesc =
-        "The total number of times delta was sent to remote caches. This excludes deltas sent from server to client.";
-    final String deltaFullValuesSentDesc =
-        "The total number of times a full value was sent to a remote cache.";
-    final String deltaFullValuesRequestedDesc =
-        "The total number of times a full value was requested by this cache.";
-    final String importedEntriesCountDesc =
-        "The total number of entries imported from a snapshot file.";
-    final String importTimeDesc = "The total time spent importing entries from a snapshot file.";
-    final String exportedEntriesCountDesc =
-        "The total number of entries exported into a snapshot file.";
-    final String exportTimeDesc = "The total time spent exporting entries into a snapshot file.";
-    final String compressionCompressTimeDesc = "The total time spent compressing data.";
-    final String compressionDecompressTimeDesc = "The total time spent decompressing data.";
-    final String compressionCompressionsDesc = "The total number of compression operations.";
-    final String compressionDecompressionsDesc = "The total number of decompression operations.";
-    final String compressionPreCompresssedBytesDesc =
-        "The total number of bytes before compressing.";
-    final String compressionPostCompressedBytesDesc =
-        "The total number of bytes after compressing.";
-    final String evictByCriteria_evictionsDesc = "The total number of entries evicted";// total
-                                                                                       // actual
-                                                                                       // evictions
-                                                                                       // (entries
-                                                                                       // evicted)
-    final String evictByCriteria_evictionTimeDesc = "Time taken for eviction process";// total
-                                                                                      // eviction
-                                                                                      // time
-                                                                                      // including
-                                                                                      // product +
-                                                                                      // user expr.
-    final String evictByCriteria_evictionsInProgressDesc = "Total number of evictions in progress";
-    final String evictByCriteria_evaluationsDesc = "Total number of evaluations for eviction";// total
-                                                                                              // eviction
-                                                                                              // attempts
-    final String evictByCriteria_evaluationTimeDesc =
-        "Total time taken for evaluation of user expression during eviction";// time taken to
-                                                                             // evaluate user
-                                                                             // expression.
-
-    type = f.createType("CachePerfStats", "Statistics about GemFire cache performance",
-        new StatisticDescriptor[] {
-            f.createIntGauge("loadsInProgress", loadsInProgressDesc, "operations"),
-            f.createIntCounter("loadsCompleted", loadsCompletedDesc, "operations"),
-            f.createLongCounter("loadTime", loadTimeDesc, "nanoseconds", false),
-            f.createIntGauge("netloadsInProgress", netloadsInProgressDesc, "operations"),
-            f.createIntCounter("netloadsCompleted", netloadsCompletedDesc, "operations"),
-            f.createLongCounter("netloadTime", netloadTimeDesc, "nanoseconds", false),
-            f.createIntGauge("netsearchesInProgress", netsearchesInProgressDesc, "operations"),
-            f.createIntCounter("netsearchesCompleted", netsearchesCompletedDesc, "operations"),
-            f.createLongCounter("netsearchTime", netsearchTimeDesc, "nanoseconds"),
-            f.createIntGauge("cacheWriterCallsInProgress", cacheWriterCallsInProgressDesc,
+  private static final String loadsInProgressDesc =
+      "Current number of threads in this cache doing a cache load.";
+  private static final String loadsCompletedDesc =
+      "Total number of times a load on this cache has completed (as a result of either a local get() or a remote netload).";
+  private static final String loadTimeDesc = "Total time spent invoking loaders on this cache.";
+  private static final String netloadsInProgressDesc =
+      "Current number of threads doing a network load initiated by a get() in this cache.";
+  private static final String netloadsCompletedDesc =
+      "Total number of times a network load initiated on this cache has completed.";
+  private static final String netloadTimeDesc = "Total time spent doing network loads on this cache.";
+  private static final String netsearchesInProgressDesc =
+      "Current number of threads doing a network search initiated by a get() in this cache.";
+  private static final String netsearchesCompletedDesc =
+      "Total number of times network searches initiated by this cache have completed.";
+  private static final String netsearchTimeDesc = "Total time spent doing network searches for cache values.";
+  private static final String cacheWriterCallsInProgressDesc =
+      "Current number of threads doing a cache writer call.";
+  private static final String cacheWriterCallsCompletedDesc =
+      "Total number of times a cache writer call has completed.";
+  private static final String cacheWriterCallTimeDesc = "Total time spent doing cache writer calls.";
+  private static final String cacheListenerCallsInProgressDesc =
+      "Current number of threads doing a cache listener call.";
+  private static final String cacheListenerCallsCompletedDesc =
+      "Total number of times a cache listener call has completed.";
+  private static final String cacheListenerCallTimeDesc = "Total time spent doing cache listener calls.";
+  private static final String getInitialImagesInProgressDesc =
+      "Current number of getInitialImage operations currently in progress.";
+  private static final String getInitialImagesCompletedDesc =
+      "Total number of times getInitialImages (both delta and full GII) initiated by this cache have completed.";
+  private static final String deltaGetInitialImagesCompletedDesc =
+      "Total number of times delta getInitialImages initiated by this cache have completed.";
+  private static final String getInitialImageTimeDesc =
+      "Total time spent doing getInitialImages for region creation.";
+  private static final String getInitialImageKeysReceivedDesc =
+      "Total number of keys received while doing getInitialImage operations.";
+  private static final String regionsDesc = "The current number of regions in the cache.";
+  private static final String partitionedRegionsDesc = "The current number of partitioned regions in the cache.";
+  private static final String destroysDesc =
+      "The total number of times a cache object entry has been destroyed in this cache.";
+  private static final String updatesDesc =
+      "The total number of updates originating remotely that have been applied to this cache.";
+  private static final String updateTimeDesc = "Total time spent performing an update.";
+  private static final String invalidatesDesc =
+      "The total number of times an existing cache object entry value in this cache has been invalidated";
+  private static final String getsDesc =
+      "The total number of times a successful get has been done on this cache.";
+  private static final String createsDesc = "The total number of times an entry is added to this cache.";
+  private static final String putsDesc =
+      "The total number of times an entry is added or replaced in this cache as a result of a local operation (put(), create(), or get() which results in load, netsearch, or netloading a value). Note that this only counts puts done explicitly on this cache. It does not count updates pushed from other caches.";
+  private static final String putTimeDesc =
+      "Total time spent adding or replacing an entry in this cache as a result of a local operation.  This includes synchronizing on the map, invoking cache callbacks, sending messages to other caches and waiting for responses (if required).";
+  private static final String putallsDesc =
+      "The total number of times a map is added or replaced in this cache as a result of a local operation. Note that this only counts putAlls done explicitly on this cache. It does not count updates pushed from other caches.";
+  private static final String putallTimeDesc =
+      "Total time spent replacing a map in this cache as a result of a local operation.  This includes synchronizing on the map, invoking cache callbacks, sending messages to other caches and waiting for responses (if required).";
+  private static final String removeAllsDesc =
+      "The total number of removeAll operations that originated in this cache. Note that this only counts removeAlls done explicitly on this cache. It does not count removes pushed from other caches.";
+  private static final String removeAllTimeDesc =
+      "Total time spent performing removeAlls that originated in this cache. This includes time spent waiting for the removeAll to be done in remote caches (if required).";
+  private static final String getTimeDesc =
+      "Total time spent doing get operations from this cache (including netsearch and netload)";
+  private static final String eventQueueSizeDesc = "The number of cache events waiting to be processed.";
+  private static final String eventQueueThrottleTimeDesc =
+      "The total amount of time, in nanoseconds, spent delayed by the event queue throttle.";
+  private static final String eventQueueThrottleCountDesc =
+      "The total number of times a thread was delayed in adding an event to the event queue.";
+  private static final String eventThreadsDesc = "The number of threads currently processing events.";
+  private static final String missesDesc =
+      "Total number of times a get on the cache did not find a value already in local memory. The number of hits (i.e. gets that did not miss) can be calculated by subtracting misses from gets.";
+  private static final String queryExecutionsDesc = "Total number of times some query has been executed";
+  private static final String queryExecutionTimeDesc = "Total time spent executing queries";
+  private static final String queryResultsHashCollisionsDesc =
+      "Total number of times an hash code collision occurred when inserting an object into an OQL result set or rehashing it";
+  private static final String queryResultsHashCollisionProbeTimeDesc =
+      "Total time spent probing the hashtable in an OQL result set due to hash code collisions, includes reads, writes, and rehashes";
+  private static final String partitionedRegionOQLQueryRetriesDesc =
+      "Total number of times an OQL Query on a Partitioned Region had to be retried";
+  private static final String txSuccessLifeTimeDesc =
+      "The total amount of time, in nanoseconds, spent in a transaction before a successful commit. The time measured starts at transaction begin and ends when commit is called.";
+  private static final String txFailedLifeTimeDesc =
+      "The total amount of time, in nanoseconds, spent in a transaction before a failed commit. The time measured starts at transaction begin and ends when commit is called.";
+  private static final String txRollbackLifeTimeDesc =
+      "The total amount of time, in nanoseconds, spent in a transaction before an explicit rollback. The time measured starts at transaction begin and ends when rollback is called.";
+  private static final String txCommitsDesc = "Total number times a transaction commit has succeeded.";
+  private static final String txFailuresDesc = "Total number times a transaction commit has failed.";
+  private static final String txRollbacksDesc =
+      "Total number times a transaction has been explicitly rolled back.";
+  private static final String txCommitTimeDesc =
+      "The total amount of time, in nanoseconds, spent doing successful transaction commits.";
+  private static final String txFailureTimeDesc =
+      "The total amount of time, in nanoseconds, spent doing failed transaction commits.";
+  private static final String txRollbackTimeDesc =
+      "The total amount of time, in nanoseconds, spent doing explicit transaction rollbacks.";
+  private static final String txCommitChangesDesc = "Total number of changes made by committed transactions.";
+  private static final String txFailureChangesDesc = "Total number of changes lost by failed transactions.";
+  private static final String txRollbackChangesDesc =
+      "Total number of changes lost by explicit transaction rollbacks.";
+  private static final String txConflictCheckTimeDesc =
+      "The total amount of time, in nanoseconds, spent doing conflict checks during transaction commit";
+  private static final String reliableQueuedOpsDesc =
+      "Current number of cache operations queued for distribution to required roles.";
+  private static final String reliableQueueSizeDesc =
+      "Current size in megabytes of disk used to queue for distribution to required roles.";
+  private static final String reliableQueueMaxDesc =
+      "Maximum size in megabytes allotted for disk usage to queue for distribution to required roles.";
+  private static final String reliableRegionsDesc = "Current number of regions configured for reliability.";
+  private static final String reliableRegionsMissingDesc =
+      "Current number regions configured for reliability that are missing required roles.";
+  private static final String reliableRegionsQueuingDesc =
+      "Current number regions configured for reliability that are queuing for required roles.";
+  private static final String reliableRegionsMissingFullAccessDesc =
+      "Current number of regions configured for reliablity that are missing require roles with full access";
+  private static final String reliableRegionsMissingLimitedAccessDesc =
+      "Current number of regions configured for reliablity that are missing required roles with Limited access";
+  private static final String reliableRegionsMissingNoAccessDesc =
+      "Current number of regions configured for reliablity that are missing required roles with No access";
+  private static final String clearsDesc = "The total number of times a clear has been done on this cache.";
+  private static final String nonSingleHopsDesc =
+      "Total number of times client request observed more than one hop during operation.";
+  private static final String metaDataRefreshCountDesc =
+      "Total number of times the meta data is refreshed due to hopping observed.";
+  private static final String conflatedEventsDesc =
+      "Number of events not delivered due to conflation.  Typically this means that the event arrived after a later event was already applied to the cache.";
+  private static final String tombstoneCountDesc =
+      "Number of destroyed entries that are retained for concurrent modification detection";
+  private static final String tombstoneGCCountDesc =
+      "Number of garbage-collections performed on destroyed entries";
+  private static final String tombstoneOverhead1Desc =
+      "Amount of memory consumed by destroyed entries in replicated or partitioned regions";
+  private static final String tombstoneOverhead2Desc =
+      "Amount of memory consumed by destroyed entries in non-replicated regions";
+  private static final String clearTimeoutsDesc =
+      "Number of timeouts waiting for events concurrent to a clear() operation to be received and applied before performing the clear()";
+  private static final String deltaUpdatesDesc =
+      "The total number of times entries in this cache are updated through delta bytes.";
+  private static final String deltaUpdatesTimeDesc =
+      "Total time spent applying the received delta bytes to entries in this cache.";
+  private static final String deltaFailedUpdatesDesc =
+      "The total number of times entries in this cache failed to be updated through delta bytes.";
+  private static final String deltasPreparedDesc = "The total number of times delta was prepared in this cache.";
+  private static final String deltasPreparedTimeDesc = "Total time spent preparing delta bytes in this cache.";
+  private static final String deltasSentDesc =
+      "The total number of times delta was sent to remote caches. This excludes deltas sent from server to client.";
+  private static final String deltaFullValuesSentDesc =
+      "The total number of times a full value was sent to a remote cache.";
+  private static final String deltaFullValuesRequestedDesc =
+      "The total number of times a full value was requested by this cache.";
+  private static final String importedEntriesCountDesc =
+      "The total number of entries imported from a snapshot file.";
+  private static final String importTimeDesc = "The total time spent importing entries from a snapshot file.";
+  private static final String exportedEntriesCountDesc =
+      "The total number of entries exported into a snapshot file.";
+  private static final String exportTimeDesc = "The total time spent exporting entries into a snapshot file.";
+  private static final String compressionCompressTimeDesc = "The total time spent compressing data.";
+  private static final String compressionDecompressTimeDesc = "The total time spent decompressing data.";
+  private static final String compressionCompressionsDesc = "The total number of compression operations.";
+  private static final String compressionDecompressionsDesc = "The total number of decompression operations.";
+  private static final String compressionPreCompresssedBytesDesc =
+      "The total number of bytes before compressing.";
+  private static final String compressionPostCompressedBytesDesc =
+      "The total number of bytes after compressing.";
+  private static final String evictByCriteria_evictionsDesc = "The total number of entries evicted";// total actual evictions (entries evicted)
+  private static final String evictByCriteria_evictionTimeDesc = "Time taken for eviction process";// total eviction time including product +user expr.
+  private static final String evictByCriteria_evictionsInProgressDesc = "Total number of evictions in progress";
+  private static final String evictByCriteria_evaluationsDesc = "Total number of evaluations for eviction";// total eviction attempts
+  private static final String evictByCriteria_evaluationTimeDesc = "Total time taken for evaluation of user expression during eviction";// time taken to evaluate user expression.
+
+
+  private void initializeStats(StatisticsFactory factory) {
+    type = factory.createType("CachePerfStats", "Statistics about GemFire cache performance",
+        new StatisticDescriptor[]{
+            factory.createIntGauge("loadsInProgress", loadsInProgressDesc, "operations"),
+            factory.createIntCounter("loadsCompleted", loadsCompletedDesc, "operations"),
+            factory.createLongCounter("loadTime", loadTimeDesc, "nanoseconds", false),
+            factory.createIntGauge("netloadsInProgress", netloadsInProgressDesc, "operations"),
+            factory.createIntCounter("netloadsCompleted", netloadsCompletedDesc, "operations"),
+            factory.createLongCounter("netloadTime", netloadTimeDesc, "nanoseconds", false),
+            factory.createIntGauge("netsearchesInProgress", netsearchesInProgressDesc, "operations"),
+            factory.createIntCounter("netsearchesCompleted", netsearchesCompletedDesc, "operations"),
+            factory.createLongCounter("netsearchTime", netsearchTimeDesc, "nanoseconds"),
+            factory.createIntGauge("cacheWriterCallsInProgress", cacheWriterCallsInProgressDesc,
                 "operations"),
-            f.createIntCounter("cacheWriterCallsCompleted", cacheWriterCallsCompletedDesc,
+            factory.createIntCounter("cacheWriterCallsCompleted", cacheWriterCallsCompletedDesc,
                 "operations"),
-            f.createLongCounter("cacheWriterCallTime", cacheWriterCallTimeDesc, "nanoseconds"),
-            f.createIntGauge("cacheListenerCallsInProgress", cacheListenerCallsInProgressDesc,
+            factory.createLongCounter("cacheWriterCallTime", cacheWriterCallTimeDesc, "nanoseconds"),
+            factory.createIntGauge("cacheListenerCallsInProgress", cacheListenerCallsInProgressDesc,
                 "operations"),
-            f.createIntCounter("cacheListenerCallsCompleted", cacheListenerCallsCompletedDesc,
+            factory.createIntCounter("cacheListenerCallsCompleted", cacheListenerCallsCompletedDesc,
                 "operations"),
-            f.createLongCounter("cacheListenerCallTime", cacheListenerCallTimeDesc, "nanoseconds"),
-            f.createIntGauge("indexUpdateInProgress", "Current number of ops in progress",
+            factory.createLongCounter("cacheListenerCallTime", cacheListenerCallTimeDesc, "nanoseconds"),
+            factory.createIntGauge("indexUpdateInProgress", "Current number of ops in progress",
                 "operations"),
-            f.createIntCounter("indexUpdateCompleted", "Total number of ops that have completed",
+            factory.createIntCounter("indexUpdateCompleted", "Total number of ops that have completed",
                 "operations"),
-            f.createLongCounter("indexUpdateTime", "Total amount of time spent doing this op",
+            factory.createLongCounter("indexUpdateTime", "Total amount of time spent doing this op",
                 "nanoseconds"),
-            f.createIntGauge("indexInitializationInProgress",
+            factory.createIntGauge("indexInitializationInProgress",
                 "Current number of index initializations in progress", "operations"),
-            f.createIntCounter("indexInitializationCompleted",
+            factory.createIntCounter("indexInitializationCompleted",
                 "Total number of index initializations that have completed", "operations"),
-            f.createLongCounter("indexInitializationTime",
+            factory.createLongCounter("indexInitializationTime",
                 "Total amount of time spent initializing indexes", "nanoseconds"),
 
-            f.createIntGauge("getInitialImagesInProgress", getInitialImagesInProgressDesc,
+            factory.createIntGauge("getInitialImagesInProgress", getInitialImagesInProgressDesc,
                 "operations"),
-            f.createIntCounter("getInitialImagesCompleted", getInitialImagesCompletedDesc,
+            factory.createIntCounter("getInitialImagesCompleted", getInitialImagesCompletedDesc,
                 "operations"),
-            f.createIntCounter("deltaGetInitialImagesCompleted", deltaGetInitialImagesCompletedDesc,
+            factory.createIntCounter("deltaGetInitialImagesCompleted", deltaGetInitialImagesCompletedDesc,
                 "operations"),
-            f.createLongCounter("getInitialImageTime", getInitialImageTimeDesc, "nanoseconds"),
-            f.createIntCounter("getInitialImageKeysReceived", getInitialImageKeysReceivedDesc,
+            factory.createLongCounter("getInitialImageTime", getInitialImageTimeDesc, "nanoseconds"),
+            factory.createIntCounter("getInitialImageKeysReceived", getInitialImageKeysReceivedDesc,
                 "keys"),
-            f.createIntGauge("regions", regionsDesc, "regions"),
-            f.createIntGauge("partitionedRegions", partitionedRegionsDesc, "partitionedRegions"),
-            f.createIntCounter("destroys", destroysDesc, "operations"),
-            f.createIntCounter("updates", updatesDesc, "operations"),
-            f.createLongCounter("updateTime", updateTimeDesc, "nanoseconds"),
-            f.createIntCounter("invalidates", invalidatesDesc, "operations"),
-            f.createIntCounter("gets", getsDesc, "operations"),
-            f.createIntCounter("misses", missesDesc, "operations"),
-            f.createIntCounter("creates", createsDesc, "operations"),
-            f.createIntCounter("puts", putsDesc, "operations"),
-            f.createLongCounter("putTime", putTimeDesc, "nanoseconds", false),
-            f.createIntCounter("putalls", putallsDesc, "operations"),
-            f.createLongCounter("putallTime", putallTimeDesc, "nanoseconds", false),
-            f.createIntCounter("removeAlls", removeAllsDesc, "operations"),
-            f.createLongCounter("removeAllTime", removeAllTimeDesc, "nanoseconds", false),
-            f.createLongCounter("getTime", getTimeDesc, "nanoseconds", false),
-            f.createIntGauge("eventQueueSize", eventQueueSizeDesc, "messages"),
-            f.createIntGauge("eventQueueThrottleCount", eventQueueThrottleCountDesc, "delays"),
-            f.createLongCounter("eventQueueThrottleTime", eventQueueThrottleTimeDesc, "nanoseconds",
+            factory.createIntGauge("regions", regionsDesc, "regions"),
+            factory.createIntGauge("partitionedRegions", partitionedRegionsDesc, "partitionedRegions"),
+            factory.createIntCounter("destroys", destroysDesc, "operations"),
+            factory.createIntCounter("updates", updatesDesc, "operations"),
+            factory.createLongCounter("updateTime", updateTimeDesc, "nanoseconds"),
+            factory.createIntCounter("invalidates", invalidatesDesc, "operations"),
+            factory.createIntCounter("gets", getsDesc, "operations"),
+            factory.createIntCounter("misses", missesDesc, "operations"),
+            factory.createIntCounter("creates", createsDesc, "operations"),
+            factory.createIntCounter("puts", putsDesc, "operations"),
+            factory.createLongCounter("putTime", putTimeDesc, "nanoseconds", false),
+            factory.createIntCounter("putalls", putallsDesc, "operations"),
+            factory.createLongCounter("putallTime", putallTimeDesc, "nanoseconds", false),
+            factory.createIntCounter("removeAlls", removeAllsDesc, "operations"),
+            factory.createLongCounter("removeAllTime", removeAllTimeDesc, "nanoseconds", false),
+            factory.createLongCounter("getTime", getTimeDesc, "nanoseconds", false),
+            factory.createIntGauge("eventQueueSize", eventQueueSizeDesc, "messages"),
+            factory.createIntGauge("eventQueueThrottleCount", eventQueueThrottleCountDesc, "delays"),
+            factory.createLongCounter("eventQueueThrottleTime", eventQueueThrottleTimeDesc, "nanoseconds",
                 false),
-            f.createIntGauge("eventThreads", eventThreadsDesc, "threads"),
-            f.createIntCounter("queryExecutions", queryExecutionsDesc, "operations"),
-            f.createLongCounter("queryExecutionTime", queryExecutionTimeDesc, "nanoseconds"),
-            f.createIntCounter("queryResultsHashCollisions", queryResultsHashCollisionsDesc,
+            factory.createIntGauge("eventThreads", eventThreadsDesc, "threads"),
+            factory.createIntCounter("queryExecutions", queryExecutionsDesc, "operations"),
+            factory.createLongCounter("queryExecutionTime", queryExecutionTimeDesc, "nanoseconds"),
+            factory.createIntCounter("queryResultsHashCollisions", queryResultsHashCollisionsDesc,
                 "operations"),
-            f.createLongCounter("queryResultsHashCollisionProbeTime",
+            factory.createLongCounter("queryResultsHashCollisionProbeTime",
                 queryResultsHashCollisionProbeTimeDesc, "nanoseconds"),
-            f.createLongCounter("partitionedRegionQueryRetries",
+            factory.createLongCounter("partitionedRegionQueryRetries",
                 partitionedRegionOQLQueryRetriesDesc, "retries"),
 
-            f.createIntCounter("txCommits", txCommitsDesc, "commits"),
-            f.createIntCounter("txCommitChanges", txCommitChangesDesc, "changes"),
-            f.createLongCounter("txCommitTime", txCommitTimeDesc, "nanoseconds", false),
-            f.createLongCounter("txSuccessLifeTime", txSuccessLifeTimeDesc, "nanoseconds", false),
-
-            f.createIntCounter("txFailures", txFailuresDesc, "failures"),
-            f.createIntCounter("txFailureChanges", txFailureChangesDesc, "changes"),
-            f.createLongCounter("txFailureTime", txFailureTimeDesc, "nanoseconds", false),
-            f.createLongCounter("txFailedLifeTime", txFailedLifeTimeDesc, "nanoseconds", false),
-
-            f.createIntCounter("txRollbacks", txRollbacksDesc, "rollbacks"),
-            f.createIntCounter("txRollbackChanges", txRollbackChangesDesc, "changes"),
-            f.createLongCounter("txRollbackTime", txRollbackTimeDesc, "nanoseconds", false),
-            f.createLongCounter("txRollbackLifeTime", txRollbackLifeTimeDesc, "nanoseconds", false),
-            f.createLongCounter("txConflictCheckTime", txConflictCheckTimeDesc, "nanoseconds",
+            factory.createIntCounter("txCommits", txCommitsDesc, "commits"),
+            factory.createIntCounter("txCommitChanges", txCommitChangesDesc, "changes"),
+            factory.createLongCounter("txCommitTime", txCommitTimeDesc, "nanoseconds", false),
+            factory.createLongCounter("txSuccessLifeTime", txSuccessLifeTimeDesc, "nanoseconds", false),
+
+            factory.createIntCounter("txFailures", txFailuresDesc, "failures"),
+            factory.createIntCounter("txFailureChanges", txFailureChangesDesc, "changes"),
+            factory.createLongCounter("txFailureTime", txFailureTimeDesc, "nanoseconds", false),
+            factory.createLongCounter("txFailedLifeTime", txFailedLifeTimeDesc, "nanoseconds", false),
+
+            factory.createIntCounter("txRollbacks", txRollbacksDesc, "rollbacks"),
+            factory.createIntCounter("txRollbackChanges", txRollbackChangesDesc, "changes"),
+            factory.createLongCounter("txRollbackTime", txRollbackTimeDesc, "nanoseconds", false),
+            factory.createLongCounter("txRollbackLifeTime", txRollbackLifeTimeDesc, "nanoseconds", false),
+            factory.createLongCounter("txConflictCheckTime", txConflictCheckTimeDesc, "nanoseconds",
                 false),
 
-            f.createIntGauge("reliableQueuedOps", reliableQueuedOpsDesc, "operations"),
-            f.createIntGauge("reliableQueueSize", reliableQueueSizeDesc, "megabytes"),
-            f.createIntGauge("reliableQueueMax", reliableQueueMaxDesc, "megabytes"),
-            f.createIntGauge("reliableRegions", reliableRegionsDesc, "regions"),
-            f.createIntGauge("reliableRegionsMissing", reliableRegionsMissingDesc, "regions"),
-            f.createIntGauge("reliableRegionsQueuing", reliableRegionsQueuingDesc, "regions"),
-            f.createIntGauge("reliableRegionsMissingFullAccess",
+            factory.createIntGauge("reliableQueuedOps", reliableQueuedOpsDesc, "operations"),
+            factory.createIntGauge("reliableQueueSize", reliableQueueSizeDesc, "megabytes"),
+            factory.createIntGauge("reliableQueueMax", reliableQueueMaxDesc, "megabytes"),
+            factory.createIntGauge("reliableRegions", reliableRegionsDesc, "regions"),
+            factory.createIntGauge("reliableRegionsMissing", reliableRegionsMissingDesc, "regions"),
+            factory.createIntGauge("reliableRegionsQueuing", reliableRegionsQueuingDesc, "regions"),
+            factory.createIntGauge("reliableRegionsMissingFullAccess",
                 reliableRegionsMissingFullAccessDesc, "regions"),
-            f.createIntGauge("reliableRegionsMissingLimitedAccess",
+            factory.createIntGauge("reliableRegionsMissingLimitedAccess",
                 reliableRegionsMissingLimitedAccessDesc, "regions"),
-            f.createIntGauge("reliableRegionsMissingNoAccess", reliableRegionsMissingNoAccessDesc,
+            factory.createIntGauge("reliableRegionsMissingNoAccess", reliableRegionsMissingNoAccessDesc,
                 "regions"),
-            f.createLongGauge("entries",
+            factory.createLongGauge("entries",
                 "Current number of entries in the cache. This does not include any entries that are tombstones. See tombstoneCount.",
                 "entries"),
-            f.createLongCounter("eventsQueued",
+            factory.createLongCounter("eventsQueued",
                 "Number of events attached to " + "other events for callback invocation", "events"),
-            f.createIntCounter("retries",
+            factory.createIntCounter("retries",
                 "Number of times a concurrent destroy followed by a create has caused an entry operation to need to retry.",
                 "operations"),
-            f.createIntCounter("clears", clearsDesc, "operations"),
-            f.createIntGauge("diskTasksWaiting",
+            factory.createIntCounter("clears", clearsDesc, "operations"),
+            factory.createIntGauge("diskTasksWaiting",
                 "Current number of disk tasks (oplog compactions, asynchronous recoveries, etc) that are waiting for a thread to run the operation",
                 "operations"),
-            f.createLongCounter("conflatedEvents", conflatedEventsDesc, "operations"),
-            f.createIntGauge("tombstones", tombstoneCountDesc, "entries"),
-            f.createIntCounter("tombstoneGCs", tombstoneGCCountDesc, "operations"),
-            f.createLongGauge("replicatedTombstonesSize", tombstoneOverhead1Desc, "bytes"),
-            f.createLongGauge("nonReplicatedTombstonesSize", tombstoneOverhead2Desc, "bytes"),
-            f.createIntCounter("clearTimeouts", clearTimeoutsDesc, "timeouts"),
-            f.createIntGauge("evictorJobsStarted", "Number of evictor jobs started", "jobs"),
-            f.createIntGauge("evictorJobsCompleted", "Number of evictor jobs completed", "jobs"),
-            f.createIntGauge("evictorQueueSize",
+            factory.createLongCounter("conflatedEvents", conflatedEventsDesc, "operations"),
+            factory.createIntGauge("tombstones", tombstoneCountDesc, "entries"),
+            factory.createIntCounter("tombstoneGCs", tombstoneGCCountDesc, "operations"),
+            factory.createLongGauge("replicatedTombstonesSize", tombstoneOverhead1Desc, "bytes"),
+            factory.createLongGauge("nonReplicatedTombstonesSize", tombstoneOverhead2Desc, "bytes"),
+            factory.createIntCounter("clearTimeouts", clearTimeoutsDesc, "timeouts"),
+            factory.createIntGauge("evictorJobsStarted", "Number of evictor jobs started", "jobs"),
+            factory.createIntGauge("evictorJobsCompleted", "Number of evictor jobs completed", "jobs"),
+            factory.createIntGauge("evictorQueueSize",
                 "Number of jobs waiting to be picked up by evictor threads", "jobs"),
-            f.createLongCounter("evictWorkTime",
+            factory.createLongCounter("evictWorkTime",
                 "Total time spent doing eviction work in background threads", "nanoseconds", false),
-            f.createLongCounter("nonSingleHopsCount", nonSingleHopsDesc,
+            factory.createLongCounter("nonSingleHopsCount", nonSingleHopsDesc,
                 "Total number of times client request observed more than one hop during operation.",
                 false),
-            f.createLongCounter("metaDataRefreshCount", metaDataRefreshCountDesc,
+            factory.createLongCounter("metaDataRefreshCount", metaDataRefreshCountDesc,
                 "Total number of times the meta data is refreshed due to hopping.", false),
-            f.createIntCounter("deltaUpdates", deltaUpdatesDesc, "operations"),
-            f.createLongCounter("deltaUpdatesTime", deltaUpdatesTimeDesc, "nanoseconds", false),
-            f.createIntCounter("deltaFailedUpdates", deltaFailedUpdatesDesc, "operations"),
-            f.createIntCounter("deltasPrepared", deltasPreparedDesc, "operations"),
-            f.createLongCounter("deltasPreparedTime", deltasPreparedTimeDesc, "nanoseconds", false),
-            f.createIntCounter("deltasSent", deltasSentDesc, "operations"),
-            f.createIntCounter("deltaFullValuesSent", deltaFullValuesSentDesc, "operations"),
-            f.createIntCounter("deltaFullValuesRequested", deltaFullValuesRequestedDesc,
+            factory.createIntCounter("deltaUpdates", deltaUpdatesDesc, "operations"),
+            factory.createLongCounter("deltaUpdatesTime", deltaUpdatesTimeDesc, "nanoseconds", false),
+            factory.createIntCounter("deltaFailedUpdates", deltaFailedUpdatesDesc, "operations"),
+            factory.createIntCounter("deltasPrepared", deltasPreparedDesc, "operations"),
+            factory.createLongCounter("deltasPreparedTime", deltasPreparedTimeDesc, "nanoseconds", false),
+            factory.createIntCounter("deltasSent", deltasSentDesc, "operations"),
+            factory.createIntCounter("deltaFullValuesSent", deltaFullValuesSentDesc, "operations"),
+            factory.createIntCounter("deltaFullValuesRequested", deltaFullValuesRequestedDesc,
                 "operations"),
 
-            f.createLongCounter("importedEntries", importedEntriesCountDesc, "entries"),
-            f.createLongCounter("importTime", importTimeDesc, "nanoseconds"),
-            f.createLongCounter("exportedEntries", exportedEntriesCountDesc, "entries"),
-            f.createLongCounter("exportTime", exportTimeDesc, "nanoseconds"),
+            factory.createLongCounter("importedEntries", importedEntriesCountDesc, "entries"),
+            factory.createLongCounter("importTime", importTimeDesc, "nanoseconds"),
+            factory.createLongCounter("exportedEntries", exportedEntriesCountDesc, "entries"),
+            factory.createLongCounter("exportTime", exportTimeDesc, "nanoseconds"),
 
-            f.createLongCounter("compressTime", compressionCompressTimeDesc, "nanoseconds"),
-            f.createLongCounter("decompressTime", compressionDecompressTimeDesc, "nanoseconds"),
-            f.createLongCounter("compressions", compressionCompressionsDesc, "operations"),
-            f.createLongCounter("decompressions", compressionDecompressionsDesc, "operations"),
-            f.createLongCounter("preCompressedBytes", compressionPreCompresssedBytesDesc, "bytes"),
-            f.createLongCounter("postCompressedBytes", compressionPostCompressedBytesDesc, "bytes"),
+            factory.createLongCounter("compressTime", compressionCompressTimeDesc, "nanoseconds"),
+            factory.createLongCounter("decompressTime", compressionDecompressTimeDesc, "nanoseconds"),
+            factory.createLongCounter("compressions", compressionCompressionsDesc, "operations"),
+            factory.createLongCounter("decompressions", compressionDecompressionsDesc, "operations"),
+            factory.createLongCounter("preCompressedBytes", compressionPreCompresssedBytesDesc, "bytes"),
+            factory.createLongCounter("postCompressedBytes", compressionPostCompressedBytesDesc, "bytes"),
 
-            f.createLongCounter("evictByCriteria_evictions", evictByCriteria_evictionsDesc,
+            factory.createLongCounter("evictByCriteria_evictions", evictByCriteria_evictionsDesc,
                 "operations"),
-            f.createLongCounter("evictByCriteria_evictionTime", evictByCriteria_evictionTimeDesc,
+            factory.createLongCounter("evictByCriteria_evictionTime", evictByCriteria_evictionTimeDesc,
                 "nanoseconds"),
-            f.createLongCounter("evictByCriteria_evictionsInProgress",
+            factory.createLongCounter("evictByCriteria_evictionsInProgress",
                 evictByCriteria_evictionsInProgressDesc, "operations"),
-            f.createLongCounter("evictByCriteria_evaluations", evictByCriteria_evaluationsDesc,
+            factory.createLongCounter("evictByCriteria_evaluations", evictByCriteria_evaluationsDesc,
                 "operations"),
-            f.createLongCounter("evictByCriteria_evaluationTime",
+            factory.createLongCounter("evictByCriteria_evaluationTime",
                 evictByCriteria_evaluationTimeDesc, "nanoseconds")});
 
     // Initialize id fields
@@ -646,6 +633,7 @@ public class CachePerfStats {
    * factory.
    */
   public CachePerfStats(StatisticsFactory factory) {
+    initializeStats(factory);
     stats = factory.createAtomicStatistics(type, "cachePerfStats");
   }
 
@@ -654,12 +642,12 @@ public class CachePerfStats {
    * factory.
    */
   public CachePerfStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     stats = factory.createAtomicStatistics(type, "RegionStats-" + name);
   }
 
   /**
    * Returns the current NanoTime or, if clock stats are disabled, zero.
-   *
    * @since GemFire 5.0
    */
   public static long getStatTime() {
@@ -1158,14 +1146,16 @@ public class CachePerfStats {
 
   public void endPutAll(long start) {
     stats.incInt(putallsId, 1);
-    if (enableClockStats)
+    if (enableClockStats) {
       stats.incLong(putallTimeId, getStatTime() - start);
+    }
   }
 
   public void endRemoveAll(long start) {
     stats.incInt(removeAllsId, 1);
-    if (enableClockStats)
+    if (enableClockStats) {
       stats.incLong(removeAllTimeId, getStatTime() - start);
+    }
   }
 
   public void endQueryExecution(long executionTime) {
@@ -1291,7 +1281,6 @@ public class CachePerfStats {
   /**
    * Closes these stats so that they can not longer be used. The stats are closed when the cache is
    * closed.
-   *
    * @since GemFire 3.5
    */
   void close() {
@@ -1300,7 +1289,6 @@ public class CachePerfStats {
 
   /**
    * Returns whether or not these stats have been closed
-   *
    * @since GemFire 3.5
    */
   public boolean isClosed() {
@@ -1373,7 +1361,6 @@ public class CachePerfStats {
 
   /**
    * Returns the Statistics instance that stores the cache perf stats.
-   *
    * @since GemFire 3.5
    */
   public Statistics getStats() {
@@ -1404,10 +1391,10 @@ public class CachePerfStats {
   // }
   // };
   // }
+
   /**
    * Returns a helper object so that the event pool can record its stats to the proper cache perf
    * stats.
-   *
    * @since GemFire 3.5
    */
   public PoolStatHelper getEventPoolHelper() {
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 039f507..59402a2 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
@@ -29,18 +29,18 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class DiskDirectoryStats {
 
-  private static final StatisticsType type;
+  private StatisticsType type;
 
   //////////////////// Statistic "Id" Fields ////////////////////
 
-  private static final int diskSpaceId;
-  private static final int maxSpaceId;
-  private static final int volumeSizeId;
-  private static final int volumeFreeSpaceId;
-  private static final int volumeFreeSpaceChecksId;
-  private static final int volumeFreeSpaceTimeId;
+  private int diskSpaceId;
+  private int maxSpaceId;
+  private int volumeSizeId;
+  private int volumeFreeSpaceId;
+  private int volumeFreeSpaceChecksId;
+  private int volumeFreeSpaceTimeId;
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "DiskDirStatistics";
     String statDescription = "Statistics about a single disk directory for a region";
 
@@ -48,17 +48,15 @@ public class DiskDirectoryStats {
         "The total number of bytes currently being used on disk in this directory for oplog files.";
     final String maxSpaceDesc =
         "The configured maximum number of bytes allowed in this directory for oplog files. Note that some product configurations allow this maximum to be exceeded.";
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    type = f.createType(statName, statDescription,
-        new StatisticDescriptor[] {f.createLongGauge("diskSpace", diskSpaceDesc, "bytes"),
-            f.createLongGauge("maximumSpace", maxSpaceDesc, "bytes"),
-            f.createLongGauge("volumeSize", "The total size in bytes of the disk volume", "bytes"),
-            f.createLongGauge("volumeFreeSpace", "The total free space in bytes on the disk volume",
+    type = factory.createType(statName, statDescription,
+        new StatisticDescriptor[] {factory.createLongGauge("diskSpace", diskSpaceDesc, "bytes"),
+            factory.createLongGauge("maximumSpace", maxSpaceDesc, "bytes"),
+            factory.createLongGauge("volumeSize", "The total size in bytes of the disk volume", "bytes"),
+            factory.createLongGauge("volumeFreeSpace", "The total free space in bytes on the disk volume",
                 "bytes"),
-            f.createLongCounter("volumeFreeSpaceChecks", "The total number of disk space checks",
+            factory.createLongCounter("volumeFreeSpaceChecks", "The total number of disk space checks",
                 "checks"),
-            f.createLongCounter("volumeFreeSpaceTime", "The total time spent checking disk usage",
+            factory.createLongCounter("volumeFreeSpaceTime", "The total time spent checking disk usage",
                 "nanoseconds")});
 
     // Initialize id fields
@@ -80,8 +78,9 @@ public class DiskDirectoryStats {
   /**
    * Creates a new <code>DiskRegionStatistics</code> for the given region.
    */
-  public DiskDirectoryStats(StatisticsFactory f, String name) {
-    this.stats = f.createStatistics(type, name);
+  public DiskDirectoryStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
+    this.stats = factory.createStatistics(type, name);
   }
 
   ///////////////////// Instance Methods /////////////////////
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 3a91a8a..492b0d3 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
@@ -29,29 +29,29 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class DiskRegionStats {
 
-  private static final StatisticsType type;
+  private StatisticsType type;
 
   //////////////////// Statistic "Id" Fields ////////////////////
 
-  private static final int writesId;
-  private static final int writeTimeId;
-  private static final int bytesWrittenId;
-  private static final int readsId;
-  private static final int readTimeId;
-  private static final int writesInProgressId;
-  private static final int bytesReadId;
-  private static final int removesId;
-  private static final int removeTimeId;
-  private static final int numOverflowOnDiskId;
-  private static final int numEntriesInVMId;
-  private static final int numOverflowBytesOnDiskId;
+  private int writesId;
+  private int writeTimeId;
+  private int bytesWrittenId;
+  private int readsId;
+  private int readTimeId;
+  private int writesInProgressId;
+  private int bytesReadId;
+  private int removesId;
+  private int removeTimeId;
+  private int numOverflowOnDiskId;
+  private int numEntriesInVMId;
+  private int numOverflowBytesOnDiskId;
 
-  private static final int localInitializationsId;
-  private static final int remoteInitializationsId;
+  private int localInitializationsId;
+  private int remoteInitializationsId;
 
 
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "DiskRegionStatistics";
     String statDescription = "Statistics about a Region's use of the disk";
 
@@ -76,24 +76,22 @@ public class DiskRegionStats {
     final String remoteInitializationsDesc =
         "The number of times that this region has been initialized by doing GII from a peer (0 or 1)";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    type = f.createType(statName, statDescription, new StatisticDescriptor[] {
-        f.createLongCounter("writes", writesDesc, "ops"),
-        f.createLongCounter("writeTime", writeTimeDesc, "nanoseconds"),
-        f.createLongCounter("writtenBytes", bytesWrittenDesc, "bytes"),
-        f.createLongCounter("reads", readsDesc, "ops"),
-        f.createLongCounter("readTime", readTimeDesc, "nanoseconds"),
-        f.createLongCounter("readBytes", bytesReadDesc, "bytes"),
-        f.createLongCounter("removes", removesDesc, "ops"),
-        f.createLongCounter("removeTime", removeTimeDesc, "nanoseconds"),
-        f.createLongGauge("entriesOnlyOnDisk", numOverflowOnDiskDesc, "entries"),
-        f.createLongGauge("bytesOnlyOnDisk", numOverflowBytesOnDiskDesc, "bytes"),
-        f.createLongGauge("entriesInVM", numEntriesInVMDesc, "entries"),
-        f.createIntGauge("writesInProgress", "current number of oplog writes that are in progress",
+    type = factory.createType(statName, statDescription, new StatisticDescriptor[] {
+        factory.createLongCounter("writes", writesDesc, "ops"),
+        factory.createLongCounter("writeTime", writeTimeDesc, "nanoseconds"),
+        factory.createLongCounter("writtenBytes", bytesWrittenDesc, "bytes"),
+        factory.createLongCounter("reads", readsDesc, "ops"),
+        factory.createLongCounter("readTime", readTimeDesc, "nanoseconds"),
+        factory.createLongCounter("readBytes", bytesReadDesc, "bytes"),
+        factory.createLongCounter("removes", removesDesc, "ops"),
+        factory.createLongCounter("removeTime", removeTimeDesc, "nanoseconds"),
+        factory.createLongGauge("entriesOnlyOnDisk", numOverflowOnDiskDesc, "entries"),
+        factory.createLongGauge("bytesOnlyOnDisk", numOverflowBytesOnDiskDesc, "bytes"),
+        factory.createLongGauge("entriesInVM", numEntriesInVMDesc, "entries"),
+        factory.createIntGauge("writesInProgress", "current number of oplog writes that are in progress",
             "writes"),
-        f.createIntGauge("localInitializations", localInitializationsDesc, "initializations"),
-        f.createIntGauge("remoteInitializations", remoteInitializationsDesc, "initializations"),});
+        factory.createIntGauge("localInitializations", localInitializationsDesc, "initializations"),
+        factory.createIntGauge("remoteInitializations", remoteInitializationsDesc, "initializations"),});
 
     // Initialize id fields
     writesId = type.nameToId("writes");
@@ -123,8 +121,9 @@ public class DiskRegionStats {
   /**
    * Creates a new <code>DiskRegionStatistics</code> for the given region.
    */
-  public DiskRegionStats(StatisticsFactory f, String name) {
-    this.stats = f.createAtomicStatistics(type, name);
+  public DiskRegionStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(type, name);
   }
 
   ///////////////////// Instance Methods /////////////////////
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 fbc90ee..ad3dc47 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
@@ -30,58 +30,58 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class DiskStoreStats {
 
-  private static final StatisticsType type;
+  private StatisticsType type;
 
   //////////////////// Statistic "Id" Fields ////////////////////
 
-  private static final int writesId;
-  private static final int writeTimeId;
-  private static final int bytesWrittenId;
-  private static final int flushesId;
-  private static final int flushTimeId;
-  private static final int bytesFlushedId;
-  private static final int readsId;
-  private static final int readTimeId;
-  private static final int recoveriesInProgressId;
-  private static final int recoveryTimeId;
-  private static final int recoveredBytesId;
-  private static final int recoveredEntryCreatesId;
-  private static final int recoveredEntryUpdatesId;
-  private static final int recoveredEntryDestroysId;
-  private static final int recoveredValuesSkippedDueToLRUId;
-  private static final int recoveryRecordsSkippedId;
-  private static final int compactsInProgressId;
-  private static final int writesInProgressId;
-  private static final int flushesInProgressId;
-  private static final int compactTimeId;
-  private static final int compactsId;
-  private static final int oplogRecoveriesId;
-  private static final int oplogRecoveryTimeId;
-  private static final int oplogRecoveredBytesId;
-  private static final int bytesReadId;
-  private static final int removesId;
-  private static final int removeTimeId;
-  private static final int queueSizeId;
-
-  private static final int compactInsertsId;
-  private static final int compactInsertTimeId;
-  private static final int compactUpdatesId;
-  private static final int compactUpdateTimeId;
-  private static final int compactDeletesId;
-  private static final int compactDeleteTimeId;
-
-  private static final int openOplogsId;
-  private static final int inactiveOplogsId;
-  private static final int compactableOplogsId;
-
-  private static final int oplogReadsId;
-  private static final int oplogSeeksId;
-
-  private static final int uncreatedRecoveredRegionsId;
-  private static final int backupsInProgress;
-  private static final int backupsCompleted;
-
-  static {
+  private int writesId;
+  private int writeTimeId;
+  private int bytesWrittenId;
+  private int flushesId;
+  private int flushTimeId;
+  private int bytesFlushedId;
+  private int readsId;
+  private int readTimeId;
+  private int recoveriesInProgressId;
+  private int recoveryTimeId;
+  private int recoveredBytesId;
+  private int recoveredEntryCreatesId;
+  private int recoveredEntryUpdatesId;
+  private int recoveredEntryDestroysId;
+  private int recoveredValuesSkippedDueToLRUId;
+  private int recoveryRecordsSkippedId;
+  private int compactsInProgressId;
+  private int writesInProgressId;
+  private int flushesInProgressId;
+  private int compactTimeId;
+  private int compactsId;
+  private int oplogRecoveriesId;
+  private int oplogRecoveryTimeId;
+  private int oplogRecoveredBytesId;
+  private int bytesReadId;
+  private int removesId;
+  private int removeTimeId;
+  private int queueSizeId;
+
+  private int compactInsertsId;
+  private int compactInsertTimeId;
+  private int compactUpdatesId;
+  private int compactUpdateTimeId;
+  private int compactDeletesId;
+  private int compactDeleteTimeId;
+
+  private int openOplogsId;
+  private int inactiveOplogsId;
+  private int compactableOplogsId;
+
+  private int oplogReadsId;
+  private int oplogSeeksId;
+
+  private int uncreatedRecoveredRegionsId;
+  private int backupsInProgress;
+  private int backupsCompleted;
+
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "DiskStoreStatistics";
     String statDescription = "Statistics about a Region's use of the disk";
 
@@ -114,82 +114,80 @@ public class DiskStoreStats {
     final String backupsCompletedDesc =
         "The number of backups of this disk store that have been taking while this VM was alive";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    type = f.createType(statName, statDescription,
-        new StatisticDescriptor[] {f.createLongCounter("writes", writesDesc, "ops"),
-            f.createLongCounter("writeTime", writeTimeDesc, "nanoseconds"),
-            f.createLongCounter("writtenBytes", bytesWrittenDesc, "bytes"),
-            f.createLongCounter("flushes", flushesDesc, "ops"),
-            f.createLongCounter("flushTime", flushTimeDesc, "nanoseconds"),
-            f.createLongCounter("flushedBytes", bytesFlushedDesc, "bytes"),
-            f.createLongCounter("reads", readsDesc, "ops"),
-            f.createLongCounter("readTime", readTimeDesc, "nanoseconds"),
-            f.createLongCounter("readBytes", bytesReadDesc, "bytes"),
-            f.createIntGauge("recoveriesInProgress",
+    type = factory.createType(statName, statDescription,
+        new StatisticDescriptor[] {factory.createLongCounter("writes", writesDesc, "ops"),
+            factory.createLongCounter("writeTime", writeTimeDesc, "nanoseconds"),
+            factory.createLongCounter("writtenBytes", bytesWrittenDesc, "bytes"),
+            factory.createLongCounter("flushes", flushesDesc, "ops"),
+            factory.createLongCounter("flushTime", flushTimeDesc, "nanoseconds"),
+            factory.createLongCounter("flushedBytes", bytesFlushedDesc, "bytes"),
+            factory.createLongCounter("reads", readsDesc, "ops"),
+            factory.createLongCounter("readTime", readTimeDesc, "nanoseconds"),
+            factory.createLongCounter("readBytes", bytesReadDesc, "bytes"),
+            factory.createIntGauge("recoveriesInProgress",
                 "current number of persistent regions being recovered from disk", "ops"),
-            f.createLongCounter("recoveryTime", recoveryTimeDesc, "nanoseconds"),
-            f.createLongCounter("recoveredBytes", recoveredBytesDesc, "bytes"),
-            f.createLongCounter("recoveredEntryCreates",
+            factory.createLongCounter("recoveryTime", recoveryTimeDesc, "nanoseconds"),
+            factory.createLongCounter("recoveredBytes", recoveredBytesDesc, "bytes"),
+            factory.createLongCounter("recoveredEntryCreates",
                 "The total number of entry create records processed while recovering oplog data.",
                 "ops"),
-            f.createLongCounter("recoveredEntryUpdates",
+            factory.createLongCounter("recoveredEntryUpdates",
                 "The total number of entry update records processed while recovering oplog data.",
                 "ops"),
-            f.createLongCounter("recoveredEntryDestroys",
+            factory.createLongCounter("recoveredEntryDestroys",
                 "The total number of entry destroy records processed while recovering oplog data.",
                 "ops"),
-            f.createLongCounter("recoveredValuesSkippedDueToLRU",
+            factory.createLongCounter("recoveredValuesSkippedDueToLRU",
                 "The total number of entry values that did not need to be recovered due to the LRU.",
                 "values"),
 
-            f.createLongCounter("recoveryRecordsSkipped",
+            factory.createLongCounter("recoveryRecordsSkipped",
                 "The total number of oplog records skipped during recovery.", "ops"),
 
-            f.createIntCounter("oplogRecoveries", oplogRecoveriesDesc, "ops"),
-            f.createLongCounter("oplogRecoveryTime", oplogRecoveryTimeDesc, "nanoseconds"),
-            f.createLongCounter("oplogRecoveredBytes", oplogRecoveredBytesDesc, "bytes"),
-            f.createLongCounter("removes", removesDesc, "ops"),
-            f.createLongCounter("removeTime", removeTimeDesc, "nanoseconds"),
-            f.createIntGauge("queueSize", queueSizeDesc, "entries"),
-            f.createLongCounter("compactInserts",
+            factory.createIntCounter("oplogRecoveries", oplogRecoveriesDesc, "ops"),
+            factory.createLongCounter("oplogRecoveryTime", oplogRecoveryTimeDesc, "nanoseconds"),
+            factory.createLongCounter("oplogRecoveredBytes", oplogRecoveredBytesDesc, "bytes"),
+            factory.createLongCounter("removes", removesDesc, "ops"),
+            factory.createLongCounter("removeTime", removeTimeDesc, "nanoseconds"),
+            factory.createIntGauge("queueSize", queueSizeDesc, "entries"),
+            factory.createLongCounter("compactInserts",
                 "Total number of times an oplog compact did a db insert", "inserts"),
-            f.createLongCounter("compactInsertTime",
+            factory.createLongCounter("compactInsertTime",
                 "Total amount of time, in nanoseconds, spent doing inserts during a compact",
                 "nanoseconds"),
-            f.createLongCounter("compactUpdates",
+            factory.createLongCounter("compactUpdates",
                 "Total number of times an oplog compact did an update", "updates"),
-            f.createLongCounter("compactUpdateTime",
+            factory.createLongCounter("compactUpdateTime",
                 "Total amount of time, in nanoseconds, spent doing updates during a compact",
                 "nanoseconds"),
-            f.createLongCounter("compactDeletes",
+            factory.createLongCounter("compactDeletes",
                 "Total number of times an oplog compact did a delete", "deletes"),
-            f.createLongCounter("compactDeleteTime",
+            factory.createLongCounter("compactDeleteTime",
                 "Total amount of time, in nanoseconds, spent doing deletes during a compact",
                 "nanoseconds"),
-            f.createIntGauge("compactsInProgress",
+            factory.createIntGauge("compactsInProgress",
                 "current number of oplog compacts that are in progress", "compacts"),
-            f.createIntGauge("writesInProgress",
+            factory.createIntGauge("writesInProgress",
                 "current number of oplog writes that are in progress", "writes"),
-            f.createIntGauge("flushesInProgress",
+            factory.createIntGauge("flushesInProgress",
                 "current number of oplog flushes that are in progress", "flushes"),
-            f.createLongCounter("compactTime",
+            factory.createLongCounter("compactTime",
                 "Total amount of time, in nanoseconds, spent compacting oplogs", "nanoseconds"),
-            f.createIntCounter("compacts", "Total number of completed oplog compacts", "compacts"),
-            f.createIntGauge("openOplogs", "Current number of oplogs this disk store has open",
+            factory.createIntCounter("compacts", "Total number of completed oplog compacts", "compacts"),
+            factory.createIntGauge("openOplogs", "Current number of oplogs this disk store has open",
                 "oplogs"),
-            f.createIntGauge("compactableOplogs", "Current number of oplogs ready to be compacted",
+            factory.createIntGauge("compactableOplogs", "Current number of oplogs ready to be compacted",
                 "oplogs"),
-            f.createIntGauge("inactiveOplogs",
+            factory.createIntGauge("inactiveOplogs",
                 "Current number of oplogs that are no longer being written but are not ready ready to compact",
                 "oplogs"),
-            f.createLongCounter("oplogReads", "Total number of oplog reads", "reads"),
-            f.createLongCounter("oplogSeeks", "Total number of oplog seeks", "seeks"),
-            f.createIntGauge("uncreatedRecoveredRegions",
+            factory.createLongCounter("oplogReads", "Total number of oplog reads", "reads"),
+            factory.createLongCounter("oplogSeeks", "Total number of oplog seeks", "seeks"),
+            factory.createIntGauge("uncreatedRecoveredRegions",
                 "The current number of regions that have been recovered but have not yet been created.",
                 "regions"),
-            f.createIntGauge("backupsInProgress", backupsInProgressDesc, "backups"),
-            f.createIntCounter("backupsCompleted", backupsCompletedDesc, "backups"),});
+            factory.createIntGauge("backupsInProgress", backupsInProgressDesc, "backups"),
+            factory.createIntCounter("backupsCompleted", backupsCompletedDesc, "backups"),});
 
     // Initialize id fields
     writesId = type.nameToId("writes");
@@ -249,8 +247,9 @@ public class DiskStoreStats {
   /**
    * Creates a new <code>DiskStoreStatistics</code> for the given region.
    */
-  public DiskStoreStats(StatisticsFactory f, String name) {
-    this.stats = f.createAtomicStatistics(type, name);
+  public DiskStoreStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(type, name);
   }
 
   ///////////////////// Instance Methods /////////////////////
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 12cc5fd..3cf4331 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
@@ -44,382 +44,381 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class PartitionedRegionStats {
 
-  private static final StatisticsType type;
+  private StatisticsType type;
 
-  private static final int dataStoreEntryCountId;
-  private static final int dataStoreBytesInUseId;
-  private static final int bucketCountId;
+  private int dataStoreEntryCountId;
+  private int dataStoreBytesInUseId;
+  private int bucketCountId;
 
-  private static final int putsCompletedId;
-  private static final int putOpsRetriedId;
-  private static final int putRetriesId;
+  private int putsCompletedId;
+  private int putOpsRetriedId;
+  private int putRetriesId;
 
-  private static final int createsCompletedId;
-  private static final int createOpsRetriedId;
-  private static final int createRetriesId;
+  private int createsCompletedId;
+  private int createOpsRetriedId;
+  private int createRetriesId;
 
-  private static final int preferredReadLocalId;
-  private static final int preferredReadRemoteId;
+  private int preferredReadLocalId;
+  private int preferredReadRemoteId;
 
-  private static final int getsCompletedId;
-  private static final int getOpsRetriedId;
-  private static final int getRetriesId;
+  private int getsCompletedId;
+  private int getOpsRetriedId;
+  private int getRetriesId;
 
-  private static final int destroysCompletedId;
-  private static final int destroyOpsRetriedId;
-  private static final int destroyRetriesId;
+  private int destroysCompletedId;
+  private int destroyOpsRetriedId;
+  private int destroyRetriesId;
 
-  private static final int invalidatesCompletedId;
-  private static final int invalidateOpsRetriedId;
-  private static final int invalidateRetriesId;
+  private int invalidatesCompletedId;
+  private int invalidateOpsRetriedId;
+  private int invalidateRetriesId;
 
-  private static final int containsKeyCompletedId;
-  private static final int containsKeyOpsRetriedId;
-  private static final int containsKeyRetriesId;
+  private int containsKeyCompletedId;
+  private int containsKeyOpsRetriedId;
+  private int containsKeyRetriesId;
 
-  private static final int containsValueForKeyCompletedId;
+  private int containsValueForKeyCompletedId;
 
-  private static final int partitionMessagesSentId;
-  private static final int partitionMessagesReceivedId;
-  private static final int partitionMessagesProcessedId;
+  private int partitionMessagesSentId;
+  private int partitionMessagesReceivedId;
+  private int partitionMessagesProcessedId;
 
-  private static final int putTimeId;
-  private static final int createTimeId;
-  private static final int getTimeId;
-  private static final int destroyTimeId;
-  private static final int invalidateTimeId;
-  private static final int containsKeyTimeId;
-  private static final int containsValueForKeyTimeId;
-  private static final int partitionMessagesProcessingTimeId;
+  private int putTimeId;
+  private int createTimeId;
+  private int getTimeId;
+  private int destroyTimeId;
+  private int invalidateTimeId;
+  private int containsKeyTimeId;
+  private int containsValueForKeyTimeId;
+  private int partitionMessagesProcessingTimeId;
 
   private static final String PUTALLS_COMPLETED = "putAllsCompleted";
   private static final String PUTALL_MSGS_RETRIED = "putAllMsgsRetried";
   private static final String PUTALL_RETRIES = "putAllRetries";
   private static final String PUTALL_TIME = "putAllTime";
 
-  private static final int fieldId_PUTALLS_COMPLETED;
-  private static final int fieldId_PUTALL_MSGS_RETRIED;
-  private static final int fieldId_PUTALL_RETRIES;
-  private static final int fieldId_PUTALL_TIME;
+  private int fieldId_PUTALLS_COMPLETED;
+  private int fieldId_PUTALL_MSGS_RETRIED;
+  private int fieldId_PUTALL_RETRIES;
+  private int fieldId_PUTALL_TIME;
 
   private static final String REMOVE_ALLS_COMPLETED = "removeAllsCompleted";
   private static final String REMOVE_ALL_MSGS_RETRIED = "removeAllMsgsRetried";
   private static final String REMOVE_ALL_RETRIES = "removeAllRetries";
   private static final String REMOVE_ALL_TIME = "removeAllTime";
 
-  private static final int fieldId_REMOVE_ALLS_COMPLETED;
-  private static final int fieldId_REMOVE_ALL_MSGS_RETRIED;
-  private static final int fieldId_REMOVE_ALL_RETRIES;
-  private static final int fieldId_REMOVE_ALL_TIME;
-
-  private static final int volunteeringInProgressId; // count of volunteering in progress
-  private static final int volunteeringBecamePrimaryId; // ended as primary
-  private static final int volunteeringBecamePrimaryTimeId; // time spent that ended as primary
-  private static final int volunteeringOtherPrimaryId; // ended as not primary
-  private static final int volunteeringOtherPrimaryTimeId; // time spent that ended as not primary
-  private static final int volunteeringClosedId; // ended as closed
-  private static final int volunteeringClosedTimeId; // time spent that ended as closed
-
-  private static final int applyReplicationCompletedId;
-  private static final int applyReplicationInProgressId;
-  private static final int applyReplicationTimeId;
-  private static final int sendReplicationCompletedId;
-  private static final int sendReplicationInProgressId;
-  private static final int sendReplicationTimeId;
-  private static final int putRemoteCompletedId;
-  private static final int putRemoteInProgressId;
-  private static final int putRemoteTimeId;
-  private static final int putLocalCompletedId;
-  private static final int putLocalInProgressId;
-  private static final int putLocalTimeId;
-
-  private static final int totalNumBucketsId; // total number of buckets
-  private static final int primaryBucketCountId; // number of hosted primary buckets
-  private static final int volunteeringThreadsId; // number of threads actively volunteering
-  private static final int lowRedundancyBucketCountId; // number of buckets currently without full
+  private int fieldId_REMOVE_ALLS_COMPLETED;
+  private int fieldId_REMOVE_ALL_MSGS_RETRIED;
+  private int fieldId_REMOVE_ALL_RETRIES;
+  private int fieldId_REMOVE_ALL_TIME;
+
+  private int volunteeringInProgressId; // count of volunteering in progress
+  private int volunteeringBecamePrimaryId; // ended as primary
+  private int volunteeringBecamePrimaryTimeId; // time spent that ended as primary
+  private int volunteeringOtherPrimaryId; // ended as not primary
+  private int volunteeringOtherPrimaryTimeId; // time spent that ended as not primary
+  private int volunteeringClosedId; // ended as closed
+  private int volunteeringClosedTimeId; // time spent that ended as closed
+
+  private int applyReplicationCompletedId;
+  private int applyReplicationInProgressId;
+  private int applyReplicationTimeId;
+  private int sendReplicationCompletedId;
+  private int sendReplicationInProgressId;
+  private int sendReplicationTimeId;
+  private int putRemoteCompletedId;
+  private int putRemoteInProgressId;
+  private int putRemoteTimeId;
+  private int putLocalCompletedId;
+  private int putLocalInProgressId;
+  private int putLocalTimeId;
+
+  private int totalNumBucketsId; // total number of buckets
+  private int primaryBucketCountId; // number of hosted primary buckets
+  private int volunteeringThreadsId; // number of threads actively volunteering
+  private int lowRedundancyBucketCountId; // number of buckets currently without full
                                                        // redundancy
-  private static final int noCopiesBucketCountId; // number of buckets currently without any
+  private int noCopiesBucketCountId; // number of buckets currently without any
                                                   // redundancy
 
-  private static final int configuredRedundantCopiesId;
-  private static final int actualRedundantCopiesId;
+  private int configuredRedundantCopiesId;
+  private int actualRedundantCopiesId;
 
-  private static final int getEntriesCompletedId;
-  private static final int getEntryTimeId;
+  private int getEntriesCompletedId;
+  private int getEntryTimeId;
 
-  private static final int recoveriesInProgressId;
-  private static final int recoveriesCompletedId;
-  private static final int recoveriesTimeId;
-  private static final int bucketCreatesInProgressId;
-  private static final int bucketCreatesCompletedId;
-  private static final int bucketCreatesFailedId;
-  private static final int bucketCreateTimeId;
+  private int recoveriesInProgressId;
+  private int recoveriesCompletedId;
+  private int recoveriesTimeId;
+  private int bucketCreatesInProgressId;
+  private int bucketCreatesCompletedId;
+  private int bucketCreatesFailedId;
+  private int bucketCreateTimeId;
 
-  private static final int rebalanceBucketCreatesInProgressId;
-  private static final int rebalanceBucketCreatesCompletedId;
-  private static final int rebalanceBucketCreatesFailedId;
-  private static final int rebalanceBucketCreateTimeId;
+  private int rebalanceBucketCreatesInProgressId;
+  private int rebalanceBucketCreatesCompletedId;
+  private int rebalanceBucketCreatesFailedId;
+  private int rebalanceBucketCreateTimeId;
 
-  private static final int primaryTransfersInProgressId;
-  private static final int primaryTransfersCompletedId;
-  private static final int primaryTransfersFailedId;
-  private static final int primaryTransferTimeId;
+  private int primaryTransfersInProgressId;
+  private int primaryTransfersCompletedId;
+  private int primaryTransfersFailedId;
+  private int primaryTransferTimeId;
 
-  private static final int rebalancePrimaryTransfersInProgressId;
-  private static final int rebalancePrimaryTransfersCompletedId;
-  private static final int rebalancePrimaryTransfersFailedId;
-  private static final int rebalancePrimaryTransferTimeId;
+  private int rebalancePrimaryTransfersInProgressId;
+  private int rebalancePrimaryTransfersCompletedId;
+  private int rebalancePrimaryTransfersFailedId;
+  private int rebalancePrimaryTransferTimeId;
 
-  private static final int prMetaDataSentCountId;
+  private int prMetaDataSentCountId;
 
-  private static final int localMaxMemoryId;
+  private int localMaxMemoryId;
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     final boolean largerIsBetter = true;
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    type = f.createType("PartitionedRegionStats",
+    type = factory.createType("PartitionedRegionStats",
         "Statistics for operations and connections in the Partitioned Region",
         new StatisticDescriptor[] {
 
-            f.createIntGauge("bucketCount", "Number of buckets in this node.", "buckets"),
-            f.createIntCounter("putsCompleted", "Number of puts completed.", "operations",
+            factory.createIntGauge("bucketCount", "Number of buckets in this node.", "buckets"),
+            factory.createIntCounter("putsCompleted", "Number of puts completed.", "operations",
                 largerIsBetter),
-            f.createIntCounter("putOpsRetried",
+            factory.createIntCounter("putOpsRetried",
                 "Number of put operations which had to be retried due to failures.", "operations",
                 false),
-            f.createIntCounter("putRetries",
+            factory.createIntCounter("putRetries",
                 "Total number of times put operations had to be retried.", "retry attempts", false),
-            f.createIntCounter("createsCompleted", "Number of creates completed.", "operations",
+            factory.createIntCounter("createsCompleted", "Number of creates completed.", "operations",
                 largerIsBetter),
-            f.createIntCounter("createOpsRetried",
+            factory.createIntCounter("createOpsRetried",
                 "Number of create operations which had to be retried due to failures.",
                 "operations", false),
-            f.createIntCounter("createRetries",
+            factory.createIntCounter("createRetries",
                 "Total number of times put operations had to be retried.", "retry attempts", false),
-            f.createIntCounter("preferredReadLocal", "Number of reads satisfied from local store",
+            factory.createIntCounter("preferredReadLocal", "Number of reads satisfied from local store",
                 "operations", largerIsBetter),
-            f.createIntCounter(PUTALLS_COMPLETED, "Number of putAlls completed.", "operations",
+            factory.createIntCounter(PUTALLS_COMPLETED, "Number of putAlls completed.", "operations",
                 largerIsBetter),
-            f.createIntCounter(PUTALL_MSGS_RETRIED,
+            factory.createIntCounter(PUTALL_MSGS_RETRIED,
                 "Number of putAll messages which had to be retried due to failures.", "operations",
                 false),
-            f.createIntCounter(PUTALL_RETRIES,
+            factory.createIntCounter(PUTALL_RETRIES,
                 "Total number of times putAll messages had to be retried.", "retry attempts",
                 false),
-            f.createLongCounter(PUTALL_TIME, "Total time spent doing putAlls.", "nanoseconds",
+            factory.createLongCounter(PUTALL_TIME, "Total time spent doing putAlls.", "nanoseconds",
                 !largerIsBetter),
-            f.createIntCounter(REMOVE_ALLS_COMPLETED, "Number of removeAlls completed.",
+            factory.createIntCounter(REMOVE_ALLS_COMPLETED, "Number of removeAlls completed.",
                 "operations", largerIsBetter),
-            f.createIntCounter(REMOVE_ALL_MSGS_RETRIED,
+            factory.createIntCounter(REMOVE_ALL_MSGS_RETRIED,
                 "Number of removeAll messages which had to be retried due to failures.",
                 "operations", false),
-            f.createIntCounter(REMOVE_ALL_RETRIES,
+            factory.createIntCounter(REMOVE_ALL_RETRIES,
                 "Total number of times removeAll messages had to be retried.", "retry attempts",
                 false),
-            f.createLongCounter(REMOVE_ALL_TIME, "Total time spent doing removeAlls.",
+            factory.createLongCounter(REMOVE_ALL_TIME, "Total time spent doing removeAlls.",
                 "nanoseconds", !largerIsBetter),
-            f.createIntCounter("preferredReadRemote", "Number of reads satisfied from remote store",
+            factory.createIntCounter("preferredReadRemote", "Number of reads satisfied from remote store",
                 "operations", false),
-            f.createIntCounter("getsCompleted", "Number of gets completed.", "operations",
+            factory.createIntCounter("getsCompleted", "Number of gets completed.", "operations",
                 largerIsBetter),
-            f.createIntCounter("getOpsRetried",
+            factory.createIntCounter("getOpsRetried",
                 "Number of get operations which had to be retried due to failures.", "operations",
                 false),
-            f.createIntCounter("getRetries",
+            factory.createIntCounter("getRetries",
                 "Total number of times get operations had to be retried.", "retry attempts", false),
-            f.createIntCounter("destroysCompleted", "Number of destroys completed.", "operations",
+            factory.createIntCounter("destroysCompleted", "Number of destroys completed.", "operations",
                 largerIsBetter),
-            f.createIntCounter("destroyOpsRetried",
+            factory.createIntCounter("destroyOpsRetried",
                 "Number of destroy operations which had to be retried due to failures.",
                 "operations", false),
-            f.createIntCounter("destroyRetries",
+            factory.createIntCounter("destroyRetries",
                 "Total number of times destroy operations had to be retried.", "retry attempts",
                 false),
-            f.createIntCounter("invalidatesCompleted", "Number of invalidates completed.",
+            factory.createIntCounter("invalidatesCompleted", "Number of invalidates completed.",
                 "operations", largerIsBetter),
 
-            f.createIntCounter("invalidateOpsRetried",
+            factory.createIntCounter("invalidateOpsRetried",
                 "Number of invalidate operations which had to be retried due to failures.",
                 "operations", false),
-            f.createIntCounter("invalidateRetries",
+            factory.createIntCounter("invalidateRetries",
                 "Total number of times invalidate operations had to be retried.", "retry attempts",
                 false),
-            f.createIntCounter("containsKeyCompleted", "Number of containsKeys completed.",
+            factory.createIntCounter("containsKeyCompleted", "Number of containsKeys completed.",
                 "operations", largerIsBetter),
 
-            f.createIntCounter("containsKeyOpsRetried",
+            factory.createIntCounter("containsKeyOpsRetried",
                 "Number of containsKey or containsValueForKey operations which had to be retried due to failures.",
                 "operations", false),
-            f.createIntCounter("containsKeyRetries",
+            factory.createIntCounter("containsKeyRetries",
                 "Total number of times containsKey or containsValueForKey operations had to be retried.",
                 "operations", false),
-            f.createIntCounter("containsValueForKeyCompleted",
+            factory.createIntCounter("containsValueForKeyCompleted",
                 "Number of containsValueForKeys completed.", "operations", largerIsBetter),
-            f.createIntCounter("PartitionMessagesSent", "Number of PartitionMessages Sent.",
+            factory.createIntCounter("PartitionMessagesSent", "Number of PartitionMessages Sent.",
                 "operations", largerIsBetter),
-            f.createIntCounter("PartitionMessagesReceived", "Number of PartitionMessages Received.",
+            factory.createIntCounter("PartitionMessagesReceived", "Number of PartitionMessages Received.",
                 "operations", largerIsBetter),
-            f.createIntCounter("PartitionMessagesProcessed",
+            factory.createIntCounter("PartitionMessagesProcessed",
                 "Number of PartitionMessages Processed.", "operations", largerIsBetter),
-            f.createLongCounter("putTime", "Total time spent doing puts.", "nanoseconds", false),
-            f.createLongCounter("createTime", "Total time spent doing create operations.",
+            factory.createLongCounter("putTime", "Total time spent doing puts.", "nanoseconds", false),
+            factory.createLongCounter("createTime", "Total time spent doing create operations.",
                 "nanoseconds", false),
-            f.createLongCounter("getTime", "Total time spent performing get operations.",
+            factory.createLongCounter("getTime", "Total time spent performing get operations.",
                 "nanoseconds", false),
-            f.createLongCounter("destroyTime", "Total time spent doing destroys.", "nanoseconds",
+            factory.createLongCounter("destroyTime", "Total time spent doing destroys.", "nanoseconds",
                 false),
-            f.createLongCounter("invalidateTime", "Total time spent doing invalidates.",
+            factory.createLongCounter("invalidateTime", "Total time spent doing invalidates.",
                 "nanoseconds", false),
-            f.createLongCounter("containsKeyTime",
+            factory.createLongCounter("containsKeyTime",
                 "Total time spent performing containsKey operations.", "nanoseconds", false),
-            f.createLongCounter("containsValueForKeyTime",
+            factory.createLongCounter("containsValueForKeyTime",
                 "Total time spent performing containsValueForKey operations.", "nanoseconds",
                 false),
-            f.createLongCounter("partitionMessagesProcessingTime",
+            factory.createLongCounter("partitionMessagesProcessingTime",
                 "Total time spent on PartitionMessages processing.", "nanoseconds", false),
-            f.createIntGauge("dataStoreEntryCount",
+            factory.createIntGauge("dataStoreEntryCount",
                 "The number of entries stored in this Cache for the named Partitioned Region. This does not include entries which are tombstones. See CachePerfStats.tombstoneCount.",
                 "entries"),
-            f.createLongGauge("dataStoreBytesInUse",
+            factory.createLongGauge("dataStoreBytesInUse",
                 "The current number of bytes stored in this Cache for the named Partitioned Region",
                 "bytes"),
-            f.createIntGauge("volunteeringInProgress",
+            factory.createIntGauge("volunteeringInProgress",
                 "Current number of attempts to volunteer for primary of a bucket.", "operations"),
-            f.createIntCounter("volunteeringBecamePrimary",
+            factory.createIntCounter("volunteeringBecamePrimary",
                 "Total number of attempts to volunteer that ended when this member became primary.",
                 "operations"),
-            f.createLongCounter("volunteeringBecamePrimaryTime",
+            factory.createLongCounter("volunteeringBecamePrimaryTime",
                 "Total time spent volunteering that ended when this member became primary.",
                 "nanoseconds", false),
-            f.createIntCounter("volunteeringOtherPrimary",
+            factory.createIntCounter("volunteeringOtherPrimary",
                 "Total number of attempts to volunteer that ended when this member discovered other primary.",
                 "operations"),
-            f.createLongCounter("volunteeringOtherPrimaryTime",
+            factory.createLongCounter("volunteeringOtherPrimaryTime",
                 "Total time spent volunteering that ended when this member discovered other primary.",
                 "nanoseconds", false),
-            f.createIntCounter("volunteeringClosed",
+            factory.createIntCounter("volunteeringClosed",
                 "Total number of attempts to volunteer that ended when this member's bucket closed.",
                 "operations"),
-            f.createLongCounter("volunteeringClosedTime",
+            factory.createLongCounter("volunteeringClosedTime",
                 "Total time spent volunteering that ended when this member's bucket closed.",
                 "nanoseconds", false),
-            f.createIntGauge("totalNumBuckets", "The total number of buckets.", "buckets"),
-            f.createIntGauge("primaryBucketCount",
+            factory.createIntGauge("totalNumBuckets", "The total number of buckets.", "buckets"),
+            factory.createIntGauge("primaryBucketCount",
                 "Current number of primary buckets hosted locally.", "buckets"),
-            f.createIntGauge("volunteeringThreads",
+            factory.createIntGauge("volunteeringThreads",
                 "Current number of threads volunteering for primary.", "threads"),
-            f.createIntGauge("lowRedundancyBucketCount",
+            factory.createIntGauge("lowRedundancyBucketCount",
                 "Current number of buckets without full redundancy.", "buckets"),
-            f.createIntGauge("noCopiesBucketCount",
+            factory.createIntGauge("noCopiesBucketCount",
                 "Current number of buckets without any copies remaining.", "buckets"),
-            f.createIntGauge("configuredRedundantCopies",
+            factory.createIntGauge("configuredRedundantCopies",
                 "Configured number of redundant copies for this partitioned region.", "copies"),
-            f.createIntGauge("actualRedundantCopies",
+            factory.createIntGauge("actualRedundantCopies",
                 "Actual number of redundant copies for this partitioned region.", "copies"),
-            f.createIntCounter("getEntryCompleted", "Number of getEntry operations completed.",
+            factory.createIntCounter("getEntryCompleted", "Number of getEntry operations completed.",
                 "operations", largerIsBetter),
-            f.createLongCounter("getEntryTime", "Total time spent performing getEntry operations.",
+            factory.createLongCounter("getEntryTime", "Total time spent performing getEntry operations.",
                 "nanoseconds", false),
 
-            f.createIntGauge("recoveriesInProgress",
+            factory.createIntGauge("recoveriesInProgress",
                 "Current number of redundancy recovery operations in progress for this region.",
                 "operations"),
-            f.createIntCounter("recoveriesCompleted",
+            factory.createIntCounter("recoveriesCompleted",
                 "Total number of redundancy recovery operations performed on this region.",
                 "operations"),
-            f.createLongCounter("recoveryTime", "Total number time spent recovering redundancy.",
+            factory.createLongCounter("recoveryTime", "Total number time spent recovering redundancy.",
                 "operations"),
-            f.createIntGauge("bucketCreatesInProgress",
+            factory.createIntGauge("bucketCreatesInProgress",
                 "Current number of bucket create operations being performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("bucketCreatesCompleted",
+            factory.createIntCounter("bucketCreatesCompleted",
                 "Total number of bucket create operations performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("bucketCreatesFailed",
+            factory.createIntCounter("bucketCreatesFailed",
                 "Total number of bucket create operations performed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("bucketCreateTime",
+            factory.createLongCounter("bucketCreateTime",
                 "Total time spent performing bucket create operations for rebalancing.",
                 "nanoseconds", false),
-            f.createIntGauge("primaryTransfersInProgress",
+            factory.createIntGauge("primaryTransfersInProgress",
                 "Current number of primary transfer operations being performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("primaryTransfersCompleted",
+            factory.createIntCounter("primaryTransfersCompleted",
                 "Total number of primary transfer operations performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("primaryTransfersFailed",
+            factory.createIntCounter("primaryTransfersFailed",
                 "Total number of primary transfer operations performed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("primaryTransferTime",
+            factory.createLongCounter("primaryTransferTime",
                 "Total time spent performing primary transfer operations for rebalancing.",
                 "nanoseconds", false),
 
-            f.createIntCounter("applyReplicationCompleted",
+            factory.createIntCounter("applyReplicationCompleted",
                 "Total number of replicated values sent from a primary to this redundant data store.",
                 "operations", largerIsBetter),
-            f.createIntGauge("applyReplicationInProgress",
+            factory.createIntGauge("applyReplicationInProgress",
                 "Current number of replication operations in progress on this redundant data store.",
                 "operations", !largerIsBetter),
-            f.createLongCounter("applyReplicationTime",
+            factory.createLongCounter("applyReplicationTime",
                 "Total time spent storing replicated values on this redundant data store.",
                 "nanoseconds", !largerIsBetter),
-            f.createIntCounter("sendReplicationCompleted",
+            factory.createIntCounter("sendReplicationCompleted",
                 "Total number of replicated values sent from this primary to a redundant data store.",
                 "operations", largerIsBetter),
-            f.createIntGauge("sendReplicationInProgress",
+            factory.createIntGauge("sendReplicationInProgress",
                 "Current number of replication operations in progress from this primary.",
                 "operations", !largerIsBetter),
-            f.createLongCounter("sendReplicationTime",
+            factory.createLongCounter("sendReplicationTime",
                 "Total time spent replicating values from this primary to a redundant data store.",
                 "nanoseconds", !largerIsBetter),
-            f.createIntCounter("putRemoteCompleted",
+            factory.createIntCounter("putRemoteCompleted",
                 "Total number of completed puts that did not originate in the primary. These puts require an extra network hop to the primary.",
                 "operations", largerIsBetter),
-            f.createIntGauge("putRemoteInProgress",
+            factory.createIntGauge("putRemoteInProgress",
                 "Current number of puts in progress that did not originate in the primary.",
                 "operations", !largerIsBetter),
-            f.createLongCounter("putRemoteTime",
+            factory.createLongCounter("putRemoteTime",
                 "Total time spent doing puts that did not originate in the primary.", "nanoseconds",
                 !largerIsBetter),
-            f.createIntCounter("putLocalCompleted",
+            factory.createIntCounter("putLocalCompleted",
                 "Total number of completed puts that did originate in the primary. These puts are optimal.",
                 "operations", largerIsBetter),
-            f.createIntGauge("putLocalInProgress",
+            factory.createIntGauge("putLocalInProgress",
                 "Current number of puts in progress that did originate in the primary.",
                 "operations", !largerIsBetter),
-            f.createLongCounter("putLocalTime",
+            factory.createLongCounter("putLocalTime",
                 "Total time spent doing puts that did originate in the primary.", "nanoseconds",
                 !largerIsBetter),
 
-            f.createIntGauge("rebalanceBucketCreatesInProgress",
+            factory.createIntGauge("rebalanceBucketCreatesInProgress",
                 "Current number of bucket create operations being performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalanceBucketCreatesCompleted",
+            factory.createIntCounter("rebalanceBucketCreatesCompleted",
                 "Total number of bucket create operations performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalanceBucketCreatesFailed",
+            factory.createIntCounter("rebalanceBucketCreatesFailed",
                 "Total number of bucket create operations performed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("rebalanceBucketCreateTime",
+            factory.createLongCounter("rebalanceBucketCreateTime",
                 "Total time spent performing bucket create operations for rebalancing.",
                 "nanoseconds", false),
-            f.createIntGauge("rebalancePrimaryTransfersInProgress",
+            factory.createIntGauge("rebalancePrimaryTransfersInProgress",
                 "Current number of primary transfer operations being performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalancePrimaryTransfersCompleted",
+            factory.createIntCounter("rebalancePrimaryTransfersCompleted",
                 "Total number of primary transfer operations performed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalancePrimaryTransfersFailed",
+            factory.createIntCounter("rebalancePrimaryTransfersFailed",
                 "Total number of primary transfer operations performed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("rebalancePrimaryTransferTime",
+            factory.createLongCounter("rebalancePrimaryTransferTime",
                 "Total time spent performing primary transfer operations for rebalancing.",
                 "nanoseconds", false),
-            f.createLongCounter("prMetaDataSentCount",
+            factory.createLongCounter("prMetaDataSentCount",
                 "total number of times meta data refreshed sent on client's request.", "operation",
                 false),
 
-            f.createLongGauge("localMaxMemory",
+            factory.createLongGauge("localMaxMemory",
                 "local max memory in bytes for this region on this member", "bytes")
 
         });
@@ -550,6 +549,7 @@ public class PartitionedRegionStats {
   }
 
   public PartitionedRegionStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(type, name /* fixes bug 42343 */);
 
     if (CachePerfStats.enableClockStats) {
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 a05c23e..0594080 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
@@ -32,7 +32,7 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class PoolStats {
 
-  private static final StatisticsType _type;
+  private StatisticsType _type;
 
   //////////////////// Statistic "Id" Fields ////////////////////
 
@@ -43,106 +43,104 @@ public class PoolStats {
   private static final String ENDPOINTS_KNOWN = "servers"; // gauge
   private static final String SUBSCRIPTION_SERVERS = "subscriptionServers"; // gauge
 
-  private static final int _INITIAL_CONTACTS;
-  private static final int _KNOWN_LOCATORS;
-  private static final int _REQUESTS_TO_LOCATOR;
-  private static final int _RESPONSES_FROM_LOCATOR;
-  private static final int _ENDPOINTS_KNOWN;
-  private static final int _SUBSCRIPTION_SERVERS;
-  private static final int _PREFILL_CONNECT;
-  private static final int _LOAD_CONDITIONING_CHECK;
-  private static final int _LOAD_CONDITIONING_EXTENSIONS;
-  private static final int _IDLE_CHECK;
-  private static final int _LOAD_CONDITIONING_CONNECT;
-  private static final int _LOAD_CONDITIONING_DISCONNECT;
-  private static final int _LOAD_CONDITIONING_REPLACE_TIMEOUT;
-  private static final int _IDLE_EXPIRE;
-  private static final int _CONNECTION_WAIT_IN_PROGRESS;
-  private static final int _CONNECTION_WAITS;
-  private static final int _CONNECTION_WAIT_TIME;
-  private static final int connectionsId;
-  // private static final int conCountId;
-  private static final int poolConnectionsId;
-  private static final int connectsId;
-  private static final int disconnectsId;
-  private static final int clientOpInProgressId;
-  private static final int clientOpSendInProgressId;
-  private static final int clientOpSendId;
-  private static final int clientOpSendFailedId;
-  private static final int clientOpSendDurationId;
-  private static final int clientOpId;
-  private static final int clientOpTimedOutId;
-  private static final int clientOpFailedId;
-  private static final int clientOpDurationId;
-
-  static {
+  private int _INITIAL_CONTACTS;
+  private int _KNOWN_LOCATORS;
+  private int _REQUESTS_TO_LOCATOR;
+  private int _RESPONSES_FROM_LOCATOR;
+  private int _ENDPOINTS_KNOWN;
+  private int _SUBSCRIPTION_SERVERS;
+  private int _PREFILL_CONNECT;
+  private int _LOAD_CONDITIONING_CHECK;
+  private int _LOAD_CONDITIONING_EXTENSIONS;
+  private int _IDLE_CHECK;
+  private int _LOAD_CONDITIONING_CONNECT;
+  private int _LOAD_CONDITIONING_DISCONNECT;
+  private int _LOAD_CONDITIONING_REPLACE_TIMEOUT;
+  private int _IDLE_EXPIRE;
+  private int _CONNECTION_WAIT_IN_PROGRESS;
+  private int _CONNECTION_WAITS;
+  private int _CONNECTION_WAIT_TIME;
+  private int connectionsId;
+  // private int conCountId;
+  private int poolConnectionsId;
+  private int connectsId;
+  private int disconnectsId;
+  private int clientOpInProgressId;
+  private int clientOpSendInProgressId;
+  private int clientOpSendId;
+  private int clientOpSendFailedId;
+  private int clientOpSendDurationId;
+  private int clientOpId;
+  private int clientOpTimedOutId;
+  private int clientOpFailedId;
+  private int clientOpDurationId;
+
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "PoolStats";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    _type = f.createType(statName, statName,
+    _type = factory.createType(statName, statName,
         new StatisticDescriptor[] {
-            f.createIntGauge(INITIAL_CONTACTS, "Number of contacts initially by user", "contacts"),
-            f.createIntGauge(KNOWN_LOCATORS, "Current number of locators discovered", LOCATORS),
-            f.createIntGauge(ENDPOINTS_KNOWN, "Current number of servers discovered", "servers"),
-            f.createIntGauge(SUBSCRIPTION_SERVERS,
+            factory.createIntGauge(INITIAL_CONTACTS, "Number of contacts initially by user", "contacts"),
+            factory.createIntGauge(KNOWN_LOCATORS, "Current number of locators discovered", LOCATORS),
+            factory.createIntGauge(ENDPOINTS_KNOWN, "Current number of servers discovered", "servers"),
+            factory.createIntGauge(SUBSCRIPTION_SERVERS,
                 "Number of servers hosting this clients subscriptions", "servers"),
-            f.createLongCounter(REQUESTS_TO_LOCATOR,
+            factory.createLongCounter(REQUESTS_TO_LOCATOR,
                 "Number of requests from this connection pool to a locator", "requests"),
-            f.createLongCounter(RESPONSES_FROM_LOCATOR,
+            factory.createLongCounter(RESPONSES_FROM_LOCATOR,
                 "Number of responses from the locator to this connection pool", "responses"),
 
-            f.createIntGauge("connections", "Current number of connections", "connections"),
-            // f.createIntGauge("conCount", "Current number of connections", "connections"),
-            f.createIntGauge("poolConnections", "Current number of pool connections",
+            factory.createIntGauge("connections", "Current number of connections", "connections"),
+            // factory.createIntGauge("conCount", "Current number of connections", "connections"),
+            factory.createIntGauge("poolConnections", "Current number of pool connections",
                 "connections"),
-            f.createIntCounter("connects", "Total number of times a connection has been created.",
+            factory.createIntCounter("connects", "Total number of times a connection has been created.",
                 "connects"),
-            f.createIntCounter("disconnects",
+            factory.createIntCounter("disconnects",
                 "Total number of times a connection has been destroyed.", "disconnects"),
-            f.createIntCounter("minPoolSizeConnects",
+            factory.createIntCounter("minPoolSizeConnects",
                 "Total number of connects done to maintain minimum pool size.", "connects"),
-            f.createIntCounter("loadConditioningConnects",
+            factory.createIntCounter("loadConditioningConnects",
                 "Total number of connects done due to load conditioning.", "connects"),
-            f.createIntCounter("loadConditioningReplaceTimeouts",
+            factory.createIntCounter("loadConditioningReplaceTimeouts",
                 "Total number of times a load conditioning connect was done but was not used.",
                 "timeouts"),
-            f.createIntCounter("idleDisconnects",
+            factory.createIntCounter("idleDisconnects",
                 "Total number of disconnects done due to idle expiration.", "disconnects"),
-            f.createIntCounter("loadConditioningDisconnects",
+            factory.createIntCounter("loadConditioningDisconnects",
                 "Total number of disconnects done due to load conditioning expiration.",
                 "disconnects"),
-            f.createIntCounter("idleChecks", "Total number of checks done for idle expiration.",
+            factory.createIntCounter("idleChecks", "Total number of checks done for idle expiration.",
                 "checks"),
-            f.createIntCounter("loadConditioningChecks",
+            factory.createIntCounter("loadConditioningChecks",
                 "Total number of checks done for load conditioning expiration.", "checks"),
-            f.createIntCounter("loadConditioningExtensions",
+            factory.createIntCounter("loadConditioningExtensions",
                 "Total number of times a connection's load conditioning has been extended because the servers are still balanced.",
                 "extensions"),
-            f.createIntGauge("connectionWaitsInProgress",
+            factory.createIntGauge("connectionWaitsInProgress",
                 "Current number of threads waiting for a connection", "threads"),
-            f.createIntCounter("connectionWaits",
+            factory.createIntCounter("connectionWaits",
                 "Total number of times a thread completed waiting for a connection (by timing out or by getting a connection).",
                 "waits"),
-            f.createLongCounter("connectionWaitTime",
+            factory.createLongCounter("connectionWaitTime",
                 "Total number of nanoseconds spent waiting for a connection.", "nanoseconds"),
-            f.createIntGauge("clientOpsInProgress", "Current number of clientOps being executed",
+            factory.createIntGauge("clientOpsInProgress", "Current number of clientOps being executed",
                 "clientOps"),
-            f.createIntGauge("clientOpSendsInProgress",
+            factory.createIntGauge("clientOpSendsInProgress",
                 "Current number of clientOp sends being executed", "sends"),
-            f.createIntCounter("clientOpSends",
+            factory.createIntCounter("clientOpSends",
                 "Total number of clientOp sends that have completed successfully", "sends"),
-            f.createIntCounter("clientOpSendFailures",
+            factory.createIntCounter("clientOpSendFailures",
                 "Total number of clientOp sends that have failed", "sends"),
-            f.createIntCounter("clientOps", "Total number of clientOps completed successfully",
+            factory.createIntCounter("clientOps", "Total number of clientOps completed successfully",
                 "clientOps"),
-            f.createIntCounter("clientOpFailures",
+            factory.createIntCounter("clientOpFailures",
                 "Total number of clientOp attempts that have failed", "clientOps"),
-            f.createIntCounter("clientOpTimeouts",
+            factory.createIntCounter("clientOpTimeouts",
                 "Total number of clientOp attempts that have timed out", "clientOps"),
-            f.createLongCounter("clientOpSendTime",
+            factory.createLongCounter("clientOpSendTime",
                 "Total amount of time, in nanoseconds spent doing clientOp sends", "nanoseconds"),
-            f.createLongCounter("clientOpTime",
+            factory.createLongCounter("clientOpTime",
                 "Total amount of time, in nanoseconds spent doing clientOps", "nanoseconds"),});
 
     // Initialize id fields
@@ -188,8 +186,9 @@ public class PoolStats {
 
   /////////////////////// Constructors ///////////////////////
 
-  public PoolStats(StatisticsFactory f, String name) {
-    this._stats = f.createAtomicStatistics(_type, name);
+  public PoolStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
+    this._stats = factory.createAtomicStatistics(_type, name);
   }
 
   ///////////////////// Instance Methods /////////////////////
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 d90b948..712e5e0 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
@@ -280,7 +280,7 @@ public class HeapMemoryMonitor implements NotificationListener, MemoryMonitor {
       }
 
       // Stop the stats listener
-      final GemFireStatSampler sampler = this.cache.getInternalDistributedSystem().getStatSampler();
+      final GemFireStatSampler sampler = this.cache.getInternalDistributedSystem().getInternalDistributedSystemStats().getStatSampler();
       if (sampler != null) {
         sampler.removeLocalStatListener(this.statListener);
       }
@@ -295,7 +295,7 @@ public class HeapMemoryMonitor implements NotificationListener, MemoryMonitor {
    * @return True of the listener was correctly started, false otherwise.
    */
   private boolean startCacheStatListener() {
-    final GemFireStatSampler sampler = this.cache.getInternalDistributedSystem().getStatSampler();
+    final GemFireStatSampler sampler = this.cache.getInternalDistributedSystem().getInternalDistributedSystemStats().getStatSampler();
     if (sampler == null) {
       return false;
     }
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 0ab07d9..f7bdd4b 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
@@ -25,163 +25,158 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
  * Contains methods for manipulating resource manager statistics.
- *
  */
 public class ResourceManagerStats {
   // static fields
-  private static final StatisticsType type;
-
-  private static final int rebalancesInProgressId;
-  private static final int rebalancesCompletedId;
-  private static final int autoRebalanceAttemptsId;
-  private static final int rebalanceTimeId;
-  private static final int rebalanceBucketCreatesInProgressId;
-  private static final int rebalanceBucketCreatesCompletedId;
-  private static final int rebalanceBucketCreatesFailedId;
-  private static final int rebalanceBucketCreateTimeId;
-  private static final int rebalanceBucketCreateBytesId;
-  private static final int rebalanceBucketRemovesInProgressId;
-  private static final int rebalanceBucketRemovesCompletedId;
-  private static final int rebalanceBucketRemovesFailedId;
-  private static final int rebalanceBucketRemovesTimeId;
-  private static final int rebalanceBucketRemovesBytesId;
-  private static final int rebalanceBucketTransfersInProgressId;
-  private static final int rebalanceBucketTransfersCompletedId;
-  private static final int rebalanceBucketTransfersFailedId;
-  private static final int rebalanceBucketTransfersTimeId;
-  private static final int rebalanceBucketTransfersBytesId;
-  private static final int rebalancePrimaryTransfersInProgressId;
-  private static final int rebalancePrimaryTransfersCompletedId;
-  private static final int rebalancePrimaryTransfersFailedId;
-  private static final int rebalancePrimaryTransferTimeId;
-  private static final int rebalanceMembershipChanges;
-  private static final int heapCriticalEventsId;
-  private static final int offHeapCriticalEventsId;
-  private static final int heapSafeEventsId;
-  private static final int offHeapSafeEventsId;
-  private static final int evictionStartEventsId;
-  private static final int offHeapEvictionStartEventsId;
-  private static final int evictionStopEventsId;
-  private static final int offHeapEvictionStopEventsId;
-  private static final int criticalThresholdId;
-  private static final int offHeapCriticalThresholdId;
-  private static final int evictionThresholdId;
-  private static final int offHeapEvictionThresholdId;
-  private static final int tenuredHeapUsageId;
-  private static final int resourceEventsDeliveredId;
-  private static final int resourceEventQueueSizeId;
-  private static final int thresholdEventProcessorThreadJobsId;
-
-
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    type = f.createType("ResourceManagerStats", "Statistics about resource management",
-        new StatisticDescriptor[] {
-            f.createIntGauge("rebalancesInProgress",
+  private StatisticsType type;
+
+  private int rebalancesInProgressId;
+  private int rebalancesCompletedId;
+  private int autoRebalanceAttemptsId;
+  private int rebalanceTimeId;
+  private int rebalanceBucketCreatesInProgressId;
+  private int rebalanceBucketCreatesCompletedId;
+  private int rebalanceBucketCreatesFailedId;
+  private int rebalanceBucketCreateTimeId;
+  private int rebalanceBucketCreateBytesId;
+  private int rebalanceBucketRemovesInProgressId;
+  private int rebalanceBucketRemovesCompletedId;
+  private int rebalanceBucketRemovesFailedId;
+  private int rebalanceBucketRemovesTimeId;
+  private int rebalanceBucketRemovesBytesId;
+  private int rebalanceBucketTransfersInProgressId;
+  private int rebalanceBucketTransfersCompletedId;
+  private int rebalanceBucketTransfersFailedId;
+  private int rebalanceBucketTransfersTimeId;
+  private int rebalanceBucketTransfersBytesId;
+  private int rebalancePrimaryTransfersInProgressId;
+  private int rebalancePrimaryTransfersCompletedId;
+  private int rebalancePrimaryTransfersFailedId;
+  private int rebalancePrimaryTransferTimeId;
+  private int rebalanceMembershipChanges;
+  private int heapCriticalEventsId;
+  private int offHeapCriticalEventsId;
+  private int heapSafeEventsId;
+  private int offHeapSafeEventsId;
+  private int evictionStartEventsId;
+  private int offHeapEvictionStartEventsId;
+  private int evictionStopEventsId;
+  private int offHeapEvictionStopEventsId;
+  private int criticalThresholdId;
+  private int offHeapCriticalThresholdId;
+  private int evictionThresholdId;
+  private int offHeapEvictionThresholdId;
+  private int tenuredHeapUsageId;
+  private int resourceEventsDeliveredId;
+  private int resourceEventQueueSizeId;
+  private int thresholdEventProcessorThreadJobsId;
+
+  private void initializeStats(StatisticsFactory factory) {
+    type = factory.createType("ResourceManagerStats", "Statistics about resource management",
+        new StatisticDescriptor[]{
+            factory.createIntGauge("rebalancesInProgress",
                 "Current number of cache rebalance operations being directed by this process.",
                 "operations"),
-            f.createIntCounter("rebalancesCompleted",
+            factory.createIntCounter("rebalancesCompleted",
                 "Total number of cache rebalance operations directed by this process.",
                 "operations"),
-            f.createIntCounter("autoRebalanceAttempts",
+            factory.createIntCounter("autoRebalanceAttempts",
                 "Total number of cache auto-rebalance attempts.", "operations"),
-            f.createLongCounter("rebalanceTime",
+            factory.createLongCounter("rebalanceTime",
                 "Total time spent directing cache rebalance operations.", "nanoseconds", false),
 
-            f.createIntGauge("rebalanceBucketCreatesInProgress",
+            factory.createIntGauge("rebalanceBucketCreatesInProgress",
                 "Current number of bucket create operations being directed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalanceBucketCreatesCompleted",
+            factory.createIntCounter("rebalanceBucketCreatesCompleted",
                 "Total number of bucket create operations directed for rebalancing.", "operations"),
-            f.createIntCounter("rebalanceBucketCreatesFailed",
+            factory.createIntCounter("rebalanceBucketCreatesFailed",
                 "Total number of bucket create operations directed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("rebalanceBucketCreateTime",
+            factory.createLongCounter("rebalanceBucketCreateTime",
                 "Total time spent directing bucket create operations for rebalancing.",
                 "nanoseconds", false),
-            f.createLongCounter("rebalanceBucketCreateBytes",
+            factory.createLongCounter("rebalanceBucketCreateBytes",
                 "Total bytes created while directing bucket create operations for rebalancing.",
                 "bytes", false),
 
-            f.createIntGauge("rebalanceBucketRemovesInProgress",
+            factory.createIntGauge("rebalanceBucketRemovesInProgress",
                 "Current number of bucket remove operations being directed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalanceBucketRemovesCompleted",
+            factory.createIntCounter("rebalanceBucketRemovesCompleted",
                 "Total number of bucket remove operations directed for rebalancing.", "operations"),
-            f.createIntCounter("rebalanceBucketRemovesFailed",
+            factory.createIntCounter("rebalanceBucketRemovesFailed",
                 "Total number of bucket remove operations directed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("rebalanceBucketRemovesTime",
+            factory.createLongCounter("rebalanceBucketRemovesTime",
                 "Total time spent directing bucket remove operations for rebalancing.",
                 "nanoseconds", false),
-            f.createLongCounter("rebalanceBucketRemovesBytes",
+            factory.createLongCounter("rebalanceBucketRemovesBytes",
                 "Total bytes removed while directing bucket remove operations for rebalancing.",
                 "bytes", false),
 
-
-            f.createIntGauge("rebalanceBucketTransfersInProgress",
+            factory.createIntGauge("rebalanceBucketTransfersInProgress",
                 "Current number of bucket transfer operations being directed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalanceBucketTransfersCompleted",
+            factory.createIntCounter("rebalanceBucketTransfersCompleted",
                 "Total number of bucket transfer operations directed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalanceBucketTransfersFailed",
+            factory.createIntCounter("rebalanceBucketTransfersFailed",
                 "Total number of bucket transfer operations directed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("rebalanceBucketTransfersTime",
+            factory.createLongCounter("rebalanceBucketTransfersTime",
                 "Total time spent directing bucket transfer operations for rebalancing.",
                 "nanoseconds", false),
-            f.createLongCounter("rebalanceBucketTransfersBytes",
+            factory.createLongCounter("rebalanceBucketTransfersBytes",
                 "Total bytes transfered while directing bucket transfer operations for rebalancing.",
                 "bytes", false),
 
-            f.createIntGauge("rebalancePrimaryTransfersInProgress",
+            factory.createIntGauge("rebalancePrimaryTransfersInProgress",
                 "Current number of primary transfer operations being directed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalancePrimaryTransfersCompleted",
+            factory.createIntCounter("rebalancePrimaryTransfersCompleted",
                 "Total number of primary transfer operations directed for rebalancing.",
                 "operations"),
-            f.createIntCounter("rebalancePrimaryTransfersFailed",
+            factory.createIntCounter("rebalancePrimaryTransfersFailed",
                 "Total number of primary transfer operations directed for rebalancing that failed.",
                 "operations"),
-            f.createLongCounter("rebalancePrimaryTransferTime",
+            factory.createLongCounter("rebalancePrimaryTransferTime",
                 "Total time spent directing primary transfer operations for rebalancing.",
                 "nanoseconds", false),
-            f.createIntCounter("rebalanceMembershipChanges",
+            factory.createIntCounter("rebalanceMembershipChanges",
                 "The number of times that membership has changed during a rebalance", "events"),
 
-            f.createIntGauge("heapCriticalEvents",
+            factory.createIntGauge("heapCriticalEvents",
                 "Total number of times the heap usage went over critical threshold.", "events"),
-            f.createIntGauge("offHeapCriticalEvents",
+            factory.createIntGauge("offHeapCriticalEvents",
                 "Total number of times off-heap usage went over critical threshold.", "events"),
-            f.createIntGauge("heapSafeEvents",
+            factory.createIntGauge("heapSafeEvents",
                 "Total number of times the heap usage fell below critical threshold.", "events"),
-            f.createIntGauge("offHeapSafeEvents",
+            factory.createIntGauge("offHeapSafeEvents",
                 "Total number of times off-heap usage fell below critical threshold.", "events"),
-            f.createIntGauge("evictionStartEvents",
+            factory.createIntGauge("evictionStartEvents",
                 "Total number of times heap usage went over eviction threshold.", "events"),
-            f.createIntGauge("offHeapEvictionStartEvents",
+            factory.createIntGauge("offHeapEvictionStartEvents",
                 "Total number of times off-heap usage went over eviction threshold.", "events"),
-            f.createIntGauge("evictionStopEvents",
+            factory.createIntGauge("evictionStopEvents",
                 "Total number of times heap usage fell below eviction threshold.", "events"),
-            f.createIntGauge("offHeapEvictionStopEvents",
+            factory.createIntGauge("offHeapEvictionStopEvents",
                 "Total number of times off-heap usage fell below eviction threshold.", "events"),
-            f.createLongGauge("criticalThreshold",
+            factory.createLongGauge("criticalThreshold",
                 "The currently set heap critical threshold value in bytes", "bytes"),
-            f.createLongGauge("offHeapCriticalThreshold",
+            factory.createLongGauge("offHeapCriticalThreshold",
                 "The currently set off-heap critical threshold value in bytes", "bytes"),
-            f.createLongGauge("evictionThreshold",
+            factory.createLongGauge("evictionThreshold",
                 "The currently set heap eviction threshold value in bytes", "bytes"),
-            f.createLongGauge("offHeapEvictionThreshold",
+            factory.createLongGauge("offHeapEvictionThreshold",
                 "The currently set off-heap eviction threshold value in bytes", "bytes"),
-            f.createLongGauge("tenuredHeapUsed", "Total memory used in the tenured/old space",
+            factory.createLongGauge("tenuredHeapUsed", "Total memory used in the tenured/old space",
                 "bytes"),
-            f.createIntCounter("resourceEventsDelivered",
+            factory.createIntCounter("resourceEventsDelivered",
                 "Total number of resource events delivered to listeners", "events"),
-            f.createIntGauge("resourceEventQueueSize",
+            factory.createIntGauge("resourceEventQueueSize",
                 "Pending events for thresholdEventProcessor thread", "events"),
-            f.createIntGauge("thresholdEventProcessorThreadJobs",
+            factory.createIntGauge("thresholdEventProcessorThreadJobs",
                 "Number of jobs currently being processed by the thresholdEventProcessorThread",
                 "jobs")});
 
@@ -230,6 +225,7 @@ public class ResourceManagerStats {
   private final Statistics stats;
 
   public ResourceManagerStats(StatisticsFactory factory) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(type, "ResourceManagerStats");
   }
 
@@ -522,7 +518,7 @@ public class ResourceManagerStats {
 
   /**
    * @return a {@link QueueStatHelper} so that we can record number of events in the
-   *         thresholdEventProcessor queue.
+   * thresholdEventProcessor queue.
    */
   public QueueStatHelper getResourceEventQueueStatHelper() {
     return new QueueStatHelper() {
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 6059c79..cbf1a1e 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
@@ -22,17 +22,15 @@ import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class CountLRUStatistics implements EvictionStats {
-  private static final StatisticsType statType;
-  private static final int limitId;
-  private static final int counterId;
-  private static final int evictionsId;
-  private static final int destroysId;
-  private static final int evaluationsId;
-  private static final int greedyReturnsId;
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
+  private StatisticsType statType;
+  private int limitId;
+  private int counterId;
+  private int evictionsId;
+  private int destroysId;
+  private int evaluationsId;
+  private int greedyReturnsId;
+
+  private void initializeStats(StatisticsFactory factory) {
     final String entriesAllowedDesc = "Number of entries allowed in this region.";
     final String regionEntryCountDesc = "Number of entries in this region.";
     final String lruEvictionsDesc = "Number of total entry evictions triggered by LRU.";
@@ -41,14 +39,14 @@ public class CountLRUStatistics implements EvictionStats {
     final String lruEvaluationsDesc = "Number of entries evaluated during LRU operations.";
     final String lruGreedyReturnsDesc = "Number of non-LRU entries evicted during LRU operations";
 
-    statType = f.createType("LRUStatistics", "Statistics relates to entry cout based eviction",
+    statType = factory.createType("LRUStatistics", "Statistics relates to entry cout based eviction",
         new StatisticDescriptor[] {
-            f.createLongGauge("entriesAllowed", entriesAllowedDesc, "entries"),
-            f.createLongGauge("entryCount", regionEntryCountDesc, "entries"),
-            f.createLongCounter("lruEvictions", lruEvictionsDesc, "entries"),
-            f.createLongCounter("lruDestroys", lruDestroysDesc, "entries"),
-            f.createLongCounter("lruEvaluations", lruEvaluationsDesc, "entries"),
-            f.createLongCounter("lruGreedyReturns", lruGreedyReturnsDesc, "entries")});
+            factory.createLongGauge("entriesAllowed", entriesAllowedDesc, "entries"),
+            factory.createLongGauge("entryCount", regionEntryCountDesc, "entries"),
+            factory.createLongCounter("lruEvictions", lruEvictionsDesc, "entries"),
+            factory.createLongCounter("lruDestroys", lruDestroysDesc, "entries"),
+            factory.createLongCounter("lruEvaluations", lruEvaluationsDesc, "entries"),
+            factory.createLongCounter("lruGreedyReturns", lruGreedyReturnsDesc, "entries")});
 
     limitId = statType.nameToId("entriesAllowed");
     counterId = statType.nameToId("entryCount");
@@ -61,6 +59,7 @@ public class CountLRUStatistics implements EvictionStats {
   private final Statistics stats;
 
   public CountLRUStatistics(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(statType, "LRUStatistics-" + name);
   }
 
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 ba9bfbb..6c37a1e 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
@@ -22,30 +22,29 @@ import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class HeapLRUStatistics implements EvictionStats {
-  private static final StatisticsType statType;
-  private static final int counterId;
-  private static final int evictionsId;
-  private static final int destroysId;
-  private static final int evaluationsId;
-  private static final int greedyReturnsId;
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
+  private StatisticsType statType;
+  private int counterId;
+  private int evictionsId;
+  private int destroysId;
+  private int evaluationsId;
+  private int greedyReturnsId;
+
+  private void initializeStats(StatisticsFactory factory) {
     final String entryBytesDesc =
         "The amount of memory currently used by regions configured for eviction.";
     final String lruEvictionsDesc = "Number of total entry evictions triggered by LRU.";
-    final String lruDestroysDesc =
+    final String
+        lruDestroysDesc =
         "Number of entries destroyed in the region through both destroy cache operations and eviction.";
     final String lruEvaluationsDesc = "Number of entries evaluated during LRU operations.";
     final String lruGreedyReturnsDesc = "Number of non-LRU entries evicted during LRU operations";
 
-    statType = f.createType("HeapLRUStatistics", "Statistics related to heap based eviction",
-        new StatisticDescriptor[] {f.createLongGauge("entryBytes", entryBytesDesc, "bytes"),
-            f.createLongCounter("lruEvictions", lruEvictionsDesc, "entries"),
-            f.createLongCounter("lruDestroys", lruDestroysDesc, "entries"),
-            f.createLongCounter("lruEvaluations", lruEvaluationsDesc, "entries"),
-            f.createLongCounter("lruGreedyReturns", lruGreedyReturnsDesc, "entries")});
+    statType = factory.createType("HeapLRUStatistics", "Statistics related to heap based eviction",
+        new StatisticDescriptor[]{factory.createLongGauge("entryBytes", entryBytesDesc, "bytes"),
+            factory.createLongCounter("lruEvictions", lruEvictionsDesc, "entries"),
+            factory.createLongCounter("lruDestroys", lruDestroysDesc, "entries"),
+            factory.createLongCounter("lruEvaluations", lruEvaluationsDesc, "entries"),
+            factory.createLongCounter("lruGreedyReturns", lruGreedyReturnsDesc, "entries")});
 
     counterId = statType.nameToId("entryBytes");
     evictionsId = statType.nameToId("lruEvictions");
@@ -57,6 +56,7 @@ public class HeapLRUStatistics implements EvictionStats {
   private final Statistics stats;
 
   public HeapLRUStatistics(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(statType, "HeapLRUStatistics-" + name);
   }
 
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 fa7a5ef..503b648 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
@@ -22,17 +22,15 @@ import org.apache.geode.statistics.StatisticsTypeFactory;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 public class MemoryLRUStatistics implements EvictionStats {
-  private static final StatisticsType statType;
-  private static final int limitId;
-  private static final int counterId;
-  private static final int evictionsId;
-  private static final int destroysId;
-  private static final int evaluationsId;
-  private static final int greedyReturnsId;
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
+  private StatisticsType statType;
+  private int limitId;
+  private int counterId;
+  private int evictionsId;
+  private int destroysId;
+  private int evaluationsId;
+  private int greedyReturnsId;
+
+  private void initializeStats(StatisticsFactory factory) {
     final String bytesAllowedDesc = "Number of total bytes allowed in this region.";
     final String byteCountDesc = "Number of bytes in region.";
     final String lruEvictionsDesc = "Number of total entry evictions triggered by LRU.";
@@ -41,13 +39,13 @@ public class MemoryLRUStatistics implements EvictionStats {
     final String lruEvaluationsDesc = "Number of entries evaluated during LRU operations.";
     final String lruGreedyReturnsDesc = "Number of non-LRU entries evicted during LRU operations";
 
-    statType = f.createType("MemLRUStatistics", "Statistics relates to memory based eviction",
-        new StatisticDescriptor[] {f.createLongGauge("bytesAllowed", bytesAllowedDesc, "bytes"),
-            f.createLongGauge("byteCount", byteCountDesc, "bytes"),
-            f.createLongCounter("lruEvictions", lruEvictionsDesc, "entries"),
-            f.createLongCounter("lruDestroys", lruDestroysDesc, "entries"),
-            f.createLongCounter("lruEvaluations", lruEvaluationsDesc, "entries"),
-            f.createLongCounter("lruGreedyReturns", lruGreedyReturnsDesc, "entries")});
+    statType = factory.createType("MemLRUStatistics", "Statistics relates to memory based eviction",
+        new StatisticDescriptor[] {factory.createLongGauge("bytesAllowed", bytesAllowedDesc, "bytes"),
+            factory.createLongGauge("byteCount", byteCountDesc, "bytes"),
+            factory.createLongCounter("lruEvictions", lruEvictionsDesc, "entries"),
+            factory.createLongCounter("lruDestroys", lruDestroysDesc, "entries"),
+            factory.createLongCounter("lruEvaluations", lruEvaluationsDesc, "entries"),
+            factory.createLongCounter("lruGreedyReturns", lruGreedyReturnsDesc, "entries")});
 
     limitId = statType.nameToId("bytesAllowed");
     counterId = statType.nameToId("byteCount");
@@ -60,6 +58,7 @@ public class MemoryLRUStatistics implements EvictionStats {
   private final Statistics stats;
 
   public MemoryLRUStatistics(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this.stats = factory.createAtomicStatistics(statType, "MemLRUStatistics-" + name);
   }
 
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 5ff434c..a8b3809 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
@@ -26,7 +26,7 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 public class FunctionServiceStats {
 
   /** The <code>StatisticsType</code> of the statistics */
-  private static final StatisticsType _type;
+  private StatisticsType _type;
 
   /**
    * Total number of completed function.execute() calls (aka invocations of a function) per VM. Name
@@ -85,69 +85,67 @@ public class FunctionServiceStats {
 
 
   /** Id of the FUNCTION_EXECUTIONS_COMPLETED statistic */
-  private static final int _functionExecutionsCompletedId;
+  private int _functionExecutionsCompletedId;
 
   /** Id of the FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME statistic */
-  private static final int _functionExecutionsCompletedProcessingTimeId;
+  private int _functionExecutionsCompletedProcessingTimeId;
 
   /** Id of the FUNCTION_EXECUTIONS_RUNNING statistic */
-  private static final int _functionExecutionsRunningId;
+  private int _functionExecutionsRunningId;
 
   /** Id of the RESULTS_SENT_TO_RESULTCOLLECTOR statistic */
-  private static final int _resultsSentToResultCollectorId;
+  private int _resultsSentToResultCollectorId;
 
   /** Id of the FUNCTION_EXECUTIONS_CALL statistic */
-  private static final int _functionExecutionCallsId;
+  private int _functionExecutionCallsId;
 
   /** Id of the FUNCTION_EXECUTION_HASRESULT_COMPLETED_TIME statistic */
-  private static final int _functionExecutionsHasResultCompletedProcessingTimeId;
+  private int _functionExecutionsHasResultCompletedProcessingTimeId;
 
   /** Id of the FUNCTION_EXECUTIONS_HASRESULT_RUNNING statistic */
-  private static final int _functionExecutionsHasResultRunningId;
+  private int _functionExecutionsHasResultRunningId;
 
   /** Id of the FUNCTION_EXECUTIONS_EXCEPTIONS statistic */
-  private static final int _functionExecutionExceptions;
+  private int _functionExecutionExceptions;
 
   /** Id of the RESULTS_RECEIVED statistic */
-  private static final int _resultsReceived;
+  private int _resultsReceived;
 
 
   /**
    * Static initializer to create and initialize the <code>StatisticsType</code>
    */
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "FunctionServiceStatistics";
     String statDescription =
         "This is the aggregate Function Execution Stats (for all function Executions)";
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    _type = f.createType(statName, statDescription,
-        new StatisticDescriptor[] {f.createIntCounter(FUNCTION_EXECUTIONS_COMPLETED,
+    _type = factory.createType(statName, statDescription,
+        new StatisticDescriptor[] {factory.createIntCounter(FUNCTION_EXECUTIONS_COMPLETED,
             "Total number of completed function.execute() calls", "operations"),
 
-            f.createLongCounter(FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME,
+            factory.createLongCounter(FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME,
                 "Total time consumed for all completed invocations", "nanoseconds"),
 
-            f.createIntGauge(FUNCTION_EXECUTIONS_RUNNING, "number of currently running invocations",
+            factory.createIntGauge(FUNCTION_EXECUTIONS_RUNNING, "number of currently running invocations",
                 "operations"),
 
-            f.createIntCounter(RESULTS_SENT_TO_RESULTCOLLECTOR,
+            factory.createIntCounter(RESULTS_SENT_TO_RESULTCOLLECTOR,
                 "Total number of results sent to the ResultCollector", "operations"),
 
-            f.createIntCounter(RESULTS_RECEIVED,
+            factory.createIntCounter(RESULTS_RECEIVED,
                 "Total number of results received and passed to the ResultCollector", "operations"),
 
-            f.createIntCounter(FUNCTION_EXECUTION_CALLS,
+            factory.createIntCounter(FUNCTION_EXECUTION_CALLS,
                 "Total number of FunctionService.execute() calls", "operations"),
 
-            f.createLongCounter(FUNCTION_EXECUTIONS_HASRESULT_COMPLETED_PROCESSING_TIME,
+            factory.createLongCounter(FUNCTION_EXECUTIONS_HASRESULT_COMPLETED_PROCESSING_TIME,
                 "Total time consumed for all completed execute() calls where hasResult() returns true.",
                 "nanoseconds"),
 
-            f.createIntGauge(FUNCTION_EXECUTIONS_HASRESULT_RUNNING,
+            factory.createIntGauge(FUNCTION_EXECUTIONS_HASRESULT_RUNNING,
                 "A gauge indicating the number of currently active execute() calls for functions where hasResult() returns true.",
                 "operations"),
-            f.createIntCounter(FUNCTION_EXECUTION_EXCEPTIONS,
+            factory.createIntCounter(FUNCTION_EXECUTION_EXCEPTIONS,
                 "Total number of Exceptions Occurred while executing function", "operations"),
 
         });
@@ -180,17 +178,10 @@ public class FunctionServiceStats {
    * @param name The name of the <code>Statistics</code>
    */
   public FunctionServiceStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this._stats = factory.createAtomicStatistics(_type, name);
   }
 
-  private FunctionServiceStats() {
-    this._stats = new DummyStatisticsImpl(this._type, null, 0);
-  }
-
-  static FunctionServiceStats createDummy() {
-    return new FunctionServiceStats();
-  }
-
   // /////////////////// Instance Methods /////////////////////
 
   /**
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 6ae8f6e..89cc896 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
@@ -28,8 +28,10 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 public class FunctionStats {
 
   public static String statName = "FunctionStatistics";
-  /** The <code>StatisticsType</code> of the statistics */
-  private static final StatisticsType _type;
+  /**
+   * The <code>StatisticsType</code> of the statistics
+   */
+  private StatisticsType _type;
 
   private FunctionServiceStats aggregateStats;
   /**
@@ -100,90 +102,97 @@ public class FunctionStats {
   // */
   // private static final String BYTES_SERIALIZED = "bytesSerialized";
 
-  /** Id of the FUNCTION_EXECUTIONS_COMPLETED statistic */
-  private static final int _functionExecutionsCompletedId;
+  /**
+   * Id of the FUNCTION_EXECUTIONS_COMPLETED statistic
+   */
+  private int _functionExecutionsCompletedId;
 
-  /** Id of the FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME statistic */
-  private static final int _functionExecutionsCompletedProcessingTimeId;
+  /**
+   * Id of the FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME statistic
+   */
+  private int _functionExecutionsCompletedProcessingTimeId;
 
-  /** Id of the FUNCTION_EXECUTIONS_RUNNING statistic */
-  private static final int _functionExecutionsRunningId;
+  /**
+   * Id of the FUNCTION_EXECUTIONS_RUNNING statistic
+   */
+  private int _functionExecutionsRunningId;
 
-  /** Id of the RESULTS_SENT_TO_RESULTCOLLECTOR statistic */
-  private static final int _resultsSentToResultCollectorId;
+  /**
+   * Id of the RESULTS_SENT_TO_RESULTCOLLECTOR statistic
+   */
+  private int _resultsSentToResultCollectorId;
 
-  /** Id of the FUNCTION_EXECUTIONS_CALL statistic */
-  private static final int _functionExecutionCallsId;
+  /**
+   * Id of the FUNCTION_EXECUTIONS_CALL statistic
+   */
+  private int _functionExecutionCallsId;
 
-  /** Id of the FUNCTION_EXECUTION_HASRESULT_COMPLETED_TIME statistic */
-  private static final int _functionExecutionsHasResultCompletedProcessingTimeId;
+  /**
+   * Id of the FUNCTION_EXECUTION_HASRESULT_COMPLETED_TIME statistic
+   */
+  private int _functionExecutionsHasResultCompletedProcessingTimeId;
 
-  /** Id of the FUNCTION_EXECUTIONS_HASRESULT_RUNNING statistic */
-  private static final int _functionExecutionsHasResultRunningId;
+  /**
+   * Id of the FUNCTION_EXECUTIONS_HASRESULT_RUNNING statistic
+   */
+  private int _functionExecutionsHasResultRunningId;
 
-  /** Id of the RESULTS_RECEIVED statistic */
-  private static final int _resultsReceived;
+  /**
+   * Id of the RESULTS_RECEIVED statistic
+   */
+  private int _resultsReceived;
 
-  /** Id of the FUNCTION_EXECUTIONS_EXCEPTIONS statistic */
-  private static final int _functionExecutionExceptions;
+  /**
+   * Id of the FUNCTION_EXECUTIONS_EXCEPTIONS statistic
+   */
+  private int _functionExecutionExceptions;
 
   // /** Id of the RESULTS_RECEIVED statistic */
-  // private static final int _bytesReceived;
+  // private int _bytesReceived;
   //
   // /** Id of the FUNCTION_EXECUTIONS_EXCEPTIONS statistic */
-  // private static final int _bytesSerialized;
+  // private int _bytesSerialized;
 
 
   /**
    * Static initializer to create and initialize the <code>StatisticsType</code>
    */
-  static {
+  private void initializeStats(StatisticsFactory factory) {
 
     String statDescription = "This is the stats for the individual Function's Execution";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    _type = f.createType(statName, statDescription,
-        new StatisticDescriptor[] {f.createIntCounter(FUNCTION_EXECUTIONS_COMPLETED,
+    _type = factory.createType(statName, statDescription,
+        new StatisticDescriptor[]{factory.createIntCounter(FUNCTION_EXECUTIONS_COMPLETED,
             "Total number of completed function.execute() calls for given function", "operations"),
 
-            f.createLongCounter(FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME,
+            factory.createLongCounter(FUNCTION_EXECUTIONS_COMPLETED_PROCESSING_TIME,
                 "Total time consumed for all completed invocations of the given function",
                 "nanoseconds"),
 
-            f.createIntGauge(FUNCTION_EXECUTIONS_RUNNING,
+            factory.createIntGauge(FUNCTION_EXECUTIONS_RUNNING,
                 "number of currently running invocations of the given function", "operations"),
 
-            f.createIntCounter(RESULTS_SENT_TO_RESULTCOLLECTOR,
+            factory.createIntCounter(RESULTS_SENT_TO_RESULTCOLLECTOR,
                 "Total number of results sent to the ResultCollector", "operations"),
 
-            f.createIntCounter(RESULTS_RECEIVED,
+            factory.createIntCounter(RESULTS_RECEIVED,
                 "Total number of results received and passed to the ResultCollector", "operations"),
 
-            f.createIntCounter(FUNCTION_EXECUTION_CALLS,
+            factory.createIntCounter(FUNCTION_EXECUTION_CALLS,
                 "Total number of FunctionService.execute() calls for given function", "operations"),
 
-            f.createLongCounter(FUNCTION_EXECUTIONS_HASRESULT_COMPLETED_PROCESSING_TIME,
+            factory.createLongCounter(FUNCTION_EXECUTIONS_HASRESULT_COMPLETED_PROCESSING_TIME,
                 "Total time consumed for all completed given function.execute() calls where hasResult() returns true.",
                 "nanoseconds"),
 
-            f.createIntGauge(FUNCTION_EXECUTIONS_HASRESULT_RUNNING,
+            factory.createIntGauge(FUNCTION_EXECUTIONS_HASRESULT_RUNNING,
                 "A gauge indicating the number of currently active execute() calls for functions where hasResult() returns true.",
                 "operations"),
 
-            f.createIntCounter(FUNCTION_EXECUTION_EXCEPTIONS,
+            factory.createIntCounter(FUNCTION_EXECUTION_EXCEPTIONS,
                 "Total number of Exceptions Occurred while executing function", "operations"),
 
-        // f
-        // .createLongCounter(
-        // BYTES_RECEIVED,
-        // "Total number of bytes received before invoking the function",
-        // "Bytes"),
-        // f
-        // .createLongCounter(
-        // BYTES_SERIALIZED,
-        // "Total number of bytes serialized for the result of the function",
-        // "Bytes"),
+
         });
     // Initialize id fields
     _functionExecutionsCompletedId = _type.nameToId(FUNCTION_EXECUTIONS_COMPLETED);
@@ -203,33 +212,23 @@ public class FunctionStats {
 
   // //////////////////// Instance Fields //////////////////////
 
-  /** The <code>Statistics</code> instance to which most behavior is delegated */
+  /**
+   * The <code>Statistics</code> instance to which most behavior is delegated
+   */
   private final Statistics _stats;
 
-  /** This is an instance of the FunctionStats when the statsDisabled = true; */
-  private static final FunctionStats dummy = createDummy();
-
-  // ///////////////////// Constructors ///////////////////////
-
-  private FunctionStats() {
-    this._stats = new DummyStatisticsImpl(this._type, null, 0);
-    this.aggregateStats = FunctionServiceStats.createDummy();
-  }
-
-  static FunctionStats createDummy() {
-    return new FunctionStats();
-  }
-
   /**
    * Constructor.
-   *
    * @param factory The <code>StatisticsFactory</code> which creates the <code>Statistics</code>
-   *        instance
+   * instance
    * @param name The name of the <code>Statistics</code>
    */
   public FunctionStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this._stats = factory.createAtomicStatistics(_type, name);
-    aggregateStats = ((InternalDistributedSystem) factory).getInternalDistributedSystemStats().getFunctionServiceStats();
+    aggregateStats =
+        ((InternalDistributedSystem) factory).getInternalDistributedSystemStats()
+            .getFunctionServiceStats();
   }
 
   /**
@@ -241,7 +240,6 @@ public class FunctionStats {
 
   /**
    * Returns the current value of the "Total number of completed function.execute() calls" stat.
-   *
    * @return the current value of the "function Executions completed" stat
    */
   public int getFunctionExecutionsCompleted() {
@@ -258,7 +256,6 @@ public class FunctionStats {
 
   /**
    * Returns the current value of the "Total time consumed for all completed invocations" stat.
-   *
    * @return the current value of the "functionExecutionCompleteProcessingTime" stat
    */
   public long getFunctionExecutionCompleteProcessingTime() {
@@ -267,7 +264,6 @@ public class FunctionStats {
 
   /**
    * Returns the current value of the "number of currently running invocations" stat.
-   *
    * @return the current value of the "functionExecutionsRunning" stat
    */
   public int getFunctionExecutionsRunning() {
@@ -284,7 +280,6 @@ public class FunctionStats {
 
   /**
    * Returns the current value of the "Total number of results sent to the ResultCollector" stat.
-   *
    * @return the current value of the "resultsReturned" stat
    */
   public int getResultsSentToResultCollector() {
@@ -302,7 +297,6 @@ public class FunctionStats {
   /**
    * Returns the current value of the "Total number of results received and passed to
    * ResultCollector" stat.
-   *
    * @return the current value of the "resultsReturned" stat
    */
   public int getResultsReceived() {
@@ -319,7 +313,6 @@ public class FunctionStats {
 
   /**
    * Returns the current value of the "Total number of FunctionService...execute() calls" stat.
-   *
    * @return the current value of the "functionExecutionsCall" stat
    */
   public int getFunctionExecutionCalls() {
@@ -337,7 +330,6 @@ public class FunctionStats {
   /**
    * Returns the current value of the "Total time consumed for all completed execute() calls where
    * hasResult() returns true" stat.
-   *
    * @return the current value of the "functionExecutionHasResultCompleteProcessingTime" stat
    */
   public int getFunctionExecutionHasResultCompleteProcessingTime() {
@@ -347,7 +339,6 @@ public class FunctionStats {
   /**
    * Returns the current value of the "A gauge indicating the number of currently active execute()
    * calls for functions where hasResult() returns true" stat.
-   *
    * @return the current value of the "functionExecutionHasResultRunning" stat
    */
   public int getFunctionExecutionHasResultRunning() {
@@ -365,7 +356,6 @@ public class FunctionStats {
   /**
    * Returns the current value of the "Total number of Exceptions Occurred while executing function"
    * stat.
-   *
    * @return the current value of the "functionExecutionHasResultRunning" stat
    */
   public int getFunctionExecutionExceptions() {
@@ -382,7 +372,6 @@ public class FunctionStats {
 
   /**
    * Returns the current time (ns).
-   *
    * @return the current time (ns)
    */
   public long startTime() {
@@ -410,11 +399,10 @@ public class FunctionStats {
   /**
    * Increments the "functionExecutionsCompleted" and "functionExecutionCompleteProcessingTime"
    * stats.
-   *
    * @param start The start of the functionExecution (which is decremented from the current time to
-   *        determine the function Execution processing time).
+   * determine the function Execution processing time).
    * @param haveResult haveResult=true then update the _functionExecutionHasResultRunningId and
-   *        _functionExecutionHasResultCompleteProcessingTimeId
+   * _functionExecutionHasResultCompleteProcessingTimeId
    */
   public void endFunctionExecution(long start, boolean haveResult) {
     long ts = DistributionStats.getStatTime();
@@ -442,7 +430,6 @@ public class FunctionStats {
   /**
    * Increments the "_functionExecutionException" and decrements "_functionExecutionsRunningId" and
    * decrement "_functionExecutionHasResultRunningId"
-   *
    */
   public void endFunctionExecutionWithException(boolean haveResult) {
     // Decrement function Executions running.
@@ -460,26 +447,18 @@ 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 distributedSystem represents the Distributed System
    * @return object of the FunctionStats
    */
-  public static FunctionStats getFunctionStats(String functionID, InternalDistributedSystem distributedSystem) {
-    if (isDisabled()) {
-      return dummy;
-    } else {
-      return distributedSystem.getInternalDistributedSystemStats().getFunctionStats(functionID);
-    }
+  public static FunctionStats getFunctionStats(String functionID,
+                                               InternalDistributedSystem distributedSystem) {
+    return distributedSystem.getInternalDistributedSystemStats().getFunctionStats(functionID);
   }
 
   public static FunctionStats getFunctionStats(String functionID) {
-    if (isDisabled()) {
-      return dummy;
-    } else {
-      InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
-      return distributedSystem.getInternalDistributedSystemStats().getFunctionStats(functionID);
-    }
+    InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
+    return distributedSystem.getInternalDistributedSystemStats().getFunctionStats(functionID);
   }
 
   private static boolean isDisabled() {
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 ccd3d50..c0b190f 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
@@ -28,7 +28,7 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class HARegionQueueStats {
   /** The <code>StatisticsType</code> of the statistics */
-  private static final StatisticsType _type;
+  private StatisticsType _type;
 
   /** Name of the events queued statistic */
   protected static final String EVENTS_QUEUED = "eventsQueued";
@@ -71,76 +71,73 @@ public class HARegionQueueStats {
   protected static final String NUM_SEQUENCE_VIOLATED = "numSequenceViolated";
 
   /** Id of the events queued statistic */
-  private static final int _eventsQueuedId;
+  private int _eventsQueuedId;
 
   /** Id of the events conflated statistic */
-  private static final int _eventsConflatedId;
+  private int _eventsConflatedId;
 
   /** Id of the marker events conflated statistic */
-  private static final int _markerEventsConflatedId;
+  private int _markerEventsConflatedId;
 
   /** Id of the events removed statistic */
-  private static final int _eventsRemovedId;
+  private int _eventsRemovedId;
 
   /** Id of the events taken statistic */
-  private static final int _eventsTakenId;
+  private int _eventsTakenId;
 
   /** Id of the events expired statistic */
-  private static final int _eventsExpiredId;
+  private int _eventsExpiredId;
 
   /** Id of the events removed by qrm statistic */
-  private static final int _eventsRemovedByQrmId;
+  private int _eventsRemovedByQrmId;
 
   /** Id of the thread identifiers statistic */
-  private static final int _threadIdentifiersId;
+  private int _threadIdentifiersId;
 
   /** Id of the num events dispatched statistic */
-  private static final int _eventsDispatched;
+  private int _eventsDispatched;
 
   /** Id of the num void removal statistic */
-  private static final int _numVoidRemovals;
+  private int _numVoidRemovals;
 
   /** Id of the num sequence violated statistic */
-  private static final int _numSequenceViolated;
+  private int _numSequenceViolated;
 
   /**
    * Static initializer to create and initialize the <code>StatisticsType</code>
    */
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "ClientSubscriptionStats";
+    _type = factory.createType(statName, statName, new StatisticDescriptor[] {
+        factory.createLongCounter(EVENTS_QUEUED, "Number of events added to queue.", "operations"),
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    _type = f.createType(statName, statName, new StatisticDescriptor[] {
-        f.createLongCounter(EVENTS_QUEUED, "Number of events added to queue.", "operations"),
-
-        f.createLongCounter(EVENTS_CONFLATED, "Number of events conflated for the queue.",
+        factory.createLongCounter(EVENTS_CONFLATED, "Number of events conflated for the queue.",
             "operations"),
 
-        f.createLongCounter(MARKER_EVENTS_CONFLATED,
+        factory.createLongCounter(MARKER_EVENTS_CONFLATED,
             "Number of marker events conflated for the queue.", "operations"),
 
-        f.createLongCounter(EVENTS_REMOVED, "Number of events removed from the queue.",
+        factory.createLongCounter(EVENTS_REMOVED, "Number of events removed from the queue.",
             "operations"),
 
-        f.createLongCounter(EVENTS_TAKEN, "Number of events taken from the queue.", "operations"),
+        factory.createLongCounter(EVENTS_TAKEN, "Number of events taken from the queue.", "operations"),
 
-        f.createLongCounter(EVENTS_EXPIRED, "Number of events expired from the queue.",
+        factory.createLongCounter(EVENTS_EXPIRED, "Number of events expired from the queue.",
             "operations"),
 
-        f.createLongCounter(EVENTS_REMOVED_BY_QRM, "Number of events removed by QRM message.",
+        factory.createLongCounter(EVENTS_REMOVED_BY_QRM, "Number of events removed by QRM message.",
             "operations"),
 
-        f.createIntCounter(THREAD_IDENTIFIERS, "Number of ThreadIdenfier objects for the queue.",
+        factory.createIntCounter(THREAD_IDENTIFIERS, "Number of ThreadIdenfier objects for the queue.",
             "units"),
 
-        f.createLongCounter(EVENTS_DISPATCHED, "Number of events that have been dispatched.",
+        factory.createLongCounter(EVENTS_DISPATCHED, "Number of events that have been dispatched.",
             "operations"),
 
-        f.createLongCounter(NUM_VOID_REMOVALS, "Number of void removals from the queue.",
+        factory.createLongCounter(NUM_VOID_REMOVALS, "Number of void removals from the queue.",
             "operations"),
 
-        f.createLongCounter(NUM_SEQUENCE_VIOLATED, "Number of events that has violated sequence.",
+        factory.createLongCounter(NUM_SEQUENCE_VIOLATED, "Number of events that has violated sequence.",
             "operations")});
 
     // Initialize id fields
@@ -168,6 +165,7 @@ public class HARegionQueueStats {
    * @param name The name of the <code>Statistics</code>
    */
   public HARegionQueueStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this._stats = factory.createAtomicStatistics(_type, "ClientSubscriptionStats-" + name);
   }
 
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 d8cb13c..71a2f1f 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
@@ -1914,7 +1914,7 @@ public class CacheClientNotifier {
     // Initialize the statistics
     StatisticsFactory factory;
     if (isGatewayReceiver) {
-      factory = new DummyStatisticsFactory();
+      factory = new DummyStatisticsFactory(cache.getDistributedSystem().getStatisticsFactory());
     } else {
       factory = this.getCache().getDistributedSystem().getStatisticsFactory();
     }
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 152e3b9..93b9454 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
@@ -31,7 +31,7 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  */
 public class CacheClientNotifierStats {
 
-  private static final StatisticsType _type;
+  private StatisticsType _type;
 
   //////////////////// Statistic "Id" Fields ////////////////////
 
@@ -47,65 +47,63 @@ public class CacheClientNotifierStats {
   private static final String COMPILED_QUERY_COUNT = "compiledQueryCount";
   private static final String COMPILED_QUERY_USED_COUNT = "compiledQueryUsedCount";
 
-  private static final int _eventsId;
-  private static final int _eventProcessingTimeId;
-  private static final int _clientRegistrationsId;
-  private static final int _clientRegistrationTimeId;
+  private int _eventsId;
+  private int _eventProcessingTimeId;
+  private int _clientRegistrationsId;
+  private int _clientRegistrationTimeId;
 
   // Register and Unregister stats.
-  private static final int _clientHealthMonitorRegisterId;
-  private static final int _durableReconnectionCount;
-  private static final int _queueDroppedCount;
-  private static final int _eventEnqueuedWhileClientAwayCount;
-  private static final int _clientHealthMonitorUnRegisterId;
+  private int _clientHealthMonitorRegisterId;
+  private int _durableReconnectionCount;
+  private int _queueDroppedCount;
+  private int _eventEnqueuedWhileClientAwayCount;
+  private int _clientHealthMonitorUnRegisterId;
 
   // CQ process stat.
-  private static final int _cqProcessingTimeId;
+  private int _cqProcessingTimeId;
 
   // Compiled query count.
-  private static final int _compiledQueryCount;
+  private int _compiledQueryCount;
 
-  private static final int _compiledQueryUsedCount;
+  private int _compiledQueryUsedCount;
 
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "CacheClientNotifierStatistics";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    _type = f.createType(statName, statName, new StatisticDescriptor[] {f.createIntCounter(EVENTS,
+    _type = factory.createType(statName, statName, new StatisticDescriptor[] {factory.createIntCounter(EVENTS,
         "Number of events processed by the cache client notifier.", "operations"),
 
-        f.createLongCounter(EVENT_PROCESSING_TIME,
+        factory.createLongCounter(EVENT_PROCESSING_TIME,
             "Total time spent by the cache client notifier processing events.", "nanoseconds"),
 
-        f.createIntCounter(CLIENT_REGISTRATIONS,
+        factory.createIntCounter(CLIENT_REGISTRATIONS,
             "Number of clients that have registered for updates.", "operations"),
 
-        f.createLongCounter(CLIENT_REGISTRATION_TIME,
+        factory.createLongCounter(CLIENT_REGISTRATION_TIME,
             "Total time spent doing client registrations.", "nanoseconds"),
 
-        f.createIntGauge("clientHealthMonitorRegister", "Number of client Register.", "registered"),
+        factory.createIntGauge("clientHealthMonitorRegister", "Number of client Register.", "registered"),
 
-        f.createIntGauge("clientHealthMonitorUnRegister", "Number of client UnRegister.",
+        factory.createIntGauge("clientHealthMonitorUnRegister", "Number of client UnRegister.",
             "unregistered"),
 
-        f.createIntCounter(DURABLE_RECONNECTION_COUNT,
+        factory.createIntCounter(DURABLE_RECONNECTION_COUNT,
             "Number of times the same durable client connects to the server", "operations"),
 
-        f.createIntCounter(QUEUE_DROPPED_COUNT,
+        factory.createIntCounter(QUEUE_DROPPED_COUNT,
             "Number of times client queue for a particular durable client is dropped",
             "operations"),
 
-        f.createIntCounter(EVENTS_ENQUEUED_WHILE_CLIENT_AWAY_COUNT,
+        factory.createIntCounter(EVENTS_ENQUEUED_WHILE_CLIENT_AWAY_COUNT,
             "Number of events enqueued in queue for a durable client ", "operations"),
 
-        f.createLongCounter(CQ_PROCESSING_TIME,
+        factory.createLongCounter(CQ_PROCESSING_TIME,
             "Total time spent by the cache client notifier processing cqs.", "nanoseconds"),
 
-        f.createLongGauge(COMPILED_QUERY_COUNT, "Number of compiled queries maintained.",
+        factory.createLongGauge(COMPILED_QUERY_COUNT, "Number of compiled queries maintained.",
             "maintained"),
 
-        f.createLongCounter(COMPILED_QUERY_USED_COUNT, "Number of times compiled queries are used.",
+        factory.createLongCounter(COMPILED_QUERY_USED_COUNT, "Number of times compiled queries are used.",
             "used"),
 
     });
@@ -139,8 +137,9 @@ public class CacheClientNotifierStats {
   /**
    * Creates a new <code>CacheClientNotifierStats</code>.
    */
-  public CacheClientNotifierStats(StatisticsFactory f) {
-    this._stats = f.createAtomicStatistics(_type, "cacheClientNotifierStats");
+  public CacheClientNotifierStats(StatisticsFactory factory) {
+    initializeStats(factory);
+    this._stats = factory.createAtomicStatistics(_type, "cacheClientNotifierStats");
   }
 
   ///////////////////// Instance Methods /////////////////////
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 503943d..bc3959d 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
@@ -34,7 +34,7 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 public class CacheClientProxyStats implements MessageStats {
 
   /** The <code>StatisticsType</code> of the statistics */
-  private static final StatisticsType _type;
+  private StatisticsType _type;
 
   /** Name of the messages received statistic */
   private static final String MESSAGES_RECEIVED = "messagesReceived";
@@ -60,73 +60,71 @@ public class CacheClientProxyStats implements MessageStats {
   private static final String CQ_COUNT = "cqCount";
 
   /** Id of the messages received statistic */
-  private static final int _messagesReceivedId;
+  private int _messagesReceivedId;
   /** Id of the messages queued statistic */
-  private static final int _messagesQueuedId;
+  private int _messagesQueuedId;
   /** Id of the messages not queued because originator statistic */
-  private static final int _messagesNotQueuedOriginatorId;
+  private int _messagesNotQueuedOriginatorId;
   /** Id of the messages not queued because not interested statistic */
-  private static final int _messagesNotQueuedNotInterestedId;
+  private int _messagesNotQueuedNotInterestedId;
   /** Id of the messages failed to be queued statistic */
-  private static final int _messagesFailedQueuedId;
+  private int _messagesFailedQueuedId;
   /** Id of the message queue size statistic */
-  private static final int _messageQueueSizeId;
+  private int _messageQueueSizeId;
   /** Id of the messages removed statistic */
-  private static final int _messagesProcessedId;
+  private int _messagesProcessedId;
   /** Id of the message processing time statistic */
-  private static final int _messageProcessingTimeId;
+  private int _messageProcessingTimeId;
   /** Id of the prepared delta messages statistic */
-  private static final int _deltaMessagesSentId;
+  private int _deltaMessagesSentId;
   /** Id of the prepared delta messages statistic */
-  private static final int _deltaFullMessagesSentId;
+  private int _deltaFullMessagesSentId;
   /** Id of the CQ count statistic */
-  private static final int _cqCountId;
-  private static final int _sentBytesId;
+  private int _cqCountId;
+  private int _sentBytesId;
 
   /**
    * Static initializer to create and initialize the <code>StatisticsType</code>
    */
-  static {
+  private void initializeStats(StatisticsFactory factory) {
     String statName = "CacheClientProxyStatistics";
 
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
+    _type = factory.createType(statName, statName, new StatisticDescriptor[] {
+        factory.createIntCounter(MESSAGES_RECEIVED, "Number of client messages received.", "operations"),
 
-    _type = f.createType(statName, statName, new StatisticDescriptor[] {
-        f.createIntCounter(MESSAGES_RECEIVED, "Number of client messages received.", "operations"),
-
-        f.createIntCounter(MESSAGES_QUEUED, "Number of client messages added to the message queue.",
+        factory.createIntCounter(MESSAGES_QUEUED, "Number of client messages added to the message queue.",
             "operations"),
 
-        f.createIntCounter(MESSAGES_FAILED_QUEUED,
+        factory.createIntCounter(MESSAGES_FAILED_QUEUED,
             "Number of client messages attempted but failed to be added to the message queue.",
             "operations"),
 
-        f.createIntCounter(MESSAGES_NOT_QUEUED_ORIGINATOR,
+        factory.createIntCounter(MESSAGES_NOT_QUEUED_ORIGINATOR,
             "Number of client messages received but not added to the message queue because the receiving proxy represents the client originating the message.",
             "operations"),
 
-        f.createIntCounter(MESSAGES_NOT_QUEUED_NOT_INTERESTED,
+        factory.createIntCounter(MESSAGES_NOT_QUEUED_NOT_INTERESTED,
             "Number of client messages received but not added to the message queue because the client represented by the receiving proxy was not interested in the message's key.",
             "operations"),
 
-        f.createIntGauge(MESSAGE_QUEUE_SIZE, "Size of the message queue.", "operations"),
+        factory.createIntGauge(MESSAGE_QUEUE_SIZE, "Size of the message queue.", "operations"),
 
-        f.createIntCounter(MESSAGES_PROCESSED,
+        factory.createIntCounter(MESSAGES_PROCESSED,
             "Number of client messages removed from the message queue and sent.", "operations"),
 
-        f.createLongCounter(MESSAGE_PROCESSING_TIME,
+        factory.createLongCounter(MESSAGE_PROCESSING_TIME,
             "Total time spent sending messages to clients.", "nanoseconds"),
 
-        f.createIntCounter(DELTA_MESSAGES_SENT,
+        factory.createIntCounter(DELTA_MESSAGES_SENT,
             "Number of client messages containing only delta bytes dispatched to the client.",
             "operations"),
 
-        f.createIntCounter(DELTA_FULL_MESSAGES_SENT,
+        factory.createIntCounter(DELTA_FULL_MESSAGES_SENT,
             "Number of client messages dispatched in reponse to failed delta at client.",
             "operations"),
 
-        f.createLongCounter(CQ_COUNT, "Number of CQs on the client.", "operations"),
-        f.createLongCounter("sentBytes", "Total number of bytes sent to client.", "bytes"),});
+        factory.createLongCounter(CQ_COUNT, "Number of CQs on the client.", "operations"),
+        factory.createLongCounter("sentBytes", "Total number of bytes sent to client.", "bytes"),});
 
     // Initialize id fields
     _messagesReceivedId = _type.nameToId(MESSAGES_RECEIVED);
@@ -158,6 +156,7 @@ public class CacheClientProxyStats implements MessageStats {
    * @param name The name of the <code>Statistics</code>
    */
   public CacheClientProxyStats(StatisticsFactory factory, String name) {
+    initializeStats(factory);
     this._stats = factory.createAtomicStatistics(_type, "cacheClientProxyStats-" + name);
   }
 
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 042c5f1..b33b8e4 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
@@ -39,6 +39,7 @@ import org.apache.geode.DataSerializer;
 import org.apache.geode.InvalidDeltaException;
 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.EntryNotFoundException;
@@ -104,7 +105,7 @@ public class CacheClientUpdater extends Thread implements ClientUpdater, Disconn
 
   private static final Logger logger = LogService.getLogger();
 
-  private static final int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
+  private int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
 
   /**
    * true if the constructor successfully created a connection. If false, the run method for this
@@ -288,7 +289,7 @@ public class CacheClientUpdater extends Thread implements ClientUpdater, Disconn
     // this holds the connection which this threads reads
     this.eManager = eManager;
     this.endpoint = endpoint;
-    this.stats = new CCUStats(this.system, this.location);
+    this.stats = new CCUStats(this.system.getStatisticsFactory(), this.location);
 
     // Create the connection...
     final boolean isDebugEnabled = logger.isDebugEnabled();
@@ -1844,21 +1845,20 @@ public class CacheClientUpdater extends Thread implements ClientUpdater, Disconn
    */
   public static class CCUStats implements MessageStats {
 
-    private static final StatisticsType type;
-    private static final int messagesBeingReceivedId;
-    private static final int messageBytesBeingReceivedId;
-    private static final int receivedBytesId;
+    private StatisticsType type;
+    private int messagesBeingReceivedId;
+    private int messageBytesBeingReceivedId;
+    private int receivedBytesId;
 
-    static {
-      StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-      type = f.createType("CacheClientUpdaterStats", "Statistics about incoming subscription data",
+    private void initializeStats(StatisticsFactory factory) {
+      type = factory.createType("CacheClientUpdaterStats", "Statistics about incoming subscription data",
           new StatisticDescriptor[] {
-              f.createLongCounter("receivedBytes",
+              factory.createLongCounter("receivedBytes",
                   "Total number of bytes received from the server.", "bytes"),
-              f.createIntGauge("messagesBeingReceived",
+              factory.createIntGauge("messagesBeingReceived",
                   "Current number of message being received off the network or being processed after reception.",
                   "messages"),
-              f.createLongGauge("messageBytesBeingReceived",
+              factory.createLongGauge("messageBytesBeingReceived",
                   "Current number of bytes consumed by messages being received or processed.",
                   "bytes"),});
       receivedBytesId = type.nameToId("receivedBytes");
@@ -1869,9 +1869,10 @@ public class CacheClientUpdater extends Thread implements ClientUpdater, Disconn
     // instance fields
     private final Statistics stats;
 
-    CCUStats(DistributedSystem distributedSystem, ServerLocation location) {
+    CCUStats(StatisticsFactory factory, ServerLocation location) {
+      initializeStats(factory);
       // no need for atomic since only a single thread will be writing these
-      this.stats = distributedSystem.getStatisticsFactory().createStatistics(type, "CacheClientUpdater-" + location);
+      this.stats = factory.createStatistics(type, "CacheClientUpdater-" + location);
     }
 
     public void close() {
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 fe4e5d6..fcb4da2 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
@@ -30,7 +30,7 @@ public class GatewaySenderStats {
 
 
   /** The <code>StatisticsType</code> of the statistics */
-  private static final StatisticsType type;
+  private StatisticsType type;
 
   //////////////////// Statistic "Id" Fields ////////////////////
 
@@ -163,87 +163,84 @@ public class GatewaySenderStats {
   /**
    * Static initializer to create and initialize the <code>StatisticsType</code>
    */
-  static {
-
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-
-    type = f.createType(typeName, "Stats for activity in the GatewaySender",
+  protected void initializeStats(StatisticsFactory factory) {
+    type = factory.createType(typeName, "Stats for activity in the GatewaySender",
         new StatisticDescriptor[] {
-            f.createIntCounter(EVENTS_RECEIVED, "Number of events received by this Sender.",
+            factory.createIntCounter(EVENTS_RECEIVED, "Number of events received by this Sender.",
                 "operations"),
-            f.createIntCounter(EVENTS_QUEUED, "Number of events added to the event queue.",
+            factory.createIntCounter(EVENTS_QUEUED, "Number of events added to the event queue.",
                 "operations"),
-            f.createLongCounter(EVENT_QUEUE_TIME, "Total time spent queueing events.",
+            factory.createLongCounter(EVENT_QUEUE_TIME, "Total time spent queueing events.",
                 "nanoseconds"),
-            f.createIntGauge(EVENT_QUEUE_SIZE, "Size of the event queue.", "operations", false),
-            f.createIntGauge(SECONDARY_EVENT_QUEUE_SIZE, "Size of secondary event queue.",
+            factory.createIntGauge(EVENT_QUEUE_SIZE, "Size of the event queue.", "operations", false),
+            factory.createIntGauge(SECONDARY_EVENT_QUEUE_SIZE, "Size of secondary event queue.",
                 "operations", false),
-            f.createIntGauge(EVENTS_PROCESSED_BY_PQRM,
+            factory.createIntGauge(EVENTS_PROCESSED_BY_PQRM,
                 "Total number of events processed by Parallel Queue Removal Message(PQRM).",
                 "operations", false),
-            f.createIntGauge(TMP_EVENT_QUEUE_SIZE, "Size of the temporary events.", "operations",
+            factory.createIntGauge(TMP_EVENT_QUEUE_SIZE, "Size of the temporary events.", "operations",
                 false),
-            f.createIntCounter(EVENTS_NOT_QUEUED_CONFLATED,
+            factory.createIntCounter(EVENTS_NOT_QUEUED_CONFLATED,
                 "Number of events received but not added to the event queue because the queue already contains an event with the event's key.",
                 "operations"),
-            f.createIntCounter(EVENTS_CONFLATED_FROM_BATCHES,
+            factory.createIntCounter(EVENTS_CONFLATED_FROM_BATCHES,
                 "Number of events conflated from batches.", "operations"),
-            f.createIntCounter(EVENTS_DISTRIBUTED,
+            factory.createIntCounter(EVENTS_DISTRIBUTED,
                 "Number of events removed from the event queue and sent.", "operations"),
-            f.createIntCounter(EVENTS_EXCEEDING_ALERT_THRESHOLD,
+            factory.createIntCounter(EVENTS_EXCEEDING_ALERT_THRESHOLD,
                 "Number of events exceeding the alert threshold.", "operations", false),
-            f.createLongCounter(BATCH_DISTRIBUTION_TIME,
+            factory.createLongCounter(BATCH_DISTRIBUTION_TIME,
                 "Total time spent distributing batches of events to other gateway receivers.",
                 "nanoseconds"),
-            f.createIntCounter(BATCHES_DISTRIBUTED,
+            factory.createIntCounter(BATCHES_DISTRIBUTED,
                 "Number of batches of events removed from the event queue and sent.", "operations"),
-            f.createIntCounter(BATCHES_REDISTRIBUTED,
+            factory.createIntCounter(BATCHES_REDISTRIBUTED,
                 "Number of batches of events removed from the event queue and resent.",
                 "operations", false),
-            f.createIntCounter(BATCHES_RESIZED,
+            factory.createIntCounter(BATCHES_RESIZED,
                 "Number of batches that were resized because they were too large", "operations",
                 false),
-            f.createIntCounter(UNPROCESSED_TOKENS_ADDED_BY_PRIMARY,
+            factory.createIntCounter(UNPROCESSED_TOKENS_ADDED_BY_PRIMARY,
                 "Number of tokens added to the secondary's unprocessed token map by the primary (though a listener).",
                 "tokens"),
-            f.createIntCounter(UNPROCESSED_EVENTS_ADDED_BY_SECONDARY,
+            factory.createIntCounter(UNPROCESSED_EVENTS_ADDED_BY_SECONDARY,
                 "Number of events added to the secondary's unprocessed event map by the secondary.",
                 "events"),
-            f.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_PRIMARY,
+            factory.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_PRIMARY,
                 "Number of events removed from the secondary's unprocessed event map by the primary (though a listener).",
                 "events"),
-            f.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_SECONDARY,
+            factory.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_SECONDARY,
                 "Number of tokens removed from the secondary's unprocessed token map by the secondary.",
                 "tokens"),
-            f.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_TIMEOUT,
+            factory.createIntCounter(UNPROCESSED_EVENTS_REMOVED_BY_TIMEOUT,
                 "Number of events removed from the secondary's unprocessed event map by a timeout.",
                 "events"),
-            f.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_TIMEOUT,
+            factory.createIntCounter(UNPROCESSED_TOKENS_REMOVED_BY_TIMEOUT,
                 "Number of tokens removed from the secondary's unprocessed token map by a timeout.",
                 "tokens"),
-            f.createIntGauge(UNPROCESSED_EVENT_MAP_SIZE,
+            factory.createIntGauge(UNPROCESSED_EVENT_MAP_SIZE,
                 "Current number of entries in the secondary's unprocessed event map.", "events",
                 false),
-            f.createIntGauge(UNPROCESSED_TOKEN_MAP_SIZE,
+            factory.createIntGauge(UNPROCESSED_TOKEN_MAP_SIZE,
                 "Current number of entries in the secondary's unprocessed token map.", "tokens",
                 false),
-            f.createIntGauge(CONFLATION_INDEXES_MAP_SIZE,
+            factory.createIntGauge(CONFLATION_INDEXES_MAP_SIZE,
                 "Current number of entries in the conflation indexes map.", "events"),
-            f.createIntCounter(NOT_QUEUED_EVENTS, "Number of events not added to queue.", "events"),
-            f.createIntCounter(EVENTS_DROPPED_DUE_TO_PRIMARY_SENDER_NOT_RUNNING,
+            factory.createIntCounter(NOT_QUEUED_EVENTS, "Number of events not added to queue.", "events"),
+            factory.createIntCounter(EVENTS_DROPPED_DUE_TO_PRIMARY_SENDER_NOT_RUNNING,
                 "Number of events dropped because the primary gateway sender is not running.",
                 "events"),
-            f.createIntCounter(EVENTS_FILTERED,
+            factory.createIntCounter(EVENTS_FILTERED,
                 "Number of events filtered through GatewayEventFilter.", "events"),
-            f.createIntCounter(LOAD_BALANCES_COMPLETED, "Number of load balances completed",
+            factory.createIntCounter(LOAD_BALANCES_COMPLETED, "Number of load balances completed",
                 "operations"),
-            f.createIntGauge(LOAD_BALANCES_IN_PROGRESS, "Number of load balances in progress",
+            factory.createIntGauge(LOAD_BALANCES_IN_PROGRESS, "Number of load balances in progress",
                 "operations"),
-            f.createLongCounter(LOAD_BALANCE_TIME, "Total time spent load balancing this sender",
+            factory.createLongCounter(LOAD_BALANCE_TIME, "Total time spent load balancing this sender",
                 "nanoseconds"),
-            f.createIntCounter(SYNCHRONIZATION_EVENTS_ENQUEUED,
+            factory.createIntCounter(SYNCHRONIZATION_EVENTS_ENQUEUED,
                 "Number of synchronization events added to the event queue.", "operations"),
-            f.createIntCounter(SYNCHRONIZATION_EVENTS_PROVIDED,
+            factory.createIntCounter(SYNCHRONIZATION_EVENTS_PROVIDED,
                 "Number of synchronization events provided to other members.", "operations"),});
 
     // Initialize id fields
@@ -285,32 +282,23 @@ public class GatewaySenderStats {
   ////////////////////// Instance Fields //////////////////////
 
   /** The <code>Statistics</code> instance to which most behavior is delegated */
-  private final Statistics stats;
+  protected Statistics stats;
 
   /////////////////////// Constructors ///////////////////////
 
   /**
    * Constructor.
    *
-   * @param f The <code>StatisticsFactory</code> which creates the <code>Statistics</code> instance
+   * @param factory The <code>StatisticsFactory</code> which creates the <code>Statistics</code> instance
    * @param gatewaySenderId The id of the <code>GatewaySender</code> used to generate the name of
    *        the <code>Statistics</code>
    */
-  public GatewaySenderStats(StatisticsFactory f, String gatewaySenderId) {
-    this.stats = f.createAtomicStatistics(type, "gatewaySenderStats-" + gatewaySenderId);
+  public GatewaySenderStats(StatisticsFactory factory, String gatewaySenderId) {
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(type, "gatewaySenderStats-" + gatewaySenderId);
   }
 
-  /**
-   * Constructor.
-   *
-   * @param f The <code>StatisticsFactory</code> which creates the <code>Statistics</code> instance
-   * @param asyncQueueId The id of the <code>AsyncEventQueue</code> used to generate the name of the
-   *        <code>Statistics</code>
-   * @param statType The StatisticsTYpe
-   */
-  public GatewaySenderStats(StatisticsFactory f, String asyncQueueId, StatisticsType statType) {
-    this.stats = f.createAtomicStatistics(statType, "asyncEventQueueStats-" + asyncQueueId);
-  }
+  protected GatewaySenderStats(){}
 
   ///////////////////// Instance Methods /////////////////////
 
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 29f954c..aca642b 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
@@ -33,7 +33,6 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
  * Enables off-heap storage by creating a MemoryAllocator.
- *
  * @since Geode 1.0
  */
 public class OffHeapStorage implements OffHeapMemoryStats {
@@ -41,7 +40,7 @@ public class OffHeapStorage implements OffHeapMemoryStats {
       DistributionConfig.GEMFIRE_PREFIX + "offheap.stayConnectedOnOutOfOffHeapMemory";
 
   // statistics type
-  private static final StatisticsType statsType;
+  private StatisticsType statsType;
   private static final String statsTypeName = "OffHeapMemoryStats";
   private static final String statsTypeDescription = "Statistics about off-heap memory storage.";
 
@@ -49,22 +48,19 @@ public class OffHeapStorage implements OffHeapMemoryStats {
   private static final String statsName = "offHeapMemoryStats";
 
   // statistics fields
-  private static final int freeMemoryId;
-  private static final int maxMemoryId;
-  private static final int usedMemoryId;
-  private static final int objectsId;
-  private static final int readsId;
-  private static final int defragmentationId;
-  private static final int fragmentsId;
-  private static final int largestFragmentId;
-  private static final int defragmentationTimeId;
-  private static final int fragmentationId;
-  private static final int defragmentationsInProgressId;
-  // NOTE!!!! When adding new stats make sure and update the initialize method on this class
-
-  // creates and registers the statistics type
-  static {
-    final StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
+  private int freeMemoryId;
+  private int maxMemoryId;
+  private int usedMemoryId;
+  private int objectsId;
+  private int readsId;
+  private int defragmentationId;
+  private int fragmentsId;
+  private int largestFragmentId;
+  private int defragmentationTimeId;
+  private int fragmentationId;
+  private int defragmentationsInProgressId;
+
+  private void initializeStats(StatisticsFactory factory) {
 
     final String usedMemoryDesc =
         "The amount of off-heap memory, in bytes, that is being used to store data.";
@@ -73,18 +69,23 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     final String defragmentationsInProgressDesc =
         "Current number of defragment operations currently in progress.";
     final String defragmentationTimeDesc = "The total time spent defragmenting off-heap memory.";
-    final String fragmentationDesc =
+    final String
+        fragmentationDesc =
         "The percentage of off-heap free memory that is fragmented.  Updated every time a defragmentation is performed.";
-    final String fragmentsDesc =
+    final String
+        fragmentsDesc =
         "The number of fragments of free off-heap memory. Updated every time a defragmentation is done.";
     final String freeMemoryDesc =
         "The amount of off-heap memory, in bytes, that is not being used.";
-    final String largestFragmentDesc =
+    final String
+        largestFragmentDesc =
         "The largest fragment of memory found by the last defragmentation of off heap memory. Updated every time a defragmentation is done.";
     final String objectsDesc = "The number of objects stored in off-heap memory.";
-    final String readsDesc =
+    final String
+        readsDesc =
         "The total number of reads of off-heap memory. Only reads of a full object increment this statistic. If only a part of the object is read this statistic is not incremented.";
-    final String maxMemoryDesc =
+    final String
+        maxMemoryDesc =
         "The maximum amount of off-heap memory, in bytes. This is the amount of memory allocated at startup and does not change.";
 
     final String usedMemory = "usedMemory";
@@ -99,19 +100,20 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     final String reads = "reads";
     final String maxMemory = "maxMemory";
 
-    statsType = f.createType(statsTypeName, statsTypeDescription,
-        new StatisticDescriptor[] {f.createLongGauge(usedMemory, usedMemoryDesc, "bytes"),
-            f.createIntCounter(defragmentations, defragmentationDesc, "operations"),
-            f.createIntGauge(defragmentationsInProgress, defragmentationsInProgressDesc,
+    statsType = factory.createType(statsTypeName, statsTypeDescription,
+        new StatisticDescriptor[]{factory.createLongGauge(usedMemory, usedMemoryDesc, "bytes"),
+            factory.createIntCounter(defragmentations, defragmentationDesc, "operations"),
+            factory.createIntGauge(defragmentationsInProgress, defragmentationsInProgressDesc,
                 "operations"),
-            f.createLongCounter(defragmentationTime, defragmentationTimeDesc, "nanoseconds", false),
-            f.createIntGauge(fragmentation, fragmentationDesc, "percentage"),
-            f.createLongGauge(fragments, fragmentsDesc, "fragments"),
-            f.createLongGauge(freeMemory, freeMemoryDesc, "bytes"),
-            f.createIntGauge(largestFragment, largestFragmentDesc, "bytes"),
-            f.createIntGauge(objects, objectsDesc, "objects"),
-            f.createLongCounter(reads, readsDesc, "operations"),
-            f.createLongGauge(maxMemory, maxMemoryDesc, "bytes"),});
+            factory.createLongCounter(defragmentationTime, defragmentationTimeDesc, "nanoseconds",
+                false),
+            factory.createIntGauge(fragmentation, fragmentationDesc, "percentage"),
+            factory.createLongGauge(fragments, fragmentsDesc, "fragments"),
+            factory.createLongGauge(freeMemory, freeMemoryDesc, "bytes"),
+            factory.createIntGauge(largestFragment, largestFragmentDesc, "bytes"),
+            factory.createIntGauge(objects, objectsDesc, "objects"),
+            factory.createLongCounter(reads, readsDesc, "operations"),
+            factory.createLongGauge(maxMemory, maxMemoryDesc, "bytes"),});
 
     usedMemoryId = statsType.nameToId(usedMemory);
     defragmentationId = statsType.nameToId(defragmentations);
@@ -156,8 +158,8 @@ public class OffHeapStorage implements OffHeapMemoryStats {
   }
 
   /**
-   * Validates that the running VM is compatible with off heap storage. Throws a
-   * {@link CacheException} if incompatible.
+   * Validates that the running VM is compatible with off heap storage. Throws a {@link
+   * CacheException} if incompatible.
    */
   @SuppressWarnings("serial")
   private static void validateVmCompatibility() {
@@ -173,21 +175,22 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     } catch (ClassNotFoundException e) {
       throw new CacheException(
           LocalizedStrings.MEMSCALE_JVM_INCOMPATIBLE_WITH_OFF_HEAP.toLocalizedString("product"),
-          e) {};
+          e) {
+      };
     } catch (NoSuchMethodException e) {
       throw new CacheException(
           LocalizedStrings.MEMSCALE_JVM_INCOMPATIBLE_WITH_OFF_HEAP.toLocalizedString("product"),
-          e) {};
+          e) {
+      };
     }
   }
 
   /**
    * Constructs a MemoryAllocator for off-heap storage.
-   *
    * @return MemoryAllocator for off-heap storage
    */
   public static MemoryAllocator createOffHeapStorage(StatisticsFactory sf, long offHeapMemorySize,
-      DistributedSystem system) {
+                                                     DistributedSystem system) {
     if (offHeapMemorySize == 0 || Boolean.getBoolean(InternalLocator.FORCE_LOCATOR_DM_TYPE)) {
       // Checking the FORCE_LOCATOR_DM_TYPE is a quick hack to keep our locator from allocating off
       // heap memory.
@@ -212,7 +215,7 @@ public class OffHeapStorage implements OffHeapMemoryStats {
   }
 
   static MemoryAllocator basicCreateOffHeapStorage(StatisticsFactory sf, long offHeapMemorySize,
-      OutOfOffHeapMemoryListener ooohml) {
+                                                   OutOfOffHeapMemoryListener ooohml) {
     final OffHeapMemoryStats stats = new OffHeapStorage(sf);
 
     // determine off-heap and slab sizes
@@ -264,8 +267,9 @@ public class OffHeapStorage implements OffHeapMemoryStats {
 
   private final Statistics stats;
 
-  private OffHeapStorage(StatisticsFactory f) {
-    this.stats = f.createAtomicStatistics(statsType, statsName);
+  private OffHeapStorage(StatisticsFactory factory) {
+    initializeStats(factory);
+    this.stats = factory.createAtomicStatistics(statsType, statsName);
   }
 
   public void incFreeMemory(long value) {
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 c1a5864..96b8676 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
@@ -17,6 +17,7 @@ package org.apache.geode.internal.statistics;
 import java.io.IOException;
 import java.io.Reader;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -32,31 +33,30 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
  * An abstract standalone implementation of {@link StatisticsFactory}. It can be used in contexts
  * that do not have the GemFire product or in vm's that do not have a distributed system nor a
  * gemfire connection.
- *
  * @since GemFire 7.0
  */
 public abstract class AbstractStatisticsFactory implements StatisticsFactory, StatisticsManager {
 
   private final long id;
   private final String name;
-  private final CopyOnWriteArrayList<Statistics> statsList;
+  private final List<Statistics> statsList = Collections.synchronizedList(new ArrayList<>());
   private int statsListModCount = 0;
   private long statsListUniqueId = 1;
   private final Object statsListUniqueIdLock;
-  private final StatisticsTypeFactory tf;
+  private final StatisticsTypeFactory statisticsTypeFactory;
   private final long startTime;
 
-  public AbstractStatisticsFactory(long id, String name, long startTime) {
+  public AbstractStatisticsFactory(StatisticsFactory statisticsFactory, long id, String name, long startTime) {
     this.id = id;
     this.name = name;
     this.startTime = startTime;
 
-    this.statsList = new CopyOnWriteArrayList<Statistics>();
     this.statsListUniqueIdLock = new Object();
-    this.tf = StatisticsTypeFactoryImpl.singleton();
+    this.statisticsTypeFactory = statisticsFactory;
   }
 
-  public void close() {}
+  public void close() {
+  }
 
   @Override
   public String getName() {
@@ -85,22 +85,14 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
 
   @Override
   public int getStatisticsCount() {
-    int result = 0;
-    List<Statistics> statsList = this.statsList;
-    if (statsList != null) {
-      result = statsList.size();
-    }
-    return result;
+    return 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 statistics : statsList) {
+      if (statistics.getUniqueId() == id) {
+        return statistics;
       }
     }
     throw new RuntimeException(
@@ -110,8 +102,8 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
   @Override
   public boolean statisticsExists(long id) {
     List<Statistics> statsList = this.statsList;
-    for (Statistics s : statsList) {
-      if (s.getUniqueId() == id) {
+    for (Statistics statistics : statsList) {
+      if (statistics.getUniqueId() == id) {
         return true;
       }
     }
@@ -121,7 +113,7 @@ 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[statsList.size()]);
   }
 
   // StatisticsFactory methods
@@ -142,7 +134,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
   }
 
   protected Statistics createOsStatistics(StatisticsType type, String textId, long numericId,
-      int osStatFlags) {
+                                          int osStatFlags) {
     long myUniqueId;
     synchronized (statsListUniqueIdLock) {
       myUniqueId = statsListUniqueId++; // fix for bug 30597
@@ -209,7 +201,9 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
     return null;
   }
 
-  /** for internal use only. Its called by {@link LocalStatisticsImpl#close}. */
+  /**
+   * for internal use only. Its called by {@link LocalStatisticsImpl#close}.
+   */
   @Override
   public void destroyStatistics(Statistics stats) {
     synchronized (statsList) {
@@ -250,82 +244,82 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St
    */
   @Override
   public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) {
-    return tf.createType(name, description, stats);
+    return statisticsTypeFactory.createType(name, description, stats);
   }
 
   @Override
   public StatisticsType findType(String name) {
-    return tf.findType(name);
+    return statisticsTypeFactory.findType(name);
   }
 
   @Override
   public StatisticsType[] createTypesFromXml(Reader reader) throws IOException {
-    return tf.createTypesFromXml(reader);
+    return statisticsTypeFactory.createTypesFromXml(reader);
   }
 
   @Override
   public StatisticDescriptor createIntCounter(String name, String description, String units) {
-    return tf.createIntCounter(name, description, units);
+    return statisticsTypeFactory.createIntCounter(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createLongCounter(String name, String description, String units) {
-    return tf.createLongCounter(name, description, units);
+    return statisticsTypeFactory.createLongCounter(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createDoubleCounter(String name, String description, String units) {
-    return tf.createDoubleCounter(name, description, units);
+    return statisticsTypeFactory.createDoubleCounter(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createIntGauge(String name, String description, String units) {
-    return tf.createIntGauge(name, description, units);
+    return statisticsTypeFactory.createIntGauge(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createLongGauge(String name, String description, String units) {
-    return tf.createLongGauge(name, description, units);
+    return statisticsTypeFactory.createLongGauge(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createDoubleGauge(String name, String description, String units) {
-    return tf.createDoubleGauge(name, description, units);
+    return statisticsTypeFactory.createDoubleGauge(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createIntCounter(String name, String description, String units,
-      boolean largerBetter) {
-    return tf.createIntCounter(name, description, units, largerBetter);
+                                              boolean largerBetter) {
+    return statisticsTypeFactory.createIntCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createLongCounter(String name, String description, String units,
-      boolean largerBetter) {
-    return tf.createLongCounter(name, description, units, largerBetter);
+                                               boolean largerBetter) {
+    return statisticsTypeFactory.createLongCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createDoubleCounter(String name, String description, String units,
-      boolean largerBetter) {
-    return tf.createDoubleCounter(name, description, units, largerBetter);
+                                                 boolean largerBetter) {
+    return statisticsTypeFactory.createDoubleCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createIntGauge(String name, String description, String units,
-      boolean largerBetter) {
-    return tf.createIntGauge(name, description, units, largerBetter);
+                                            boolean largerBetter) {
+    return statisticsTypeFactory.createIntGauge(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createLongGauge(String name, String description, String units,
-      boolean largerBetter) {
-    return tf.createLongGauge(name, description, units, largerBetter);
+                                             boolean largerBetter) {
+    return statisticsTypeFactory.createLongGauge(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createDoubleGauge(String name, String description, String units,
-      boolean largerBetter) {
-    return tf.createDoubleGauge(name, description, units, largerBetter);
+                                               boolean largerBetter) {
+    return statisticsTypeFactory.createDoubleGauge(name, description, units, largerBetter);
   }
 }
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 68e3447..824e9e3 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
@@ -28,11 +28,12 @@ import org.apache.geode.statistics.StatisticsType;
  */
 public class DummyStatisticsFactory implements StatisticsFactory {
 
-  private static final StatisticsTypeFactoryImpl tf =
-      (StatisticsTypeFactoryImpl) StatisticsTypeFactoryImpl.singleton();
+  private final StatisticsFactory factory;
 
   /** Creates a new instance of DummyStatisticsFactory */
-  public DummyStatisticsFactory() {}
+  public DummyStatisticsFactory(StatisticsFactory factory) {
+    this.factory = factory;
+  }
 
   // StatisticsFactory methods
   public Statistics createStatistics(StatisticsType type) {
@@ -81,69 +82,69 @@ public class DummyStatisticsFactory implements StatisticsFactory {
   }
 
   public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) {
-    return tf.createType(name, description, stats);
+    return factory.createType(name, description, stats);
   }
 
   public StatisticsType findType(String name) {
-    return tf.findType(name);
+    return factory.findType(name);
   }
 
   public StatisticsType[] createTypesFromXml(Reader reader) throws IOException {
-    return tf.createTypesFromXml(reader);
+    return factory.createTypesFromXml(reader);
   }
 
   public StatisticDescriptor createIntCounter(String name, String description, String units) {
-    return tf.createIntCounter(name, description, units);
+    return factory.createIntCounter(name, description, units);
   }
 
   public StatisticDescriptor createLongCounter(String name, String description, String units) {
-    return tf.createLongCounter(name, description, units);
+    return factory.createLongCounter(name, description, units);
   }
 
   public StatisticDescriptor createDoubleCounter(String name, String description, String units) {
-    return tf.createDoubleCounter(name, description, units);
+    return factory.createDoubleCounter(name, description, units);
   }
 
   public StatisticDescriptor createIntGauge(String name, String description, String units) {
-    return tf.createIntGauge(name, description, units);
+    return factory.createIntGauge(name, description, units);
   }
 
   public StatisticDescriptor createLongGauge(String name, String description, String units) {
-    return tf.createLongGauge(name, description, units);
+    return factory.createLongGauge(name, description, units);
   }
 
   public StatisticDescriptor createDoubleGauge(String name, String description, String units) {
-    return tf.createDoubleGauge(name, description, units);
+    return factory.createDoubleGauge(name, description, units);
   }
 
   public StatisticDescriptor createIntCounter(String name, String description, String units,
       boolean largerBetter) {
-    return tf.createIntCounter(name, description, units, largerBetter);
+    return factory.createIntCounter(name, description, units, largerBetter);
   }
 
   public StatisticDescriptor createLongCounter(String name, String description, String units,
       boolean largerBetter) {
-    return tf.createLongCounter(name, description, units, largerBetter);
+    return factory.createLongCounter(name, description, units, largerBetter);
   }
 
   public StatisticDescriptor createDoubleCounter(String name, String description, String units,
       boolean largerBetter) {
-    return tf.createDoubleCounter(name, description, units, largerBetter);
+    return factory.createDoubleCounter(name, description, units, largerBetter);
   }
 
   public StatisticDescriptor createIntGauge(String name, String description, String units,
       boolean largerBetter) {
-    return tf.createIntGauge(name, description, units, largerBetter);
+    return factory.createIntGauge(name, description, units, largerBetter);
   }
 
   public StatisticDescriptor createLongGauge(String name, String description, String units,
       boolean largerBetter) {
-    return tf.createLongGauge(name, description, units, largerBetter);
+    return factory.createLongGauge(name, description, units, largerBetter);
   }
 
   public StatisticDescriptor createDoubleGauge(String name, String description, String units,
       boolean largerBetter) {
-    return tf.createDoubleGauge(name, description, units, largerBetter);
+    return factory.createDoubleGauge(name, description, units, largerBetter);
   }
 
 }
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 439f110..2dbcfbf 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,6 +25,9 @@ import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.logging.log4j.Logger;
 
+import org.apache.geode.CancelCriterion;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.statistics.Statistics;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
@@ -39,6 +42,7 @@ import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 import org.apache.geode.internal.logging.log4j.LogMarker;
 import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
 import org.apache.geode.internal.statistics.platform.ProcessStats;
+import org.apache.geode.statistics.StatisticsFactory;
 
 /**
  * GemFireStatSampler adds listeners and rolling archives to HostStatSampler.
@@ -59,18 +63,22 @@ public class GemFireStatSampler extends HostStatSampler {
   private final Map<InternalDistributedMember, List<RemoteStatListenerImpl>> recipientToListeners =
       new HashMap<InternalDistributedMember, List<RemoteStatListenerImpl>>();
 
-  private final InternalDistributedSystem internalDistributedSystem;
+  private final DistributionConfig distributionConfig;
+  private final InternalDistributedSystemStats internalDistributedSystemStats;
+  private final DistributionManager distributionManager;
 
   private int nextListenerId = 1;
   private ProcessStats processStats = null;
+  private Statistics systemStats = null;
 
   ////////////////////// Constructors //////////////////////
 
-  public GemFireStatSampler(InternalDistributedSystem internalDistributedSystem) {
-    super(internalDistributedSystem.getCancelCriterion(),
-        new StatSamplerStats(internalDistributedSystem.getInternalDistributedSystemStats(),
-            internalDistributedSystem.getId()));
-    this.internalDistributedSystem = internalDistributedSystem;
+  public GemFireStatSampler(long internalDistributedId,DistributionConfig distributionConfig, CancelCriterion cancelCriterion,
+                            InternalDistributedSystemStats internalDistributedSystemStats,DistributionManager distributionManager) {
+    super(cancelCriterion, new StatSamplerStats(internalDistributedSystemStats, internalDistributedId));
+    this.distributionConfig = distributionConfig;
+    this.distributionManager = distributionManager;
+    this.internalDistributedSystemStats = internalDistributedSystemStats;
   }
 
   /**
@@ -98,12 +106,9 @@ public class GemFireStatSampler extends HostStatSampler {
       RemoteStatListenerImpl sl =
           RemoteStatListenerImpl.create(result, recipient, resourceId, statName, this);
       listeners.put(result, sl);
-      List<RemoteStatListenerImpl> l = recipientToListeners.get(recipient);
-      if (l == null) {
-        l = new ArrayList<RemoteStatListenerImpl>();
-        recipientToListeners.put(recipient, l);
-      }
-      l.add(sl);
+      List<RemoteStatListenerImpl>
+          statListeners = recipientToListeners.computeIfAbsent(recipient, k -> new ArrayList<>());
+      statListeners.add(sl);
     }
     return result;
   }
@@ -132,11 +137,11 @@ public class GemFireStatSampler extends HostStatSampler {
   }
 
   public void addLocalStatListener(LocalStatListener l, Statistics stats, String statName) {
-    LocalStatListenerImpl sl = null;
+    LocalStatListenerImpl localStatListener;
     synchronized (LocalStatListenerImpl.class) {
-      sl = LocalStatListenerImpl.create(l, stats, statName);
+      localStatListener = LocalStatListenerImpl.create(l, stats, statName);
     }
-    this.localListeners.put(sl, Boolean.TRUE);
+    this.localListeners.put(localStatListener, Boolean.TRUE);
   }
 
   public boolean removeLocalStatListener(LocalStatListener listener) {
@@ -158,16 +163,16 @@ public class GemFireStatSampler extends HostStatSampler {
 
   @Override
   public File getArchiveFileName() {
-    return this.internalDistributedSystem.getConfig().getStatisticArchiveFile();
+    return this.distributionConfig.getStatisticArchiveFile();
   }
 
   @Override
   public long getArchiveFileSizeLimit() {
     if (fileSizeLimitInKB()) {
       // use KB instead of MB to speed up rolling for testing
-      return ((long) this.internalDistributedSystem.getConfig().getArchiveFileSizeLimit()) * (1024);
+      return ((long) this.distributionConfig.getArchiveFileSizeLimit()) * (1024);
     } else {
-      return ((long) this.internalDistributedSystem.getConfig().getArchiveFileSizeLimit()) * (1024
+      return ((long) this.distributionConfig.getArchiveFileSizeLimit()) * (1024
           * 1024);
     }
   }
@@ -176,10 +181,10 @@ public class GemFireStatSampler extends HostStatSampler {
   public long getArchiveDiskSpaceLimit() {
     if (fileSizeLimitInKB()) {
       // use KB instead of MB to speed up removal for testing
-      return ((long) this.internalDistributedSystem.getConfig().getArchiveDiskSpaceLimit())
+      return ((long) this.distributionConfig.getArchiveDiskSpaceLimit())
           * (1024);
     } else {
-      return ((long) this.internalDistributedSystem.getConfig().getArchiveDiskSpaceLimit()) * (1024
+      return ((long) this.distributionConfig.getArchiveDiskSpaceLimit()) * (1024
           * 1024);
     }
   }
@@ -192,16 +197,14 @@ public class GemFireStatSampler extends HostStatSampler {
         return;
       }
       long timeStamp = System.currentTimeMillis();
-      Iterator<Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>>> it1 =
-          recipientToListeners.entrySet().iterator();
-      while (it1.hasNext()) {
+      for (Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>> internalDistributedMemberListEntry : recipientToListeners
+          .entrySet()) {
         if (stopRequested()) {
           return;
         }
-        Map.Entry<InternalDistributedMember, List<RemoteStatListenerImpl>> me = it1.next();
-        List<RemoteStatListenerImpl> l = me.getValue();
+        List<RemoteStatListenerImpl> l = internalDistributedMemberListEntry.getValue();
         if (l.size() > 0) {
-          InternalDistributedMember recipient = (InternalDistributedMember) me.getKey();
+          InternalDistributedMember recipient = internalDistributedMemberListEntry.getKey();
           StatListenerMessage msg = StatListenerMessage.create(timeStamp, l.size());
           msg.setRecipient(recipient);
           for (RemoteStatListenerImpl statListener : l) {
@@ -213,7 +216,7 @@ public class GemFireStatSampler extends HostStatSampler {
               msg.addChange(-statListener.getListenerId(), 0);
             }
           }
-          this.internalDistributedSystem.getDistributionManager().putOutgoing(msg);
+          this.distributionManager.putOutgoing(msg);
         }
       }
     }
@@ -221,22 +224,26 @@ public class GemFireStatSampler extends HostStatSampler {
 
   @Override
   protected int getSampleRate() {
-    return this.internalDistributedSystem.getConfig().getStatisticSampleRate();
+    return this.distributionConfig.getStatisticSampleRate();
   }
 
   @Override
   public boolean isSamplingEnabled() {
-    return this.internalDistributedSystem.getConfig().getStatisticSamplingEnabled();
+    return this.distributionConfig.getStatisticSamplingEnabled();
   }
 
   @Override
   protected StatisticsManager getStatisticsManager() {
-    return this.internalDistributedSystem.getInternalDistributedSystemStats();
+    return this.internalDistributedSystemStats;
   }
 
   @Override
   protected OsStatisticsFactory getOsStatisticsFactory() {
-    return this.internalDistributedSystem.getInternalDistributedSystemStats();
+    return this.internalDistributedSystemStats;
+  }
+
+  private StatisticsFactory getStatisticsFactory() {
+    return internalDistributedSystemStats;
   }
 
   @Override
@@ -260,13 +267,13 @@ public class GemFireStatSampler extends HostStatSampler {
           logger.error(LogMarker.STATISTICS_MARKER, LocalizedMessage.create(
               LocalizedStrings.GemFireStatSampler_OS_STATISTICS_FAILED_TO_INITIALIZE_PROPERLY_SOME_STATS_MAY_BE_MISSING_SEE_BUGNOTE_37160));
         }
-        HostStatHelper.newSystem(getOsStatisticsFactory());
+        this.systemStats = HostStatHelper.newSystem(getStatisticsFactory(),getOsStatisticsFactory());
         String statName = getStatisticsManager().getName();
         if (statName == null || statName.length() == 0) {
           statName = "javaApp" + getStatisticsManager().getId();
         }
         Statistics stats =
-            HostStatHelper.newProcess(getOsStatisticsFactory(), id, statName + "-proc");
+            HostStatHelper.newProcess(getStatisticsFactory(),getOsStatisticsFactory(), id, statName + "-proc");
         this.processStats = HostStatHelper.newProcessStats(stats);
       }
     }
@@ -285,12 +292,11 @@ public class GemFireStatSampler extends HostStatSampler {
       return;
     }
     HostStatHelper.readyRefreshOSStats();
-    Iterator<Statistics> it = l.iterator();
-    while (it.hasNext()) {
+    for (Statistics aL : l) {
       if (stopRequested()) {
         return;
       }
-      StatisticsImpl s = (StatisticsImpl) it.next();
+      StatisticsImpl s = (StatisticsImpl) aL;
       if (s.usesSystemCalls()) {
         HostStatHelper.refresh((LocalStatisticsImpl) s);
       }
@@ -325,10 +331,14 @@ public class GemFireStatSampler extends HostStatSampler {
     return result;
   }
 
+  public Statistics getSystemStats() {
+    return systemStats;
+  }
+
   protected abstract static class StatListenerImpl {
     protected Statistics stats;
     protected StatisticDescriptorImpl stat;
-    protected boolean oldValueInitialized = false;
+    boolean oldValueInitialized = false;
     protected long oldValue;
 
     public long getStatId() {
@@ -350,7 +360,7 @@ public class GemFireStatSampler extends HostStatSampler {
     }
 
     static LocalStatListenerImpl create(LocalStatListener l, Statistics stats, String statName) {
-      LocalStatListenerImpl result = null;
+      LocalStatListenerImpl result;
       StatisticDescriptorImpl stat = (StatisticDescriptorImpl) stats.nameToDescriptor(statName);
       switch (stat.getTypeCode()) {
         case StatisticDescriptorImpl.BYTE:
@@ -378,7 +388,7 @@ public class GemFireStatSampler extends HostStatSampler {
      * Checks to see if the value of the stat has changed. If it has then the local listener is
      * fired
      */
-    public void checkForChange() {
+    void checkForChange() {
       long currentValue = stats.getRawBits(stat);
       if (oldValueInitialized) {
         if (currentValue == oldValue) {
@@ -437,7 +447,7 @@ public class GemFireStatSampler extends HostStatSampler {
       }
     }
 
-    public int getListenerId() {
+    int getListenerId() {
       return this.listenerId;
     }
 
@@ -448,7 +458,7 @@ public class GemFireStatSampler extends HostStatSampler {
     static RemoteStatListenerImpl create(int listenerId, InternalDistributedMember recipient,
                                          long resourceId, String statName,
                                          HostStatSampler sampler) {
-      RemoteStatListenerImpl result = null;
+      RemoteStatListenerImpl result;
       Statistics stats = sampler.getStatisticsManager().findStatistics(resourceId);
       StatisticDescriptorImpl stat = (StatisticDescriptorImpl) stats.nameToDescriptor(statName);
       switch (stat.getTypeCode()) {
@@ -480,7 +490,7 @@ public class GemFireStatSampler extends HostStatSampler {
      * Checks to see if the value of the stat has changed. If it has then it adds that change to the
      * specified message.
      */
-    public void checkForChange(StatListenerMessage msg) {
+    void checkForChange(StatListenerMessage msg) {
       long currentValue = stats.getRawBits(stat);
       if (oldValueInitialized) {
         if (currentValue == oldValue) {
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 c7d3e12..f5d6df6 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
@@ -33,6 +33,7 @@ import org.apache.geode.internal.statistics.platform.SolarisProcessStats;
 import org.apache.geode.internal.statistics.platform.SolarisSystemStats;
 import org.apache.geode.internal.statistics.platform.WindowsProcessStats;
 import org.apache.geode.internal.statistics.platform.WindowsSystemStats;
+import org.apache.geode.statistics.StatisticsFactory;
 
 /**
  * Provides native methods which fetch operating system statistics.
@@ -184,20 +185,20 @@ public class HostStatHelper {
    * Creates and returns a {@link Statistics} with the given pid and name. The resource's stats will
    * contain a snapshot of the current statistic values for the specified process.
    */
-  public static Statistics newProcess(OsStatisticsFactory f, long pid, String name) {
+  public static Statistics newProcess(StatisticsFactory statisticsFactory, OsStatisticsFactory factory, long pid, String name) {
     Statistics stats;
     switch (osCode) {
       case SOLARIS_CODE:
-        stats = f.createOsStatistics(SolarisProcessStats.getType(), name, pid, PROCESS_STAT_FLAG);
+        stats = factory.createOsStatistics(new SolarisProcessStats(statisticsFactory).getType(), name, pid, PROCESS_STAT_FLAG);
         break;
       case LINUX_CODE:
-        stats = f.createOsStatistics(LinuxProcessStats.getType(), name, pid, PROCESS_STAT_FLAG);
+        stats = factory.createOsStatistics(new LinuxProcessStats(statisticsFactory).getType(), name, pid, PROCESS_STAT_FLAG);
         break;
       case OSX_CODE:
-        stats = f.createOsStatistics(OSXProcessStats.getType(), name, pid, PROCESS_STAT_FLAG);
+        stats = factory.createOsStatistics(new OSXProcessStats(statisticsFactory).getType(), name, pid, PROCESS_STAT_FLAG);
         break;
       case WINDOWS_CODE:
-        stats = f.createOsStatistics(WindowsProcessStats.getType(), name, pid, PROCESS_STAT_FLAG);
+        stats = factory.createOsStatistics(new WindowsProcessStats(statisticsFactory).getType(), name, pid, PROCESS_STAT_FLAG);
         break;
       default:
         throw new InternalGemFireException(
@@ -231,7 +232,7 @@ public class HostStatHelper {
       default:
         throw new InternalGemFireException(
             LocalizedStrings.HostStatHelper_UNHANDLED_OSCODE_0_HOSTSTATHELPERNEWPROCESSSTATS
-                .toLocalizedString(Integer.valueOf(osCode)));
+                .toLocalizedString(osCode));
     }
   }
 
@@ -239,33 +240,34 @@ public class HostStatHelper {
    * Creates and returns a {@link Statistics} with the current machine's stats. The resource's stats
    * will contain a snapshot of the current statistic values for the local machine.
    */
-  static void newSystem(OsStatisticsFactory f) {
+  static Statistics newSystem(StatisticsFactory statisticsFactory, OsStatisticsFactory factory) {
     Statistics stats;
     switch (osCode) {
       case SOLARIS_CODE:
-        stats = f.createOsStatistics(SolarisSystemStats.getType(), getHostSystemName(),
+        stats = factory.createOsStatistics(new SolarisSystemStats(statisticsFactory).getType(), getHostSystemName(),
             getHostSystemId(), SYSTEM_STAT_FLAG);
         break;
       case LINUX_CODE:
-        stats = f.createOsStatistics(LinuxSystemStats.getType(), getHostSystemName(),
+        stats = factory.createOsStatistics(new LinuxSystemStats(statisticsFactory).getType(), getHostSystemName(),
             getHostSystemId(), SYSTEM_STAT_FLAG);
         break;
       case WINDOWS_CODE:
-        stats = f.createOsStatistics(WindowsSystemStats.getType(), getHostSystemName(),
+        stats = factory.createOsStatistics(new WindowsSystemStats(statisticsFactory).getType(), getHostSystemName(),
             getHostSystemId(), SYSTEM_STAT_FLAG);
         break;
       case OSX_CODE:
-        stats = f.createOsStatistics(OSXSystemStats.getType(), getHostSystemName(),
+        stats = factory.createOsStatistics(new OSXSystemStats(statisticsFactory).getType(), getHostSystemName(),
             getHostSystemId(), SYSTEM_STAT_FLAG);
         break;
       default:
         throw new InternalGemFireException(
             LocalizedStrings.HostStatHelper_UNHANDLED_OSCODE_0_HOSTSTATHELPERNEWSYSTEM
-                .toLocalizedString(Integer.valueOf(osCode)));
+                .toLocalizedString(osCode));
     }
     if (stats instanceof LocalStatisticsImpl) {
       refreshSystem((LocalStatisticsImpl) stats);
     } // otherwise its a Dummy implementation so do nothing
+    return stats;
   }
 
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java
index 221d3c1..51ab5b9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/InternalDistributedSystemStats.java
@@ -7,8 +7,9 @@ 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 java.util.concurrent.atomic.LongAdder;
 
+import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.cache.execute.FunctionServiceStats;
 import org.apache.geode.internal.cache.execute.FunctionStats;
@@ -23,20 +24,38 @@ import org.apache.geode.statistics.StatisticsTypeFactory;
 public class InternalDistributedSystemStats
     implements StatisticsFactory, StatisticsManager, OsStatisticsFactory {
 
+  /**
+   * The sampler for this DistributedSystem.
+   */
+  private GemFireStatSampler sampler = null;
+
   private final CopyOnWriteArrayList<Statistics> statsList = new CopyOnWriteArrayList<>();
   private int statsListModCount = 0;
-  private AtomicLong statsListUniqueId = new AtomicLong(1);
+  private LongAdder statsListUniqueId = new LongAdder();
 
   // 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 final ConcurrentHashMap<String, FunctionStats> functionExecutionStatsMap = new ConcurrentHashMap<>();
   private FunctionServiceStats functionServiceStats;
 
   private final boolean statsDisabled;
 
-  public InternalDistributedSystemStats(boolean statsDisabled) {
+  // StatisticsTypeFactory methods
+  private final StatisticsTypeFactory statisticsTypeFactory;
+
+  public InternalDistributedSystemStats(boolean statsDisabled,DistributionConfig distributionConfig,
+                                        InternalDistributedSystem internalDistributedSystem,
+                                        StatisticsTypeFactory statisticsTypeFactory) {
+    this.statisticsTypeFactory = statisticsTypeFactory;
     this.statsDisabled = statsDisabled;
     this.functionServiceStats = new FunctionServiceStats(this, "FunctionExecution");
+    if (!statsDisabled) {
+      this.sampler = new GemFireStatSampler(internalDistributedSystem.getId(),distributionConfig,
+          internalDistributedSystem.getCancelCriterion(),this,
+          internalDistributedSystem.getDistributionManager());
+      this.sampler.start();
+
+    }
   }
 
   @Override
@@ -72,9 +91,9 @@ public class InternalDistributedSystemStats
   @Override
   public Statistics findStatistics(long id) {
     List<Statistics> statsList = this.statsList;
-    for (Statistics s : statsList) {
-      if (s.getUniqueId() == id) {
-        return s;
+    for (Statistics statistics : statsList) {
+      if (statistics.getUniqueId() == id) {
+        return statistics;
       }
     }
     throw new RuntimeException(
@@ -84,8 +103,8 @@ public class InternalDistributedSystemStats
   @Override
   public boolean statisticsExists(long id) {
     List<Statistics> statsList = this.statsList;
-    for (Statistics s : statsList) {
-      if (s.getUniqueId() == id) {
+    for (Statistics statistics : statsList) {
+      if (statistics.getUniqueId() == id) {
         return true;
       }
     }
@@ -116,9 +135,9 @@ public class InternalDistributedSystemStats
     if (this.statsDisabled) {
       return new DummyStatisticsImpl(type, textId, numericId);
     }
-    long myUniqueId = statsListUniqueId.getAndIncrement();
+    statsListUniqueId.increment();
     Statistics result =
-        new LocalStatisticsImpl(type, textId, numericId, myUniqueId, false, osStatFlags, this);
+        new LocalStatisticsImpl(type, textId, numericId, statsListUniqueId.longValue(), false, osStatFlags, this);
     synchronized (statsList) {
       statsList.add(result);
       statsListModCount++;
@@ -127,42 +146,42 @@ public class InternalDistributedSystemStats
   }
 
   public Statistics[] findStatisticsByType(final StatisticsType type) {
-    final ArrayList hits = new ArrayList();
+    final ArrayList<Statistics> hits = new ArrayList<>();
     visitStatistics(vistorStatistic -> {
       if (type == vistorStatistic.getType()) {
         hits.add(vistorStatistic);
       }
     });
     Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[]) hits.toArray(result);
+    return hits.toArray(result);
   }
 
   public Statistics[] findStatisticsByTextId(final String textId) {
-    final ArrayList hits = new ArrayList();
+    final ArrayList<Statistics> hits = new ArrayList<>();
     visitStatistics(vistorStatistic -> {
       if (vistorStatistic.getTextId().equals(textId)) {
         hits.add(vistorStatistic);
       }
     });
     Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[]) hits.toArray(result);
+    return hits.toArray(result);
   }
 
   public Statistics[] findStatisticsByNumericId(final long numericId) {
-    final ArrayList hits = new ArrayList();
+    final ArrayList<Statistics> hits = new ArrayList<>();
     visitStatistics(vistorStatistic -> {
       if (numericId == vistorStatistic.getNumericId()) {
         hits.add(vistorStatistic);
       }
     });
     Statistics[] result = new Statistics[hits.size()];
-    return (Statistics[]) hits.toArray(result);
+    return hits.toArray(result);
   }
 
   public Statistics findStatisticsByUniqueId(final long uniqueId) {
-    for (Statistics s : this.statsList) {
-      if (uniqueId == s.getUniqueId()) {
-        return s;
+    for (Statistics statistics : this.statsList) {
+      if (uniqueId == statistics.getUniqueId()) {
+        return statistics;
       }
     }
     return null;
@@ -192,8 +211,8 @@ public class InternalDistributedSystemStats
       return new DummyStatisticsImpl(type, textId, numericId);
     }
 
-    long myUniqueId = statsListUniqueId.getAndIncrement();
-    Statistics result = StatisticsImpl.createAtomicNoOS(type, textId, numericId, myUniqueId, this);
+    statsListUniqueId.increment();
+    Statistics result = StatisticsImpl.createAtomicNoOS(type, textId, numericId,statsListUniqueId.longValue(), this);
     synchronized (statsList) {
       statsList.add(result);
       statsListModCount++;
@@ -201,92 +220,88 @@ public class InternalDistributedSystemStats
     return result;
   }
 
-
-  // StatisticsTypeFactory methods
-  private static final StatisticsTypeFactory tf = StatisticsTypeFactoryImpl.singleton();
-
   /**
    * Creates or finds a StatisticType for the given shared class.
    */
   @Override
   public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) {
-    return tf.createType(name, description, stats);
+    return statisticsTypeFactory.createType(name, description, stats);
   }
 
   @Override
   public StatisticsType findType(String name) {
-    return tf.findType(name);
+    return statisticsTypeFactory.findType(name);
   }
 
   @Override
   public StatisticsType[] createTypesFromXml(Reader reader) throws IOException {
-    return tf.createTypesFromXml(reader);
+    return statisticsTypeFactory.createTypesFromXml(reader);
   }
 
   @Override
   public StatisticDescriptor createIntCounter(String name, String description, String units) {
-    return tf.createIntCounter(name, description, units);
+    return statisticsTypeFactory.createIntCounter(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createLongCounter(String name, String description, String units) {
-    return tf.createLongCounter(name, description, units);
+    return statisticsTypeFactory.createLongCounter(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createDoubleCounter(String name, String description, String units) {
-    return tf.createDoubleCounter(name, description, units);
+    return statisticsTypeFactory.createDoubleCounter(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createIntGauge(String name, String description, String units) {
-    return tf.createIntGauge(name, description, units);
+    return statisticsTypeFactory.createIntGauge(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createLongGauge(String name, String description, String units) {
-    return tf.createLongGauge(name, description, units);
+    return statisticsTypeFactory.createLongGauge(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createDoubleGauge(String name, String description, String units) {
-    return tf.createDoubleGauge(name, description, units);
+    return statisticsTypeFactory.createDoubleGauge(name, description, units);
   }
 
   @Override
   public StatisticDescriptor createIntCounter(String name, String description, String units,
                                               boolean largerBetter) {
-    return tf.createIntCounter(name, description, units, largerBetter);
+    return statisticsTypeFactory.createIntCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createLongCounter(String name, String description, String units,
                                                boolean largerBetter) {
-    return tf.createLongCounter(name, description, units, largerBetter);
+    return statisticsTypeFactory.createLongCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createDoubleCounter(String name, String description, String units,
                                                  boolean largerBetter) {
-    return tf.createDoubleCounter(name, description, units, largerBetter);
+    return statisticsTypeFactory.createDoubleCounter(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createIntGauge(String name, String description, String units,
                                             boolean largerBetter) {
-    return tf.createIntGauge(name, description, units, largerBetter);
+    return statisticsTypeFactory.createIntGauge(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createLongGauge(String name, String description, String units,
                                              boolean largerBetter) {
-    return tf.createLongGauge(name, description, units, largerBetter);
+    return statisticsTypeFactory.createLongGauge(name, description, units, largerBetter);
   }
 
   @Override
   public StatisticDescriptor createDoubleGauge(String name, String description, String units,
                                                boolean largerBetter) {
-    return tf.createDoubleGauge(name, description, units, largerBetter);
+    return statisticsTypeFactory.createDoubleGauge(name, description, units, largerBetter);
   }
 
   public FunctionStats getFunctionStats(String textId) {
@@ -304,13 +319,6 @@ public class InternalDistributedSystemStats
 
 
   public FunctionServiceStats getFunctionServiceStats() {
-    if (functionServiceStats == null) {
-      synchronized (this) {
-        if (functionServiceStats == null) {
-
-        }
-      }
-    }
     return functionServiceStats;
   }
 
@@ -328,7 +336,7 @@ public class InternalDistributedSystemStats
     return functionExecutionStatsMap.keySet();
   }
 
-  public void closeFunctionStats() {
+  public void closeStats() {
     // closing the Aggregate stats
     if (functionServiceStats != null) {
       functionServiceStats.close();
@@ -337,5 +345,11 @@ public class InternalDistributedSystemStats
     for (FunctionStats functionstats : functionExecutionStatsMap.values()) {
       functionstats.close();
     }
+
+    this.sampler.stop();
+  }
+
+  public GemFireStatSampler getStatSampler() {
+    return this.sampler;
   }
 }
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 44cae2c..d8264ea 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
@@ -42,7 +42,7 @@ public class LocalStatisticsFactory extends AbstractStatisticsFactory
   private final boolean statsDisabled;
 
   public LocalStatisticsFactory(CancelCriterion stopper) {
-    super(initId(), initName(), initStartTime());
+    super((StatisticsFactory) new StatisticsTypeFactoryImpl(),initId(), initName(), initStartTime());
 
     this.statsDisabled = Boolean.getBoolean(STATS_DISABLE_NAME_PROPERTY);
     if (statsDisabled) {
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 5446868..63228da 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
@@ -33,39 +33,39 @@ public class StatSamplerStats {
   public static final String SAMPLE_CALLBACK_ERRORS = "sampleCallbackErrors"; // int
   public static final String SAMPLE_CALLBACK_DURATION = "sampleCallbackDuration"; // long
 
-  private static final StatisticsType samplerType;
-  private static final int sampleCountId;
-  private static final int sampleTimeId;
-  private static final int delayDurationId;
-  private static final int statResourcesId;
-  private static final int jvmPausesId;
-  private static final int sampleCallbacksId;
-  private static final int sampleCallbackErrorsId;
-  private static final int sampleCallbackDurationId;
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    samplerType = f.createType("StatSampler", "Stats on the statistic sampler.",
+  private  StatisticsType samplerType;
+  private int sampleCountId;
+  private int sampleTimeId;
+  private int delayDurationId;
+  private int statResourcesId;
+  private int jvmPausesId;
+  private int sampleCallbacksId;
+  private int sampleCallbackErrorsId;
+  private int sampleCallbackDurationId;
+  
+  private void initializeStats(StatisticsFactory factory) {
+    samplerType = factory.createType("StatSampler", "Stats on the statistic sampler.",
         new StatisticDescriptor[] {
-            f.createIntCounter(SAMPLE_COUNT, "Total number of samples taken by this sampler.",
+            factory.createIntCounter(SAMPLE_COUNT, "Total number of samples taken by this sampler.",
                 "samples", false),
-            f.createLongCounter(SAMPLE_TIME, "Total amount of time spent taking samples.",
+            factory.createLongCounter(SAMPLE_TIME, "Total amount of time spent taking samples.",
                 "milliseconds", false),
-            f.createIntGauge(DELAY_DURATION,
+            factory.createIntGauge(DELAY_DURATION,
                 "Actual duration of sampling delay taken before taking this sample.",
                 "milliseconds", false),
-            f.createIntGauge(STAT_RESOURCES,
+            factory.createIntGauge(STAT_RESOURCES,
                 "Current number of statistic resources being sampled by this sampler.", "resources",
                 false),
-            f.createIntCounter(JVM_PAUSES,
+            factory.createIntCounter(JVM_PAUSES,
                 "Total number of JVM pauses (which may or may not be full GC pauses) detected by this sampler. A JVM pause is defined as a system event which kept the statistics sampler thread from sampling for 3000 or more milliseconds. This threshold can be customized by setting the system property gemfire.statSamplerDelayThreshold (units are milliseconds).",
                 "jvmPauses", false),
-            f.createIntGauge(SAMPLE_CALLBACKS,
+            factory.createIntGauge(SAMPLE_CALLBACKS,
                 "Current number of statistics that are sampled using callbacks.", "resources",
                 false),
-            f.createIntCounter(SAMPLE_CALLBACK_ERRORS,
+            factory.createIntCounter(SAMPLE_CALLBACK_ERRORS,
                 "Total number of exceptions thrown by callbacks when performing sampling", "errors",
                 false),
-            f.createLongCounter(SAMPLE_CALLBACK_DURATION,
+            factory.createLongCounter(SAMPLE_CALLBACK_DURATION,
                 "Total amount of time invoking sampling callbacks", "milliseconds", false),});
     sampleCountId = samplerType.nameToId(SAMPLE_COUNT);
     sampleTimeId = samplerType.nameToId(SAMPLE_TIME);
@@ -79,8 +79,9 @@ public class StatSamplerStats {
 
   private final Statistics samplerStats;
 
-  public StatSamplerStats(StatisticsFactory f, long id) {
-    this.samplerStats = f.createStatistics(samplerType, "statSampler", id);
+  public StatSamplerStats(StatisticsFactory factory, long id) {
+    initializeStats(factory);
+    this.samplerStats = factory.createStatistics(samplerType, "statSampler", id);
   }
 
   public void tookSample(long nanosSpentWorking, int statResources, long nanosSpentSleeping) {
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 e98ab0e..15b3d2e 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
@@ -278,7 +278,7 @@ public class StatisticDescriptorImpl implements StatisticDescriptor {
       default:
         throw new RuntimeException(
             LocalizedStrings.StatisticsImpl_UNEXPECTED_STAT_DESCRIPTOR_TYPE_CODE_0
-                .toLocalizedString(Byte.valueOf(this.typeCode)));
+                .toLocalizedString(this.typeCode));
     }
   }
 
@@ -315,22 +315,20 @@ public class StatisticDescriptorImpl implements StatisticDescriptor {
     if (this.typeCode != INT) {
       throw new IllegalArgumentException(
           LocalizedStrings.StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_AN_INT
-              .toLocalizedString(new Object[] {getName(), Integer.valueOf(getId()),
-                  StatisticDescriptorImpl.getTypeCodeName(getTypeCode())}));
+              .toLocalizedString(getName(), getId(),
+                  StatisticDescriptorImpl.getTypeCodeName(getTypeCode())));
     }
     return this.id;
   }
 
   public int checkLong() {
     if (this.typeCode != LONG) {
-      StringBuffer sb = new StringBuffer();
-      sb.append("The statistic " + getName() + " with id ");
-      sb.append(getId());
-      sb.append(" is of type ");
-      sb.append(StatisticDescriptorImpl.getTypeCodeName(getTypeCode()));
-
-      sb.append(" and it was expected to be a long");
-      throw new IllegalArgumentException(sb.toString());
+      String sb = ("The statistic " + getName() + " with id ")
+          + getId()
+          + " is of type "
+          + StatisticDescriptorImpl.getTypeCodeName(getTypeCode())
+          + " and it was expected to be a long";
+      throw new IllegalArgumentException(sb);
     }
     return this.id;
   }
@@ -339,8 +337,8 @@ public class StatisticDescriptorImpl implements StatisticDescriptor {
     if (this.typeCode != DOUBLE) {
       throw new IllegalArgumentException(
           LocalizedStrings.StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_A_DOUBLE
-              .toLocalizedString(new Object[] {getName(), Integer.valueOf(getId()),
-                  StatisticDescriptorImpl.getTypeCodeName(getTypeCode())}));
+              .toLocalizedString(getName(), getId(),
+                  StatisticDescriptorImpl.getTypeCodeName(getTypeCode())));
     }
     return this.id;
   }
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 db850a3..c743ec8 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
@@ -25,7 +25,7 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
 
 /**
  * The implementation of {@link StatisticsTypeFactory}. Each VM can any have a single instance of
- * this class which can be accessed by calling {@link #singleton()}.
+ * this class.
  *
  * @see <A href="package-summary.html#statistics">Package introduction</A>
  *
@@ -34,26 +34,23 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
  *
  */
 public class StatisticsTypeFactoryImpl implements StatisticsTypeFactory {
-  // static fields
-  private static final StatisticsTypeFactoryImpl singleton = new StatisticsTypeFactoryImpl();
+//   static fields
+//  private static final StatisticsTypeFactoryImpl singleton = new StatisticsTypeFactoryImpl();
 
   // static methods
   /**
    * Returns the single instance of this class.
    */
-  public static StatisticsTypeFactory singleton() {
-    return singleton;
-  }
+//  public static StatisticsTypeFactory singleton() {
+//    return singleton;
+//  }
 
-  protected static void clear() {
-    singleton.statTypes.clear();
+  protected void clear() {
+    this.statTypes.clear();
   }
 
-  // constructors
-  private StatisticsTypeFactoryImpl() {}
-
   // instance fields
-  private final HashMap statTypes = new HashMap();
+  private final HashMap<String,StatisticsType> statTypes = new HashMap<>();
 
   // instance methods
   /**
@@ -62,8 +59,8 @@ public class StatisticsTypeFactoryImpl implements StatisticsTypeFactory {
    *
    * @throws IllegalArgumentException if the type already exists and is not equal to the new type
    */
-  public StatisticsType addType(StatisticsType t) {
-    StatisticsType result = t;
+  private StatisticsType addType(StatisticsType statisticsType) {
+    StatisticsType result = statisticsType;
     synchronized (this.statTypes) {
       StatisticsType currentValue = findType(result.getName());
       if (currentValue == null) {
@@ -84,7 +81,7 @@ public class StatisticsTypeFactoryImpl implements StatisticsTypeFactory {
   }
 
   public StatisticsType findType(String name) {
-    return (StatisticsType) this.statTypes.get(name);
+    return this.statTypes.get(name);
   }
 
   public StatisticsType[] createTypesFromXml(Reader reader) throws IOException {
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 228b590..4dce01f 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
@@ -24,24 +24,24 @@ import org.apache.geode.statistics.StatisticsTypeFactory;
  * Statistics related to a Java VM. Currently they all come from {@link java.lang.Runtime}.
  */
 public class VMStats implements VMStatsContract {
-  private static final StatisticsType vmType;
-  private static final int cpusId;
-  private static final int freeMemoryId;
-  private static final int totalMemoryId;
-  private static final int maxMemoryId;
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    vmType = f.createType("VMStats", "Stats available on any java virtual machine.",
+  private StatisticsType vmType;
+  private int cpusId;
+  private int freeMemoryId;
+  private int totalMemoryId;
+  private int maxMemoryId;
+  
+  private void initializeStats(StatisticsFactory factory) {
+    vmType = factory.createType("VMStats", "Stats available on any java virtual machine.",
         new StatisticDescriptor[] {
-            f.createIntGauge("cpus", "Number of cpus available to the java VM on its machine.",
+            factory.createIntGauge("cpus", "Number of cpus available to the java VM on its machine.",
                 "cpus", true),
-            f.createLongGauge("freeMemory",
+            factory.createLongGauge("freeMemory",
                 "An approximation fo the total amount of memory currently available for future allocated objects, measured in bytes.",
                 "bytes", true),
-            f.createLongGauge("totalMemory",
+            factory.createLongGauge("totalMemory",
                 "The total amount of memory currently available for current and future objects, measured in bytes.",
                 "bytes"),
-            f.createLongGauge("maxMemory",
+            factory.createLongGauge("maxMemory",
                 "The maximum amount of memory that the VM will attempt to use, measured in bytes.",
                 "bytes", true)});
     cpusId = vmType.nameToId("cpus");
@@ -53,8 +53,9 @@ public class VMStats implements VMStatsContract {
   private final Statistics vmStats;
 
 
-  public VMStats(StatisticsFactory f, long id) {
-    this.vmStats = f.createStatistics(vmType, "vmStats", id);
+  public VMStats(StatisticsFactory factory, long id) {
+    initializeStats(factory);
+    this.vmStats = factory.createStatistics(vmType, "vmStats", id);
   }
 
   public void refresh() {
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
deleted file mode 100644
index 321ab6b..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/micrometer/MicrometerStatsFactory.java
+++ /dev/null
@@ -1,137 +0,0 @@
-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 554bf35..387a90a 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
@@ -17,6 +17,7 @@ package org.apache.geode.internal.statistics.platform;
 
 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.Assert;
@@ -33,33 +34,28 @@ public class LinuxProcessStats {
   static final int imageSizeINT = 0;
   static final int rssSizeINT = 1;
 
-  private static final StatisticsType myType;
+  private StatisticsType myType;
 
-  private static void checkOffset(String name, int offset) {
+  private void checkOffset(String name, int offset) {
     int id = myType.nameToId(name);
     Assert.assertTrue(offset == id,
         "Expected the offset for " + name + " to be " + offset + " but it was " + id);
   }
 
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("LinuxProcessStats", "Statistics on a Linux process.",
+  private void initializeStats(StatisticsFactory factory) {
+    myType = factory.createType("LinuxProcessStats", "Statistics on a Linux process.",
         new StatisticDescriptor[] {
-            f.createIntGauge("imageSize", "The size of the process's image in megabytes.",
+            factory.createIntGauge("imageSize", "The size of the process's image in megabytes.",
                 "megabytes"),
-            f.createIntGauge("rssSize",
+            factory.createIntGauge("rssSize",
                 "The size of the process's resident set size in megabytes. (assumes PAGESIZE=4096, specify -Dgemfire.statistics.linux.pageSize=<pagesize> to adjust)",
                 "megabytes"),});
     checkOffset("imageSize", imageSizeINT);
     checkOffset("rssSize", rssSizeINT);
   }
 
-  private LinuxProcessStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
+  public LinuxProcessStats(StatisticsFactory statisticsFactory) {
+    initializeStats(statisticsFactory);
   }
 
   /**
@@ -80,4 +76,7 @@ public class LinuxProcessStats {
     };
   }
 
+  public StatisticsType getType() {
+    return myType;
+  }
 }
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 bae1785..67443c8 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
@@ -16,6 +16,7 @@
 package org.apache.geode.internal.statistics.platform;
 
 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.Assert;
@@ -83,151 +84,150 @@ public class LinuxSystemStats {
   static final int loadAverage15DOUBLE = 1;
   static final int loadAverage5DOUBLE = 2;
 
-  private static final StatisticsType myType;
+  private StatisticsType myType;
 
-  private static void checkOffset(String name, int offset) {
+  private void checkOffset(String name, int offset) {
     int id = myType.nameToId(name);
     Assert.assertTrue(offset == id,
         "Expected the offset for " + name + " to be " + offset + " but it was " + id);
   }
 
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("LinuxSystemStats", "Statistics on a Linux machine.",
+  private void initializeStats(StatisticsFactory factory) {
+    myType = factory.createType("LinuxSystemStats", "Statistics on a Linux machine.",
         new StatisticDescriptor[] {
-            f.createIntGauge("allocatedSwap",
+            factory.createIntGauge("allocatedSwap",
                 "The number of megabytes of swap space have actually been written to. Swap space must be reserved before it can be allocated.",
                 "megabytes"),
-            f.createIntGauge("bufferMemory",
+            factory.createIntGauge("bufferMemory",
                 "The number of megabytes of memory allocated to buffers.", "megabytes"),
-            f.createIntGauge("sharedMemory",
+            factory.createIntGauge("sharedMemory",
                 "The number of megabytes of shared memory on the machine.", "megabytes", true),
-            f.createIntGauge("cpuActive",
+            factory.createIntGauge("cpuActive",
                 "The percentage of the total available time that has been used in a non-idle state.",
                 "%"),
-            f.createIntGauge("cpuIdle",
+            factory.createIntGauge("cpuIdle",
                 "The percentage of the total available time that has been spent sleeping.", "%",
                 true),
-            f.createIntGauge("cpuNice",
+            factory.createIntGauge("cpuNice",
                 "The percentage of the total available time that has been used to execute user code in processes with low priority.",
                 "%"),
-            f.createIntGauge("cpuSystem",
+            factory.createIntGauge("cpuSystem",
                 "The percentage of the total available time that has been used to execute system (i.e. kernel) code.",
                 "%"),
-            f.createIntGauge("cpuUser",
+            factory.createIntGauge("cpuUser",
                 "The percentage of the total available time that has been used to execute user code.",
                 "%"),
-            f.createIntGauge("iowait",
+            factory.createIntGauge("iowait",
                 "The percentage of the total available time that has been used to wait for I/O to complete.",
                 "%"),
-            f.createIntGauge("irq",
+            factory.createIntGauge("irq",
                 "The percentage of the total available time that has been used servicing  interrupts.",
                 "%"),
-            f.createIntGauge("softirq",
+            factory.createIntGauge("softirq",
                 "The percentage of the total available time that has been used servicing softirqs.",
                 "%"),
-            f.createIntGauge("cpus", "The number of online cpus on the local machine.", "items"),
-            f.createIntGauge("freeMemory",
+            factory.createIntGauge("cpus", "The number of online cpus on the local machine.", "items"),
+            factory.createIntGauge("freeMemory",
                 "The number of megabytes of unused memory on the machine.", "megabytes", true),
-            f.createIntGauge("physicalMemory",
+            factory.createIntGauge("physicalMemory",
                 "The actual amount of total physical memory on the machine.", "megabytes", true),
-            f.createIntGauge("processes",
+            factory.createIntGauge("processes",
                 "The number of processes in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval.  Each process represents the running of a program.",
                 "processes"),
-            f.createIntGauge("unallocatedSwap",
+            factory.createIntGauge("unallocatedSwap",
                 "The number of megabytes of swap space that have not been allocated.", "megabytes",
                 true),
-            f.createIntGauge("cachedMemory",
+            factory.createIntGauge("cachedMemory",
                 "The number of megabytes of memory used for the file system cache.", "megabytes",
                 true),
-            f.createIntGauge("dirtyMemory",
+            factory.createIntGauge("dirtyMemory",
                 "The number of megabytes of memory in the file system cache that need to be written.",
                 "megabytes", true),
-            f.createIntGauge("cpuNonUser",
+            factory.createIntGauge("cpuNonUser",
                 "The percentage of total available time that has been used to execute non-user code.(includes system, iowait, irq, softirq etc.)",
                 "%"),
-            f.createIntGauge("cpuSteal",
+            factory.createIntGauge("cpuSteal",
                 "Steal time is the amount of time the operating system wanted to execute, but was not allowed to by the hypervisor.",
                 "%"),
 
-            f.createLongCounter("loopbackPackets",
+            factory.createLongCounter("loopbackPackets",
                 "The number of network packets sent (or received) on the loopback interface",
                 "packets", false),
-            f.createLongCounter("loopbackBytes",
+            factory.createLongCounter("loopbackBytes",
                 "The number of network bytes sent (or received) on the loopback interface", "bytes",
                 false),
-            f.createLongCounter("recvPackets",
+            factory.createLongCounter("recvPackets",
                 "The total number of network packets received (excluding loopback)", "packets",
                 false),
-            f.createLongCounter("recvBytes",
+            factory.createLongCounter("recvBytes",
                 "The total number of network bytes received (excluding loopback)", "bytes", false),
-            f.createLongCounter("recvErrors", "The total number of network receive errors",
+            factory.createLongCounter("recvErrors", "The total number of network receive errors",
                 "errors", false),
-            f.createLongCounter("recvDrops", "The total number network receives dropped", "packets",
+            factory.createLongCounter("recvDrops", "The total number network receives dropped", "packets",
                 false),
-            f.createLongCounter("xmitPackets",
+            factory.createLongCounter("xmitPackets",
                 "The total number of network packets transmitted (excluding loopback)", "packets",
                 false),
-            f.createLongCounter("xmitBytes",
+            factory.createLongCounter("xmitBytes",
                 "The total number of network bytes transmitted (excluding loopback)", "bytes",
                 false),
-            f.createLongCounter("xmitErrors", "The total number of network transmit errors",
+            factory.createLongCounter("xmitErrors", "The total number of network transmit errors",
                 "errors", false),
-            f.createLongCounter("xmitDrops", "The total number of network transmits dropped",
+            factory.createLongCounter("xmitDrops", "The total number of network transmits dropped",
                 "packets", false),
-            f.createLongCounter("xmitCollisions", "The total number of network transmit collisions",
+            factory.createLongCounter("xmitCollisions", "The total number of network transmit collisions",
                 "collisions", false),
-            f.createLongCounter("contextSwitches",
+            factory.createLongCounter("contextSwitches",
                 "The total number of context switches from one thread to another on the computer.  Thread switches can occur either inside of a single process or across processes.  A thread switch may be caused either by one thread asking another for information, or by a thread being preempted by another, higher priority thread becoming ready to run.",
                 "operations", false),
-            f.createLongCounter("processCreates",
+            factory.createLongCounter("processCreates",
                 "The total number of times a process has been created.", "operations", false),
-            f.createLongCounter("pagesPagedIn",
+            factory.createLongCounter("pagesPagedIn",
                 "The total number of pages that have been brought into memory from disk by the operating system's memory manager.",
                 "pages", false),
-            f.createLongCounter("pagesPagedOut",
+            factory.createLongCounter("pagesPagedOut",
                 "The total number of pages that have been flushed from memory to disk by the operating system's memory manager.",
                 "pages", false),
-            f.createLongCounter("pagesSwappedIn",
+            factory.createLongCounter("pagesSwappedIn",
                 "The total number of swap pages that have been read in from disk by the operating system's memory manager.",
                 "pages", false),
-            f.createLongCounter("pagesSwappedOut",
+            factory.createLongCounter("pagesSwappedOut",
                 "The total number of swap pages that have been written out to disk by the operating system's memory manager.",
                 "pages", false),
-            f.createLongCounter("diskReadsCompleted",
+            factory.createLongCounter("diskReadsCompleted",
                 "The total number disk read operations completed successfully", "ops"),
-            f.createLongCounter("diskReadsMerged",
+            factory.createLongCounter("diskReadsMerged",
                 "The total number disk read operations that were able to be merge with adjacent reads for efficiency",
                 "ops"),
-            f.createLongCounter("diskBytesRead",
+            factory.createLongCounter("diskBytesRead",
                 "The total number bytes read from disk successfully", "bytes"),
-            f.createLongCounter("diskTimeReading",
+            factory.createLongCounter("diskTimeReading",
                 "The total number of milliseconds spent reading from disk", "milliseconds"),
-            f.createLongCounter("diskWritesCompleted",
+            factory.createLongCounter("diskWritesCompleted",
                 "The total number disk write operations completed successfully", "ops"),
-            f.createLongCounter("diskWritesMerged",
+            factory.createLongCounter("diskWritesMerged",
                 "The total number disk write operations that were able to be merge with adjacent reads for efficiency",
                 "ops"),
-            f.createLongCounter("diskBytesWritten",
+            factory.createLongCounter("diskBytesWritten",
                 "The total number bytes written to disk successfully", "bytes"),
-            f.createLongCounter("diskTimeWriting",
+            factory.createLongCounter("diskTimeWriting",
                 "The total number of milliseconds spent writing to disk", "milliseconds"),
-            f.createLongGauge("diskOpsInProgress",
+            factory.createLongGauge("diskOpsInProgress",
                 "The current number of disk operations in progress", "ops"),
-            f.createLongCounter("diskTimeInProgress",
+            factory.createLongCounter("diskTimeInProgress",
                 "The total number of milliseconds spent with disk ops in progress", "milliseconds"),
-            f.createLongCounter("diskTime",
+            factory.createLongCounter("diskTime",
                 "The total number of milliseconds that measures both completed disk operations and any accumulating backlog of in progress ops.",
                 "milliseconds"),
 
 
-            f.createDoubleGauge("loadAverage1",
+            factory.createDoubleGauge("loadAverage1",
                 "The average number of threads in the run queue or waiting for disk I/O over the last minute.",
                 "threads"),
-            f.createDoubleGauge("loadAverage15",
+            factory.createDoubleGauge("loadAverage15",
                 "The average number of threads in the run queue or waiting for disk I/O over the last fifteen minutes.",
                 "threads"),
-            f.createDoubleGauge("loadAverage5",
+            factory.createDoubleGauge("loadAverage5",
                 "The average number of threads in the run queue or waiting for disk I/O over the last five minutes.",
                 "threads"),});
 
@@ -286,11 +286,11 @@ public class LinuxSystemStats {
     checkOffset("loadAverage5", loadAverage5DOUBLE);
   }
 
-  private LinuxSystemStats() {
-    // no instances allowed
+  public LinuxSystemStats(StatisticsFactory factory) {
+    initializeStats(factory);
   }
 
-  public static StatisticsType getType() {
+  public StatisticsType getType(){
     return myType;
   }
 }
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 87a67b1..30337d9 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
@@ -17,6 +17,7 @@ package org.apache.geode.internal.statistics.platform;
 
 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.Assert;
@@ -33,44 +34,29 @@ public class OSXProcessStats {
   // private static final int imageSizeINT = 0;
   // private static final int rssSizeINT = 1;
 
-  private static final StatisticsType myType;
+  private StatisticsType myType;
 
-  private static void checkOffset(String name, int offset) {
+  private void checkOffset(String name, int offset) {
     int id = myType.nameToId(name);
     Assert.assertTrue(offset == id,
         "Expected the offset for " + name + " to be " + offset + " but it was " + id);
   }
 
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("OSXProcessStats", "Statistics on a OS X process.",
-        new StatisticDescriptor[] {f.createIntGauge("dummyStat", "Placeholder", "megabytes")
-        // f.createIntGauge("imageSize",
-        // "The size of the process's image in megabytes.",
-        // "megabytes"),
-        // f.createIntGauge("rssSize",
-        // "The size of the process's resident set size in megabytes.",
-        // "megabytes"),
+  private void initializeStats(StatisticsFactory factory) {
+    myType = factory.createType("OSXProcessStats", "Statistics on a OS X process.",
+        new StatisticDescriptor[]{factory.createIntGauge("dummyStat", "Placeholder", "megabytes")
         });
-    // checkOffset("imageSize", imageSizeINT);
-    // checkOffset("rssSize", rssSizeINT);
   }
 
-  private OSXProcessStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
+  public OSXProcessStats(StatisticsFactory factory) {
+    initializeStats(factory);
   }
 
   /**
    * Returns a <code>ProcessStats</code> that wraps OS X process <code>Statistics</code>.
-   *
    * @since GemFire 3.5
    */
-  public static ProcessStats createProcessStats(final Statistics stats) { // TODO: was
-                                                                          // package-protected
+  public static ProcessStats createProcessStats(final Statistics stats) {
     if (stats instanceof LocalStatisticsImpl) {
       HostStatHelper.refresh((LocalStatisticsImpl) stats);
     } // otherwise its a Dummy implementation so do nothing
@@ -83,4 +69,7 @@ public class OSXProcessStats {
     };
   }
 
+  public StatisticsType getType() {
+    return myType;
+  }
 }
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 84856d3..6b8ab37 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
@@ -16,6 +16,7 @@
 package org.apache.geode.internal.statistics.platform;
 
 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.Assert;
@@ -27,219 +28,26 @@ import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
  * running on.
  */
 public class OSXSystemStats {
+  private StatisticsType myType;
 
-  // shared fields
-  // private static final int allocatedSwapINT = 0;
-  // private static final int bufferMemoryINT = 1;
-  // private static final int contextSwitchesINT = 2;
-  // private static final int cpuActiveINT = 3;
-  // private static final int cpuIdleINT = 4;
-  // private static final int cpuNiceINT = 5;
-  // private static final int cpuSystemINT = 6;
-  // private static final int cpuUserINT = 7;
-  // private static final int cpusINT = 8;
-  // private static final int freeMemoryINT = 9;
-  // private static final int pagesPagedInINT = 10;
-  // private static final int pagesPagedOutINT = 11;
-  // private static final int pagesSwappedInINT = 12;
-  // private static final int pagesSwappedOutINT = 13;
-  // private static final int physicalMemoryINT = 14;
-  // private static final int processCreatesINT = 15;
-  // private static final int processesINT = 16;
-  // private static final int sharedMemoryINT = 17;
-  // private static final int unallocatedSwapINT = 18;
-  //
-  // private static final int loopbackPacketsLONG = 0;
-  // private static final int loopbackBytesLONG = 1;
-  // private static final int recvPacketsLONG = 2;
-  // private static final int recvBytesLONG = 3;
-  // private static final int recvErrorsLONG = 4;
-  // private static final int recvDropsLONG = 5;
-  // private static final int xmitPacketsLONG = 6;
-  // private static final int xmitBytesLONG = 7;
-  // private static final int xmitErrorsLONG = 8;
-  // private static final int xmitDropsLONG = 9;
-  // private static final int xmitCollisionsLONG = 10;
-  //
-  // private static final int loadAverage1DOUBLE = 0;
-  // private static final int loadAverage15DOUBLE = 1;
-  // private static final int loadAverage5DOUBLE = 2;
-
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
+  private void checkOffset(String name, int offset) {
     int id = myType.nameToId(name);
     Assert.assertTrue(offset == id,
         "Expected the offset for " + name + " to be " + offset + " but it was " + id);
   }
 
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("OSXSystemStats", "Statistics on an OS X machine.",
-        new StatisticDescriptor[] {f.createIntGauge("dummyStat",
+  private void initializeStats(StatisticsFactory factory) {
+    myType = factory.createType("OSXSystemStats", "Statistics on an OS X machine.",
+        new StatisticDescriptor[]{factory.createIntGauge("dummyStat",
             "Place holder statistic until Stats are implimented for the Mac OS X Platform.",
-            "megabytes"),
-        // f.createIntGauge("allocatedSwap",
-        // "The number of megabytes of swap space have actually been written to. Swap space must be
-        // reserved before it can be allocated.",
-        // "megabytes"),
-        // f.createIntGauge("bufferMemory",
-        // "The number of megabytes of memory allocated to buffers.",
-        // "megabytes"),
-        // f.createIntCounter("contextSwitches",
-        // "The total number of context switches from one thread to another on the computer. Thread
-        // switches can occur either inside of a single process or across processes. A thread switch
-        // may be caused either by one thread asking another for information, or by a thread being
-        // preempted by another, higher priority thread becoming ready to run.",
-        // "operations", false),
-        // f.createIntGauge("cpuActive",
-        // "The percentage of the total available time that has been used in a non-idle state.",
-        // "%"),
-        // f.createIntGauge("cpuIdle",
-        // "The percentage of the total available time that has been spent sleeping.",
-        // "%", true),
-        // f.createIntGauge("cpuNice",
-        // "The percentage of the total available time that has been used to execute user code in
-        // processes with low priority.",
-        // "%"),
-        // f.createIntGauge("cpuSystem",
-        // "The percentage of the total available time that has been used to execute system (i.e.
-        // kernel) code.",
-        // "%"),
-        // f.createIntGauge("cpuUser",
-        // "The percentage of the total available time that has been used to execute user code.",
-        // "%"),
-        // f.createIntGauge("cpus",
-        // "The number of online cpus on the local machine.",
-        // "items"),
-        // f.createIntGauge("freeMemory",
-        // "The number of megabytes of unused memory on the machine.",
-        // "megabytes", true),
-        // f.createIntCounter("pagesPagedIn",
-        // "The total number of pages that have been brought into memory from disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntCounter("pagesPagedOut",
-        // "The total number of pages that have been flushed from memory to disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntCounter("pagesSwappedIn",
-        // "The total number of swap pages that have been read in from disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntCounter("pagesSwappedOut",
-        // "The total number of swap pages that have been written out to disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntGauge("physicalMemory",
-        // "The actual amount of total physical memory on the machine.",
-        // "megabytes", true),
-        // f.createIntCounter("processCreates",
-        // "The total number of times a process has been created.",
-        // "operations", false),
-        // f.createIntGauge("processes",
-        // "The number of processes in the computer at the time of data collection. Notice that this
-        // is an instantaneous count, not an average over the time interval. Each process represents
-        // the running of a program.",
-        // "processes"),
... 2742 lines suppressed ...