geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [34/51] [abbrv] geode git commit: GEODE-2632: refactor code to use interfaces instead of impls
Date Fri, 21 Apr 2017 23:42:30 GMT
GEODE-2632: refactor code to use interfaces instead of impls

* use getInternalDistributedSystem instead of overriding getDistributedSystem
* use InternalCache instead of GemFireCacheImpl
* remove dead code
* remove useless javadocs and comments


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

Branch: refs/heads/feature/GEODE-2097
Commit: 76c498385995a9aabefd7523f057e32dd9d4a8fa
Parents: c5ee7cd
Author: Kirk Lund <klund@apache.org>
Authored: Mon Apr 17 14:53:00 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Wed Apr 19 09:38:02 2017 -0700

----------------------------------------------------------------------
 ...erConfigurationServiceEndToEndDUnitTest.java |  2 +-
 .../internal/AsyncEventQueueFactoryImpl.java    | 13 ++--
 .../internal/ParallelAsyncEventQueueImpl.java   | 60 ++--------------
 .../internal/SerialAsyncEventQueueImpl.java     | 18 ++---
 .../geode/internal/cache/AbstractRegion.java    |  4 +-
 .../geode/internal/cache/CacheServerImpl.java   |  4 +-
 .../internal/cache/DiskStoreFactoryImpl.java    |  6 +-
 .../geode/internal/cache/DiskStoreImpl.java     |  4 +-
 .../geode/internal/cache/DiskStoreMonitor.java  |  2 +-
 .../DistTXStateProxyImplOnCoordinator.java      |  3 +-
 .../geode/internal/cache/DistributedRegion.java |  3 +-
 .../apache/geode/internal/cache/ExpiryTask.java |  2 +-
 .../geode/internal/cache/GemFireCacheImpl.java  | 17 +++--
 .../geode/internal/cache/InternalCache.java     | 13 ++++
 .../geode/internal/cache/LocalRegion.java       |  8 +--
 .../geode/internal/cache/PartitionedRegion.java | 11 +--
 .../internal/cache/PartitionedRegionHelper.java |  5 +-
 .../geode/internal/cache/ProxyBucketRegion.java |  2 +-
 .../cache/SearchLoadAndWriteProcessor.java      |  3 +-
 .../geode/internal/cache/ServerPingMessage.java |  2 +-
 .../apache/geode/internal/cache/TXMessage.java  |  2 +-
 .../cache/control/HeapMemoryMonitor.java        |  6 +-
 .../geode/internal/cache/ha/HARegionQueue.java  |  2 +-
 .../cache/persistence/BackupManager.java        |  7 +-
 .../cache/tier/sockets/CacheClientProxy.java    |  3 +-
 .../internal/cache/tx/ClientTXStateStub.java    |  2 +-
 .../cache/wan/AbstractGatewaySender.java        | 14 ++--
 .../cache/wan/GatewaySenderAdvisor.java         |  2 +-
 .../internal/cache/wan/WANServiceProvider.java  | 10 ++-
 .../parallel/ParallelGatewaySenderQueue.java    |  2 +-
 .../wan/serial/SerialGatewaySenderQueue.java    |  2 +-
 .../internal/cache/wan/spi/WANFactory.java      |  6 +-
 .../internal/cache/xmlcache/CacheCreation.java  | 34 ++++++---
 .../ParallelAsyncEventQueueCreation.java        | 48 +++----------
 .../xmlcache/ParallelGatewaySenderCreation.java | 46 ++----------
 .../xmlcache/SerialAsyncEventQueueCreation.java | 37 ++--------
 .../xmlcache/SerialGatewaySenderCreation.java   | 37 ++--------
 .../geode/management/internal/LocalManager.java |  2 +-
 .../management/internal/ManagementAgent.java    |  4 +-
 .../internal/beans/ManagementAdapter.java       |  7 +-
 .../internal/beans/MemberMBeanBridge.java       |  6 +-
 .../CreateAlterDestroyRegionCommands.java       |  2 +-
 .../internal/cli/functions/DeployFunction.java  |  4 +-
 .../cli/functions/ExportLogsFunction.java       |  6 +-
 .../cli/functions/SizeExportLogsFunction.java   |  2 +-
 .../pdx/internal/LonerTypeRegistration.java     |  2 +-
 .../pdx/internal/PeerTypeRegistration.java      | 14 ++--
 .../SerialAsyncEventQueueImplJUnitTest.java     |  5 +-
 .../geode/cache30/ReconnectDUnitTest.java       |  5 +-
 .../ReconnectedCacheServerDUnitTest.java        | 24 +++----
 .../geode/cache30/TXDistributedDUnitTest.java   |  4 +-
 .../geode/internal/cache/BackupJUnitTest.java   | 15 ++--
 .../cache/NetSearchMessagingDUnitTest.java      |  2 +-
 .../cache/SearchLoadAndWriteProcessorTest.java  |  1 +
 .../FetchEntriesMessageJUnitTest.java           |  2 +-
 .../java/org/apache/geode/test/fake/Fakes.java  | 17 +++--
 .../LuceneIndexForPartitionedRegion.java        | 18 ++---
 .../cache/lucene/internal/LuceneIndexImpl.java  | 11 ++-
 .../lucene/internal/LuceneIndexImplFactory.java |  5 +-
 .../cache/lucene/internal/LuceneRawIndex.java   |  5 +-
 .../lucene/internal/LuceneRawIndexFactory.java  |  5 +-
 .../lucene/internal/LuceneRegionListener.java   | 13 ++--
 .../lucene/internal/LuceneServiceImpl.java      | 13 ++--
 .../LuceneIndexCreationIntegrationTest.java     |  3 +-
 .../lucene/internal/LuceneIndexFactorySpy.java  | 19 +++--
 .../LuceneIndexForPartitionedRegionTest.java    | 26 +++----
 .../internal/LuceneIndexImplJUnitTest.java      |  8 ++-
 .../apache/geode/cache/util/AutoBalancer.java   | 18 ++---
 .../internal/locator/wan/WANFactoryImpl.java    |  8 +--
 .../cache/wan/AbstractRemoteGatewaySender.java  | 30 ++++----
 .../internal/cache/wan/GatewayReceiverImpl.java |  2 +-
 .../cache/wan/GatewaySenderFactoryImpl.java     | 21 +-----
 .../wan/parallel/ParallelGatewaySenderImpl.java | 75 ++------------------
 .../wan/serial/SerialGatewaySenderImpl.java     | 29 ++------
 .../ClusterConfigurationDUnitTest.java          |  2 +-
 75 files changed, 313 insertions(+), 564 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
index 0103cf6..1a97cb6 100644
--- a/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
@@ -416,7 +416,7 @@ public class ClusterConfigurationServiceEndToEndDUnitTest extends CliCommandTest
       @Override
       public Object call() throws Exception {
         GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.getAnyInstance();
-        ShutdownAllRequest.send(cache.getDistributedSystem().getDistributionManager(), -1);
+        ShutdownAllRequest.send(cache.getInternalDistributedSystem().getDistributionManager(), -1);
         return null;
       }
     });

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
index b288108..1a4052b 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
@@ -14,11 +14,8 @@
  */
 package org.apache.geode.cache.asyncqueue.internal;
 
-import org.apache.geode.internal.cache.wan.AsyncEventQueueConfigurationException;
-
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.asyncqueue.AsyncEventListener;
 import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
 import org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory;
@@ -26,15 +23,14 @@ import org.apache.geode.cache.wan.GatewayEventFilter;
 import org.apache.geode.cache.wan.GatewayEventSubstitutionFilter;
 import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.cache.wan.GatewaySender.OrderPolicy;
-import org.apache.geode.cache.wan.GatewaySenderFactory;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.wan.AsyncEventQueueConfigurationException;
 import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
 import org.apache.geode.internal.cache.xmlcache.AsyncEventQueueCreation;
 import org.apache.geode.internal.cache.xmlcache.CacheCreation;
 import org.apache.geode.internal.cache.xmlcache.ParallelAsyncEventQueueCreation;
-import org.apache.geode.internal.cache.xmlcache.ParallelGatewaySenderCreation;
 import org.apache.geode.internal.cache.xmlcache.SerialAsyncEventQueueCreation;
-import org.apache.geode.internal.cache.xmlcache.SerialGatewaySenderCreation;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
 
@@ -48,15 +44,14 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory {
    */
   private GatewaySenderAttributes attrs = new GatewaySenderAttributes();
 
-  private Cache cache;
+  private InternalCache cache;
 
   /**
    * The default batchTimeInterval for AsyncEventQueue in milliseconds.
    */
   public static final int DEFAULT_BATCH_TIME_INTERVAL = 5;
 
-
-  public AsyncEventQueueFactoryImpl(Cache cache) {
+  public AsyncEventQueueFactoryImpl(InternalCache cache) {
     this.cache = cache;
     this.attrs = new GatewaySenderAttributes();
     // set a different default for batchTimeInterval for AsyncEventQueue

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
index 03f0799..e799880 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
@@ -16,7 +16,6 @@ package org.apache.geode.cache.asyncqueue.internal;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.EntryOperation;
 import org.apache.geode.cache.asyncqueue.AsyncEventListener;
 import org.apache.geode.cache.wan.GatewayTransportFilter;
@@ -27,6 +26,7 @@ import org.apache.geode.internal.cache.DistributedRegion;
 import org.apache.geode.internal.cache.EntryEventImpl;
 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.PartitionedRegionHelper;
 import org.apache.geode.internal.cache.UpdateAttributesProcessor;
 import org.apache.geode.internal.cache.ha.ThreadIdentifier;
@@ -39,22 +39,13 @@ import org.apache.geode.internal.cache.wan.GatewaySenderAdvisor.GatewaySenderPro
 import org.apache.geode.internal.cache.xmlcache.CacheCreation;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.LoggingThreadGroup;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 
 public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
 
   private static final Logger logger = LogService.getLogger();
 
-  final ThreadGroup loggerGroup =
-      LoggingThreadGroup.createThreadGroup("Remote Site Discovery Logger Group", logger);
-
-  public ParallelAsyncEventQueueImpl() {
-    super();
-    this.isParallel = true;
-  }
-
-  public ParallelAsyncEventQueueImpl(Cache cache, GatewaySenderAttributes attrs) {
+  public ParallelAsyncEventQueueImpl(InternalCache cache, GatewaySenderAttributes attrs) {
     super(cache, attrs);
     if (!(this.cache instanceof CacheCreation)) {
       // this sender lies underneath the AsyncEventQueue. Need to have
@@ -76,8 +67,7 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
       }
 
       if (this.remoteDSId != DEFAULT_DISTRIBUTED_SYSTEM_ID) {
-        String locators =
-            ((GemFireCacheImpl) this.cache).getDistributedSystem().getConfig().getLocators();
+        String locators = this.cache.getInternalDistributedSystem().getConfig().getLocators();
         if (locators.length() == 0) {
           throw new IllegalStateException(
               LocalizedStrings.AbstractGatewaySender_LOCATOR_SHOULD_BE_CONFIGURED_BEFORE_STARTING_GATEWAY_SENDER
@@ -91,14 +81,9 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
        * of Concurrent version of processor and queue.
        */
       eventProcessor = new ConcurrentParallelGatewaySenderEventProcessor(this);
-      /*
-       * if (getDispatcherThreads() > 1) { eventProcessor = new
-       * ConcurrentParallelGatewaySenderEventProcessor(this); } else { eventProcessor = new
-       * ParallelGatewaySenderEventProcessor(this); }
-       */
-
       eventProcessor.start();
       waitForRunningStatus();
+
       // Only notify the type registry if this is a WAN gateway queue
       if (!isAsyncEventQueue()) {
         ((GemFireCacheImpl) getCache()).getPdxRegistry().gatewaySenderStarted(this);
@@ -118,15 +103,6 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
     }
   }
 
-  // /**
-  // * The sender is not started but only the message queue i.e. shadowPR is created on the node.
-  // * @param targetPr
-  // */
-  // private void createMessageQueueOnAccessorNode(PartitionedRegion targetPr) {
-  // eventProcessor = new ParallelGatewaySenderEventProcessor(this, targetPr);
-  // }
-
-
   @Override
   public void stop() {
     this.getLifeCycleLock().writeLock().lock();
@@ -200,24 +176,11 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
     pf.isDiskSynchronous = isDiskSynchronous();
   }
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see
-   * org.apache.geode.internal.cache.wan.AbstractGatewaySender#setModifiedEventId(org.apache.geode.
-   * internal.cache.EntryEventImpl)
-   */
   @Override
   protected void setModifiedEventId(EntryEventImpl clonedEvent) {
     int bucketId = -1;
     // merged from 42004
     if (clonedEvent.getRegion() instanceof DistributedRegion) {
-      // if (getOrderPolicy() == OrderPolicy.THREAD) {
-      // bucketId = PartitionedRegionHelper.getHashKey(
-      // ((EntryEventImpl)clonedEvent).getEventId().getThreadID(),
-      // getMaxParallelismForReplicatedRegion());
-      // }
-      // else
       bucketId = PartitionedRegionHelper.getHashKey(clonedEvent.getKey(),
           getMaxParallelismForReplicatedRegion());
     } else {
@@ -230,21 +193,9 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
         originatingThreadId, getEventIdIndex());
 
     // In case of parallel as all events go through primary buckets
-    // we don't neet to generate different threadId for secondary buckets
+    // we don't need to generate different threadId for secondary buckets
     // as they will be rejected if seen at PR level itself
 
-    // boolean isPrimary = ((PartitionedRegion)getQueue().getRegion())
-    // .getRegionAdvisor().getBucketAdvisor(bucketId).isPrimary();
-    // if (isPrimary) {
-    // newThreadId = ThreadIdentifier
-    // .createFakeThreadIDForParallelGSPrimaryBucket(bucketId,
-    // originatingThreadId);
-    // } else {
-    // newThreadId = ThreadIdentifier
-    // .createFakeThreadIDForParallelGSSecondaryBucket(bucketId,
-    // originatingThreadId);
-    // }
-
     EventID newEventId = new EventID(originalEventId.getMembershipID(), newThreadId,
         originalEventId.getSequenceID(), bucketId);
     if (logger.isDebugEnabled()) {
@@ -255,5 +206,4 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
     }
     clonedEvent.setEventId(newEventId);
   }
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
index 08a5b00..9252dc7 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
@@ -14,10 +14,9 @@
  */
 package org.apache.geode.cache.asyncqueue.internal;
 
-import org.apache.geode.CancelException;
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.cache.Cache;
+import org.apache.geode.CancelException;
 import org.apache.geode.cache.asyncqueue.AsyncEventListener;
 import org.apache.geode.cache.wan.GatewayTransportFilter;
 import org.apache.geode.distributed.DistributedLockService;
@@ -27,6 +26,7 @@ import org.apache.geode.distributed.internal.ResourceEvent;
 import org.apache.geode.internal.cache.EntryEventImpl;
 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.RegionQueue;
 import org.apache.geode.internal.cache.UpdateAttributesProcessor;
 import org.apache.geode.internal.cache.ha.ThreadIdentifier;
@@ -41,22 +41,13 @@ import org.apache.geode.internal.cache.wan.serial.SerialGatewaySenderQueue;
 import org.apache.geode.internal.cache.xmlcache.CacheCreation;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.LoggingThreadGroup;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 
 public class SerialAsyncEventQueueImpl extends AbstractGatewaySender {
 
   private static final Logger logger = LogService.getLogger();
 
-  final ThreadGroup loggerGroup =
-      LoggingThreadGroup.createThreadGroup("Remote Site Discovery Logger Group", logger);
-
-  public SerialAsyncEventQueueImpl() {
-    super();
-    this.isParallel = false;
-  }
-
-  public SerialAsyncEventQueueImpl(Cache cache, GatewaySenderAttributes attrs) {
+  public SerialAsyncEventQueueImpl(InternalCache cache, GatewaySenderAttributes attrs) {
     super(cache, attrs);
     if (!(this.cache instanceof CacheCreation)) {
       // this sender lies underneath the AsyncEventQueue. Need to have
@@ -80,8 +71,7 @@ public class SerialAsyncEventQueueImpl extends AbstractGatewaySender {
         return;
       }
       if (this.remoteDSId != DEFAULT_DISTRIBUTED_SYSTEM_ID) {
-        String locators =
-            ((GemFireCacheImpl) this.cache).getDistributedSystem().getConfig().getLocators();
+        String locators = this.cache.getInternalDistributedSystem().getConfig().getLocators();
         if (locators.length() == 0) {
           throw new GatewaySenderConfigurationException(
               LocalizedStrings.AbstractGatewaySender_LOCATOR_SHOULD_BE_CONFIGURED_BEFORE_STARTING_GATEWAY_SENDER

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
index e69f801..1f4e50c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
@@ -1768,7 +1768,7 @@ public abstract class AbstractRegion implements Region, RegionAttributes, Attrib
   }
 
   public final long cacheTimeMillis() {
-    return this.cache.getDistributedSystem().getClock().cacheTimeMillis();
+    return this.cache.getInternalDistributedSystem().getClock().cacheTimeMillis();
   }
 
   public final RegionService getRegionService() {
@@ -1780,7 +1780,7 @@ public abstract class AbstractRegion implements Region, RegionAttributes, Attrib
   }
 
   public InternalDistributedSystem getSystem() {
-    return getCache().getDistributedSystem();
+    return getCache().getInternalDistributedSystem();
   }
 
   // DataSerializableFixedID support

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerImpl.java
index a3c4a93..367b6f4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerImpl.java
@@ -355,7 +355,7 @@ public class CacheServerImpl extends AbstractCacheServer implements Distribution
     }
 
     if (!isGatewayReceiver) {
-      InternalDistributedSystem system = ((GemFireCacheImpl) this.cache).getDistributedSystem();
+      InternalDistributedSystem system = this.cache.getInternalDistributedSystem();
       system.handleResourceEvent(ResourceEvent.CACHE_SERVER_START, this);
     }
 
@@ -451,7 +451,7 @@ public class CacheServerImpl extends AbstractCacheServer implements Distribution
     txMgr.removeHostedTXStatesForClients();
 
     if (!isGatewayReceiver) {
-      InternalDistributedSystem system = ((GemFireCacheImpl) this.cache).getDistributedSystem();
+      InternalDistributedSystem system = this.cache.getInternalDistributedSystem();
       system.handleResourceEvent(ResourceEvent.CACHE_SERVER_STOP, this);
     }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java
index 71be7ec..000bf0d 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java
@@ -14,9 +14,7 @@
  */
 package org.apache.geode.internal.cache;
 
-
 import java.io.File;
-import java.io.IOException;
 import java.util.Arrays;
 
 import org.apache.geode.GemFireIOException;
@@ -24,7 +22,6 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.DiskStoreFactory;
 import org.apache.geode.cache.DiskStore;
 import org.apache.geode.distributed.internal.ResourceEvent;
-import org.apache.geode.internal.cache.DiskStoreAttributes;
 import org.apache.geode.internal.cache.persistence.BackupManager;
 import org.apache.geode.internal.cache.xmlcache.CacheCreation;
 import org.apache.geode.internal.cache.xmlcache.CacheXml;
@@ -145,7 +142,8 @@ public class DiskStoreFactoryImpl implements DiskStoreFactory {
           DiskStoreImpl dsi = new DiskStoreImpl(gfc, this.attrs);
           result = dsi;
           /** Added for M&M **/
-          gfc.getDistributedSystem().handleResourceEvent(ResourceEvent.DISKSTORE_CREATE, dsi);
+          gfc.getInternalDistributedSystem().handleResourceEvent(ResourceEvent.DISKSTORE_CREATE,
+              dsi);
           dsi.doInitialRecovery();
           gfc.addDiskStore(dsi);
           if (registry != null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
index b97f428..d13b4a6 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
@@ -3243,7 +3243,7 @@ public class DiskStoreImpl implements DiskStore {
 
   public PersistentMemberID generatePersistentID(DiskRegionView dr) {
     File firstDir = getInfoFileDir().getDir();
-    InternalDistributedSystem ids = getCache().getDistributedSystem();
+    InternalDistributedSystem ids = getCache().getInternalDistributedSystem();
     InternalDistributedMember memberId = ids.getDistributionManager().getDistributionManagerId();
 
     // NOTE - do NOT use DM.cacheTimeMillis here. See bug #49920
@@ -3253,7 +3253,7 @@ public class DiskStoreImpl implements DiskStore {
   }
 
   public PersistentID getPersistentID() {
-    InetAddress host = cache.getDistributedSystem().getDistributedMember().getInetAddress();
+    InetAddress host = cache.getInternalDistributedSystem().getDistributedMember().getInetAddress();
     String dir = getDiskDirs()[0].getAbsolutePath();
     return new PersistentMemberPattern(host, dir, this.diskStoreID.toUUID(), 0);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreMonitor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreMonitor.java
index 2bb5107..551f733 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreMonitor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreMonitor.java
@@ -211,7 +211,7 @@ public class DiskStoreMonitor {
     File log = null;
     GemFireCacheImpl gci = GemFireCacheImpl.getInstance();
     if (gci != null) {
-      InternalDistributedSystem ds = gci.getDistributedSystem();
+      InternalDistributedSystem ds = gci.getInternalDistributedSystem();
       if (ds != null) {
         DistributionConfig conf = ds.getConfig();
         if (conf != null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
index 52d155f..68bde4e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
@@ -134,7 +134,8 @@ public class DistTXStateProxyImplOnCoordinator extends DistTXStateProxyImpl {
   private HashMap<DistributedMember, DistTXCoordinatorInterface> getSecondariesAndReplicasForTxOps() {
     final GemFireCacheImpl cache =
         GemFireCacheImpl.getExisting("getSecondariesAndReplicasForTxOps");
-    InternalDistributedMember currentNode = cache.getDistributedSystem().getDistributedMember();
+    InternalDistributedMember currentNode =
+        cache.getInternalDistributedSystem().getDistributedMember();
 
     HashMap<DistributedMember, DistTXCoordinatorInterface> secondaryTarget2realDeals =
         new HashMap<>();

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
index 68fdbeb..0c967c9 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
@@ -2504,7 +2504,8 @@ public class DistributedRegion extends LocalRegion implements CacheDistributionA
     }
     // Fix for #48066 - make sure that region operations are completely
     // distributed to peers before destroying the region.
-    long timeout = 1000L * getCache().getDistributedSystem().getConfig().getAckWaitThreshold();
+    long timeout =
+        1000L * getCache().getInternalDistributedSystem().getConfig().getAckWaitThreshold();
     Boolean flushOnClose =
         !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close"); // test hook
     if (!this.cache.forcedDisconnect() && flushOnClose

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java
index e12622d..d3f5987 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java
@@ -467,7 +467,7 @@ public abstract class ExpiryTask extends SystemTimer.SystemTimerTask {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
     if (cache != null) {
       // Use cache.cacheTimeMillis here. See bug 52267.
-      InternalDistributedSystem ids = cache.getDistributedSystem();
+      InternalDistributedSystem ids = cache.getInternalDistributedSystem();
       if (ids != null) {
         return ids.getClock().cacheTimeMillis();
       }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 8691814..56243e1 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -2019,8 +2019,8 @@ public class GemFireCacheImpl
         try {
           this.prLockService =
               DLockService.create(PartitionedRegionHelper.PARTITION_LOCK_SERVICE_NAME,
-                  getDistributedSystem(), true /* distributed */, true /* destroyOnDisconnect */,
-                  true /* automateFreeResources */);
+                  getInternalDistributedSystem(), true /* distributed */,
+                  true /* destroyOnDisconnect */, true /* automateFreeResources */);
         } catch (IllegalArgumentException e) {
           this.prLockService = DistributedLockService
               .getServiceNamed(PartitionedRegionHelper.PARTITION_LOCK_SERVICE_NAME);
@@ -2045,8 +2045,8 @@ public class GemFireCacheImpl
         if (this.gatewayLockService == null) {
           try {
             this.gatewayLockService = DLockService.create(AbstractGatewaySender.LOCK_SERVICE_NAME,
-                getDistributedSystem(), true /* distributed */, true /* destroyOnDisconnect */,
-                true /* automateFreeResources */);
+                getInternalDistributedSystem(), true /* distributed */,
+                true /* destroyOnDisconnect */, true /* automateFreeResources */);
           } catch (IllegalArgumentException e) {
             this.gatewayLockService =
                 DistributedLockService.getServiceNamed(AbstractGatewaySender.LOCK_SERVICE_NAME);
@@ -2858,7 +2858,12 @@ public class GemFireCacheImpl
   }
 
   @Override
-  public InternalDistributedSystem getDistributedSystem() {
+  public DistributedSystem getDistributedSystem() {
+    return this.system;
+  }
+
+  @Override
+  public InternalDistributedSystem getInternalDistributedSystem() {
     return this.system;
   }
 
@@ -4836,7 +4841,7 @@ public class GemFireCacheImpl
   }
 
   private void sendAddCacheServerProfileMessage() {
-    DM dm = this.getDistributedSystem().getDistributionManager();
+    DM dm = getInternalDistributedSystem().getDistributionManager();
     Set otherMembers = dm.getOtherDistributionManagerIds();
     AddCacheServerProfileMessage msg = new AddCacheServerProfileMessage();
     msg.operateOnLocalCache(this);

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java
index ee80014..709308b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java
@@ -38,6 +38,7 @@ import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.distributed.DistributedLockService;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.SystemTimer;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
 import org.apache.geode.internal.cache.control.ResourceAdvisor;
@@ -167,4 +168,16 @@ public interface InternalCache extends Cache, Extensible<Cache> {
   LocalRegion getRegionByPath(String path);
 
   boolean isClient();
+
+  InternalDistributedSystem getInternalDistributedSystem();
+
+  Set<PartitionedRegion> getPartitionedRegions();
+
+  void addRegionListener(RegionListener l);
+
+  void removeRegionListener(RegionListener l);
+
+  Set<RegionListener> getRegionListeners();
+
+  CacheConfig getCacheConfig();
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 55ee6a8..5d5044b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -980,7 +980,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
             // instead of destroyLock in LocalRegion? ManagementAdapter is one
             // of the Resource Event listeners
 
-            InternalDistributedSystem system = this.cache.getDistributedSystem();
+            InternalDistributedSystem system = this.cache.getInternalDistributedSystem();
             system.handleResourceEvent(ResourceEvent.REGION_CREATE, newRegion);
           }
         }
@@ -2683,7 +2683,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
         try {
           rgn.recursiveDestroyRegion(eventSet, event, cacheWrite);
           if (!rgn.isInternalRegion()) {
-            InternalDistributedSystem system = rgn.cache.getDistributedSystem();
+            InternalDistributedSystem system = rgn.cache.getInternalDistributedSystem();
             system.handleResourceEvent(ResourceEvent.REGION_REMOVE, rgn);
           }
         } catch (CancelException e) {
@@ -6507,7 +6507,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
            * artifacts From Management Layer
            **/
           if (!isInternalRegion()) {
-            InternalDistributedSystem system = this.cache.getDistributedSystem();
+            InternalDistributedSystem system = this.cache.getInternalDistributedSystem();
             system.handleResourceEvent(ResourceEvent.REGION_REMOVE, this);
           }
 
@@ -7577,7 +7577,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
             .toLocalizedString(), e);
       } catch (TimeoutException e) {
         // not possible with local operation, no distributed locks possible
-        InternalDistributedSystem ids = (this.getCache().getDistributedSystem());
+        InternalDistributedSystem ids = (this.getCache().getInternalDistributedSystem());
         if (!ids.isDisconnecting()) {
           throw new InternalGemFireError(
               LocalizedStrings.LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_HERE

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 8db8969..774ad0c 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -625,7 +625,7 @@ public class PartitionedRegion extends LocalRegion
     // up upon
     // distributed system disconnect even this (or other) PRs are destroyed
     // (which prevents pridmap cleanup).
-    cache.getDistributedSystem().addDisconnectListener(dsPRIdCleanUpListener);
+    cache.getInternalDistributedSystem().addDisconnectListener(dsPRIdCleanUpListener);
 
     // this.userScope = ra.getScope();
     this.partitionAttributes = ra.getPartitionAttributes();
@@ -6892,7 +6892,7 @@ public class PartitionedRegion extends LocalRegion
         ReplyProcessor21.forceSevereAlertProcessing();
       }
       try {
-        DM dm = cache.getDistributedSystem().getDistributionManager();
+        DM dm = cache.getInternalDistributedSystem().getDistributionManager();
 
         long ackWaitThreshold = 0;
         long ackSAThreshold = dm.getConfig().getAckSevereAlertThreshold() * 1000;
@@ -6971,7 +6971,7 @@ public class PartitionedRegion extends LocalRegion
 
       final Object key = this.lockName;
 
-      final DM dm = cache.getDistributedSystem().getDistributionManager();
+      final DM dm = cache.getInternalDistributedSystem().getDistributionManager();
 
       long start = System.currentTimeMillis();
       long end;
@@ -6984,7 +6984,7 @@ public class PartitionedRegion extends LocalRegion
       }
 
       long ackSAThreshold =
-          cache.getDistributedSystem().getConfig().getAckSevereAlertThreshold() * 1000;
+          cache.getInternalDistributedSystem().getConfig().getAckSevereAlertThreshold() * 1000;
       boolean suspected = false;
       boolean severeAlertIssued = false;
       DistributedMember lockHolder = null;
@@ -6993,7 +6993,8 @@ public class PartitionedRegion extends LocalRegion
       long ackWaitThreshold;
 
       if (ackSAThreshold > 0) {
-        ackWaitThreshold = cache.getDistributedSystem().getConfig().getAckWaitThreshold() * 1000;
+        ackWaitThreshold =
+            cache.getInternalDistributedSystem().getConfig().getAckWaitThreshold() * 1000;
         waitInterval = ackWaitThreshold;
         start = System.currentTimeMillis();
       } else {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
index 99ab281..08dac6e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
@@ -331,7 +331,7 @@ public class PartitionedRegionHelper {
         return;
       }
 
-      DM dm = cache.getDistributedSystem().getDistributionManager();
+      DM dm = cache.getInternalDistributedSystem().getDistributionManager();
 
       if (logger.isDebugEnabled()) {
         logger.debug("Cleaning PartitionedRegion meta data for memberId={}", failedMemId);
@@ -859,7 +859,8 @@ public class PartitionedRegionHelper {
    * @return membership Set.
    */
   public static Set getMembershipSet(GemFireCacheImpl cache) {
-    return cache.getDistributedSystem().getDistributionManager().getDistributionManagerIds();
+    return cache.getInternalDistributedSystem().getDistributionManager()
+        .getDistributionManagerIds();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/ProxyBucketRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ProxyBucketRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ProxyBucketRegion.java
index 27f73c7..06378f2 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ProxyBucketRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ProxyBucketRegion.java
@@ -194,7 +194,7 @@ public final class ProxyBucketRegion implements Bucket {
   }
 
   public InternalDistributedSystem getSystem() {
-    return this.partitionedRegion.getCache().getDistributedSystem();
+    return this.partitionedRegion.getCache().getInternalDistributedSystem();
   }
 
   public String getName() {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
index 2a10792..65cda5d 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
@@ -1184,7 +1184,8 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
   private synchronized void waitForObject2(final int timeoutMs) throws TimeoutException {
     if (this.requestInProgress) {
       try {
-        final DM dm = this.region.getCache().getDistributedSystem().getDistributionManager();
+        final DM dm =
+            this.region.getCache().getInternalDistributedSystem().getDistributionManager();
         long waitTimeMs = timeoutMs;
         final long endTime = System.currentTimeMillis() + waitTimeMs;
         for (;;) {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/ServerPingMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ServerPingMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ServerPingMessage.java
index 0e46891..aa37880 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ServerPingMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ServerPingMessage.java
@@ -58,7 +58,7 @@ public class ServerPingMessage extends PooledDistributionMessage {
    */
   public static boolean send(GemFireCacheImpl cache, Set<InternalDistributedMember> recipients) {
 
-    InternalDistributedSystem ids = cache.getDistributedSystem();
+    InternalDistributedSystem ids = cache.getInternalDistributedSystem();
     DM dm = ids.getDistributionManager();
     Set<InternalDistributedMember> filteredRecipients = new HashSet<InternalDistributedMember>();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/TXMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXMessage.java
index 08ce99b..fd53fb1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXMessage.java
@@ -74,7 +74,7 @@ public abstract class TXMessage extends SerialDistributionMessage
         logger.debug("processing {}", this);
       }
       GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-      if (checkCacheClosing(cache) || checkDSClosing(cache.getDistributedSystem())) {
+      if (checkCacheClosing(cache) || checkDSClosing(cache.getInternalDistributedSystem())) {
         thr = new CacheClosedException(LocalizedStrings.PartitionMessage_REMOTE_CACHE_IS_CLOSED_0
             .toLocalizedString(dm.getId()));
         return;

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
----------------------------------------------------------------------
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 0de41bf..7578f15 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
@@ -279,7 +279,7 @@ public class HeapMemoryMonitor implements NotificationListener, MemoryMonitor {
       }
 
       // Stop the stats listener
-      final GemFireStatSampler sampler = this.cache.getDistributedSystem().getStatSampler();
+      final GemFireStatSampler sampler = this.cache.getInternalDistributedSystem().getStatSampler();
       if (sampler != null) {
         sampler.removeLocalStatListener(this.statListener);
       }
@@ -294,7 +294,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.getDistributedSystem().getStatSampler();
+    final GemFireStatSampler sampler = this.cache.getInternalDistributedSystem().getStatSampler();
     if (sampler == null) {
       return false;
     }
@@ -302,7 +302,7 @@ public class HeapMemoryMonitor implements NotificationListener, MemoryMonitor {
     try {
       sampler.waitForInitialization();
       String tenuredPoolName = getTenuredMemoryPoolMXBean().getName();
-      List list = this.cache.getDistributedSystem().getStatsList();
+      List list = this.cache.getInternalDistributedSystem().getStatsList();
       for (Object o : list) {
         if (o instanceof StatisticsImpl) {
           StatisticsImpl si = (StatisticsImpl) o;

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
index 70224f2..7ee5a8d 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
@@ -2783,7 +2783,7 @@ public class HARegionQueue implements RegionQueue {
      */
     @Override
     public void run() {
-      InternalDistributedSystem ids = cache.getDistributedSystem();
+      InternalDistributedSystem ids = cache.getInternalDistributedSystem();
       DM dm = ids.getDistributionManager();
 
       try { // ensure exit message is printed

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
index deb53cb..d2672df 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
@@ -68,7 +68,7 @@ public class BackupManager implements MembershipListener {
   }
 
   public void start() {
-    final DM distributionManager = cache.getDistributedSystem().getDistributionManager();
+    final DM distributionManager = cache.getInternalDistributedSystem().getDistributionManager();
     // We need to watch for pure admin guys that depart. this allMembershipListener set
     // looks like it should receive those events.
     Set allIds = distributionManager.addAllMembershipListenerAndGetAllIds(this);
@@ -85,7 +85,7 @@ public class BackupManager implements MembershipListener {
     for (DiskStoreImpl store : diskStores) {
       store.releaseBackupLock();
     }
-    final DM distributionManager = cache.getDistributedSystem().getDistributionManager();
+    final DM distributionManager = cache.getInternalDistributedSystem().getDistributionManager();
     distributionManager.removeAllMembershipListener(this);
     cache.clearBackupManager();
   }
@@ -326,7 +326,8 @@ public class BackupManager implements MembershipListener {
   }
 
   private File getBackupDir(File targetDir) throws IOException {
-    InternalDistributedMember memberId = cache.getDistributedSystem().getDistributedMember();
+    InternalDistributedMember memberId =
+        cache.getInternalDistributedSystem().getDistributedMember();
     String vmId = memberId.toString();
     vmId = cleanSpecialCharacters(vmId);
     File backupDir = new File(targetDir, vmId);

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
index 3b0c2ff..18f13f8 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
@@ -1320,7 +1320,8 @@ public class CacheClientProxy implements ClientSession {
       if (r instanceof PartitionedRegion) {
         // need to flush all buckets. SFO should be changed to target buckets
         // belonging to a particular PR, but it doesn't have that option right now
-        sfo = new StateFlushOperation(this._cache.getDistributedSystem().getDistributionManager());
+        sfo = new StateFlushOperation(
+            this._cache.getInternalDistributedSystem().getDistributionManager());
       } else {
         sfo = new StateFlushOperation((DistributedRegion) r);
       }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/tx/ClientTXStateStub.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/ClientTXStateStub.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/ClientTXStateStub.java
index ad3f103..8a1f8b1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/ClientTXStateStub.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/ClientTXStateStub.java
@@ -166,7 +166,7 @@ public class ClientTXStateStub extends TXStateStub {
       return;
     }
     cache.getCancelCriterion().checkCancelInProgress(null);
-    InternalDistributedSystem ds = cache.getDistributedSystem();
+    InternalDistributedSystem ds = cache.getInternalDistributedSystem();
     DM dm = ds.getDistributionManager();
 
     txcm.setDM(dm);

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
index 1c94f94..ab3b3cf 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
@@ -12,7 +12,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-
 package org.apache.geode.internal.cache.wan;
 
 import java.io.IOException;
@@ -26,6 +25,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.geode.InternalGemFireError;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.execute.BucketMovedException;
 import org.apache.geode.internal.cache.ha.ThreadIdentifier;
 import org.apache.geode.internal.cache.wan.parallel.WaitUntilParallelGatewaySenderFlushedCoordinator;
@@ -82,16 +82,14 @@ import org.apache.geode.internal.offheap.annotations.Unretained;
 /**
  * Abstract implementation of both Serial and Parallel GatewaySender. It handles common
  * functionality like initializing proxy.
- * 
- * 
+ *
  * @since GemFire 7.0
  */
-
 public abstract class AbstractGatewaySender implements GatewaySender, DistributionAdvisee {
 
   private static final Logger logger = LogService.getLogger();
 
-  protected Cache cache;
+  protected InternalCache cache;
 
   protected String id;
 
@@ -229,7 +227,7 @@ public abstract class AbstractGatewaySender implements GatewaySender, Distributi
 
   protected AbstractGatewaySender() {}
 
-  public AbstractGatewaySender(Cache cache, GatewaySenderAttributes attrs) {
+  public AbstractGatewaySender(InternalCache cache, GatewaySenderAttributes attrs) {
     this.cache = cache;
     this.id = attrs.getId();
     this.socketBufferSize = attrs.getSocketBufferSize();
@@ -258,8 +256,8 @@ public abstract class AbstractGatewaySender implements GatewaySender, Distributi
     // if dispatcherThreads is 1 then maxMemoryPerDispatcherQueue will be same as maximumQueueMemory
     // of sender
     this.maxMemoryPerDispatcherQueue = this.queueMemory / this.dispatcherThreads;
-    this.myDSId = InternalDistributedSystem.getAnyInstance().getDistributionManager()
-        .getDistributedSystemId();
+    this.myDSId =
+        this.cache.getInternalDistributedSystem().getDistributionManager().getDistributedSystemId();
     this.serialNumber = DistributionAdvisor.createSerialNumber();
     this.isMetaQueue = attrs.isMetaQueue();
     if (!(this.cache instanceof CacheCreation)) {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAdvisor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAdvisor.java
index baa9d9c..c831b26 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAdvisor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAdvisor.java
@@ -300,7 +300,7 @@ public class GatewaySenderAdvisor extends DistributionAdvisor {
 
   public void initDLockService() {
     InternalDistributedSystem ds =
-        ((GemFireCacheImpl) this.sender.getCache()).getDistributedSystem();
+        ((GemFireCacheImpl) this.sender.getCache()).getInternalDistributedSystem();
     String dlsName = getDLockServiceName();
     this.lockService = DistributedLockService.getServiceNamed(dlsName);
     if (this.lockService == null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/wan/WANServiceProvider.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/WANServiceProvider.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/WANServiceProvider.java
index 2aed0ee..229736a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/WANServiceProvider.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/WANServiceProvider.java
@@ -17,11 +17,11 @@ package org.apache.geode.internal.cache.wan;
 import java.util.Iterator;
 import java.util.ServiceLoader;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.client.internal.locator.wan.LocatorMembershipListener;
 import org.apache.geode.cache.wan.GatewayReceiverFactory;
 import org.apache.geode.cache.wan.GatewaySenderFactory;
 import org.apache.geode.distributed.internal.WanLocatorDiscoverer;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.wan.spi.WANFactory;
 
 public class WANServiceProvider {
@@ -38,7 +38,7 @@ public class WANServiceProvider {
     }
   }
 
-  public static GatewaySenderFactory createGatewaySenderFactory(Cache cache) {
+  public static GatewaySenderFactory createGatewaySenderFactory(InternalCache cache) {
     if (factory == null) {
       throw new IllegalStateException("WAN service is not available.");
     }
@@ -46,7 +46,7 @@ public class WANServiceProvider {
 
   }
 
-  public static GatewayReceiverFactory createGatewayReceiverFactory(Cache cache) {
+  public static GatewayReceiverFactory createGatewayReceiverFactory(InternalCache cache) {
     if (factory == null) {
       throw new IllegalStateException("WAN service is not available.");
     }
@@ -67,7 +67,5 @@ public class WANServiceProvider {
     return factory.createLocatorMembershipListener();
   }
 
-  private WANServiceProvider() {
-
-  }
+  private WANServiceProvider() {}
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
index adc967f..cf4c5a9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
@@ -1664,7 +1664,7 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
     @Override
     public void run() {
       try {
-        InternalDistributedSystem ids = cache.getDistributedSystem();
+        InternalDistributedSystem ids = cache.getInternalDistributedSystem();
         DM dm = ids.getDistributionManager();
         for (;;) {
           try { // be somewhat tolerant of failures

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
index e6d54c5..02baf81 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
@@ -1089,7 +1089,7 @@ public class SerialGatewaySenderQueue implements RegionQueue {
 
     @Override
     public void run() {
-      InternalDistributedSystem ids = cache.getDistributedSystem();
+      InternalDistributedSystem ids = cache.getInternalDistributedSystem();
 
       try { // ensure exit message is printed
         // Long waitTime = Long.getLong(QUEUE_REMOVAL_WAIT_TIME, 1000);

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/wan/spi/WANFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/spi/WANFactory.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/spi/WANFactory.java
index 918c373..3af9bf8 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/spi/WANFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/spi/WANFactory.java
@@ -14,17 +14,17 @@
  */
 package org.apache.geode.internal.cache.wan.spi;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.client.internal.locator.wan.LocatorMembershipListener;
 import org.apache.geode.cache.wan.GatewayReceiverFactory;
 import org.apache.geode.cache.wan.GatewaySenderFactory;
 import org.apache.geode.distributed.internal.WanLocatorDiscoverer;
+import org.apache.geode.internal.cache.InternalCache;
 
 public interface WANFactory {
 
-  GatewaySenderFactory createGatewaySenderFactory(Cache cache);
+  GatewaySenderFactory createGatewaySenderFactory(InternalCache cache);
 
-  GatewayReceiverFactory createGatewayReceiverFactory(Cache cache);
+  GatewayReceiverFactory createGatewayReceiverFactory(InternalCache cache);
 
   WanLocatorDiscoverer createLocatorDiscoverer();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
index b0b7d1b..a5f0fc2 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
@@ -29,7 +29,6 @@ import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.Executor;
@@ -115,6 +114,7 @@ import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.PoolFactoryImpl;
 import org.apache.geode.internal.cache.PoolManagerImpl;
+import org.apache.geode.internal.cache.RegionListener;
 import org.apache.geode.internal.cache.TXManagerImpl;
 import org.apache.geode.internal.cache.TombstoneService;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
@@ -145,7 +145,6 @@ import org.apache.geode.pdx.internal.TypeRegistry;
  * {@link Cache} interface so that this class must be updated when {@link Cache} is modified. This
  * class is public for testing purposes.
  *
- *
  * @since GemFire 3.0
  */
 public class CacheCreation implements InternalCache {
@@ -1066,12 +1065,6 @@ public class CacheCreation implements InternalCache {
     return null;
   }
 
-  // public GatewayReceiver addGatewayReceiver(){
-  // GatewayReceiverCreation receiver = new GatewayReceiverCreation();
-  // this.gatewayReceivers.add(receiver);
-  // return receiver;
-  // }
-  //
   public Set<GatewayReceiver> getGatewayReceivers() {
     return this.gatewayReceivers;
   }
@@ -1296,6 +1289,31 @@ public class CacheCreation implements InternalCache {
     return false;
   }
 
+  @Override
+  public InternalDistributedSystem getInternalDistributedSystem() {
+    return InternalDistributedSystem.getAnyInstance();
+  }
+
+  @Override
+  public Set<PartitionedRegion> getPartitionedRegions() {
+    throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString());
+  }
+
+  @Override
+  public void addRegionListener(final RegionListener l) {
+    throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString());
+  }
+
+  @Override
+  public void removeRegionListener(final RegionListener l) {
+    throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString());
+  }
+
+  @Override
+  public Set<RegionListener> getRegionListeners() {
+    throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString());
+  }
+
   public GatewaySenderFactory createGatewaySenderFactory() {
     return WANServiceProvider.createGatewaySenderFactory(this);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelAsyncEventQueueCreation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelAsyncEventQueueCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelAsyncEventQueueCreation.java
index 1e3429c..4d0aac9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelAsyncEventQueueCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelAsyncEventQueueCreation.java
@@ -17,107 +17,75 @@ package org.apache.geode.internal.cache.xmlcache;
 import java.util.List;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionAdvisee;
 import org.apache.geode.distributed.internal.DistributionAdvisor;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.DistributionAdvisor.Profile;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.EnumListenerEvent;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.wan.AbstractGatewaySender;
 import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
 
 public class ParallelAsyncEventQueueCreation extends AbstractGatewaySender
     implements GatewaySender {
 
-  public ParallelAsyncEventQueueCreation(Cache cache, GatewaySenderAttributes attrs) {
+  public ParallelAsyncEventQueueCreation(InternalCache cache, GatewaySenderAttributes attrs) {
     super(cache, attrs);
   }
 
   public void distribute(EnumListenerEvent operation, EntryEventImpl event,
-      List<Integer> remoteDSIds) {
-    // TODO Auto-generated method stub
-
-  }
+      List<Integer> remoteDSIds) {}
 
   @Override
-  public void start() {
-    // TODO Auto-generated method stub
+  public void start() {}
 
-  }
-
-  public void stop() {
-    // TODO Auto-generated method stub
-
-  }
+  public void stop() {}
 
   public void rebalance() {
     throw new UnsupportedOperationException();
   }
 
-  public void fillInProfile(Profile profile) {
-    // TODO Auto-generated method stub
-
-  }
+  public void fillInProfile(Profile profile) {}
 
   public CancelCriterion getCancelCriterion() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisor getDistributionAdvisor() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DM getDistributionManager() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getFullPath() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getName() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisee getParentAdvisee() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public Profile getProfile() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public int getSerialNumber() {
-    // TODO Auto-generated method stub
     return 0;
   }
 
   public InternalDistributedSystem getSystem() {
-    // TODO Auto-generated method stub
     return null;
   }
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see
-   * org.apache.geode.internal.cache.wan.AbstractGatewaySender#setModifiedEventId(org.apache.geode.
-   * internal.cache.EntryEventImpl)
-   */
   @Override
-  protected void setModifiedEventId(EntryEventImpl clonedEvent) {
-    // TODO Auto-generated method stub
-
-  }
-
+  protected void setModifiedEventId(EntryEventImpl clonedEvent) {}
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelGatewaySenderCreation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelGatewaySenderCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelGatewaySenderCreation.java
index 0dc6b82..3cd60c7 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelGatewaySenderCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ParallelGatewaySenderCreation.java
@@ -17,7 +17,6 @@ package org.apache.geode.internal.cache.xmlcache;
 import java.util.List;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionAdvisee;
@@ -26,31 +25,23 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.DistributionAdvisor.Profile;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.EnumListenerEvent;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.wan.AbstractGatewaySender;
 import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
 
 public class ParallelGatewaySenderCreation extends AbstractGatewaySender implements GatewaySender {
 
-  public ParallelGatewaySenderCreation(Cache cache, GatewaySenderAttributes attrs) {
+  public ParallelGatewaySenderCreation(InternalCache cache, GatewaySenderAttributes attrs) {
     super(cache, attrs);
   }
 
   public void distribute(EnumListenerEvent operation, EntryEventImpl event,
-      List<Integer> remoteDSIds) {
-    // TODO Auto-generated method stub
-
-  }
+      List<Integer> remoteDSIds) {}
 
   @Override
-  public void start() {
-    // TODO Auto-generated method stub
-
-  }
-
-  public void stop() {
-    // TODO Auto-generated method stub
+  public void start() {}
 
-  }
+  public void stop() {}
 
   public void rebalance() {
     throw new UnsupportedOperationException();
@@ -59,67 +50,44 @@ public class ParallelGatewaySenderCreation extends AbstractGatewaySender impleme
   @Override
   public void destroy() {}
 
-  public void fillInProfile(Profile profile) {
-    // TODO Auto-generated method stub
-
-  }
+  public void fillInProfile(Profile profile) {}
 
   public CancelCriterion getCancelCriterion() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisor getDistributionAdvisor() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DM getDistributionManager() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getFullPath() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getName() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisee getParentAdvisee() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public Profile getProfile() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public int getSerialNumber() {
-    // TODO Auto-generated method stub
     return 0;
   }
 
   public InternalDistributedSystem getSystem() {
-    // TODO Auto-generated method stub
     return null;
   }
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see
-   * org.apache.geode.internal.cache.wan.AbstractGatewaySender#setModifiedEventId(org.apache.geode.
-   * internal.cache.EntryEventImpl)
-   */
   @Override
-  protected void setModifiedEventId(EntryEventImpl clonedEvent) {
-    // TODO Auto-generated method stub
-
-  }
-
+  protected void setModifiedEventId(EntryEventImpl clonedEvent) {}
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialAsyncEventQueueCreation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialAsyncEventQueueCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialAsyncEventQueueCreation.java
index 856ec3c..89f345b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialAsyncEventQueueCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialAsyncEventQueueCreation.java
@@ -17,7 +17,6 @@ package org.apache.geode.internal.cache.xmlcache;
 import java.util.List;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionAdvisee;
@@ -26,88 +25,66 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.DistributionAdvisor.Profile;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.EnumListenerEvent;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.wan.AbstractGatewaySender;
 import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
 
-
 public class SerialAsyncEventQueueCreation extends AbstractGatewaySender implements GatewaySender {
 
-  public SerialAsyncEventQueueCreation(Cache cache, GatewaySenderAttributes attrs) {
+  public SerialAsyncEventQueueCreation(InternalCache cache, GatewaySenderAttributes attrs) {
     super(cache, attrs);
   }
 
   public void distribute(EnumListenerEvent operation, EntryEventImpl event,
-      List<Integer> remoteDSIds) {
-
-  }
+      List<Integer> remoteDSIds) {}
 
   @Override
-  public void start() {
-
-  }
-
-  public void stop() {
+  public void start() {}
 
-  }
+  public void stop() {}
 
   public void rebalance() {
     throw new UnsupportedOperationException();
   }
 
-  public void fillInProfile(Profile profile) {
-    // TODO Auto-generated method stub
-
-  }
+  public void fillInProfile(Profile profile) {}
 
   public CancelCriterion getCancelCriterion() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisor getDistributionAdvisor() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DM getDistributionManager() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getFullPath() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getName() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisee getParentAdvisee() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public Profile getProfile() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public int getSerialNumber() {
-    // TODO Auto-generated method stub
     return 0;
   }
 
   public InternalDistributedSystem getSystem() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   @Override
-  protected void setModifiedEventId(EntryEventImpl clonedEvent) {
-    // TODO Auto-generated method stub
-
-  }
-
+  protected void setModifiedEventId(EntryEventImpl clonedEvent) {}
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialGatewaySenderCreation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialGatewaySenderCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialGatewaySenderCreation.java
index 7764c58..9aff712 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialGatewaySenderCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/SerialGatewaySenderCreation.java
@@ -17,7 +17,6 @@ package org.apache.geode.internal.cache.xmlcache;
 import java.util.List;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.wan.GatewaySender;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionAdvisee;
@@ -26,88 +25,66 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.DistributionAdvisor.Profile;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.EnumListenerEvent;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.wan.AbstractGatewaySender;
 import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
 
-
 public class SerialGatewaySenderCreation extends AbstractGatewaySender implements GatewaySender {
 
-  public SerialGatewaySenderCreation(Cache cache, GatewaySenderAttributes attrs) {
+  public SerialGatewaySenderCreation(InternalCache cache, GatewaySenderAttributes attrs) {
     super(cache, attrs);
   }
 
   public void distribute(EnumListenerEvent operation, EntryEventImpl event,
-      List<Integer> remoteDSIds) {
-
-  }
+      List<Integer> remoteDSIds) {}
 
   @Override
-  public void start() {
-
-  }
-
-  public void stop() {
+  public void start() {}
 
-  }
+  public void stop() {}
 
   public void rebalance() {
     throw new UnsupportedOperationException();
   }
 
-  public void fillInProfile(Profile profile) {
-    // TODO Auto-generated method stub
-
-  }
+  public void fillInProfile(Profile profile) {}
 
   public CancelCriterion getCancelCriterion() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisor getDistributionAdvisor() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DM getDistributionManager() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getFullPath() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public String getName() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public DistributionAdvisee getParentAdvisee() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public Profile getProfile() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   public int getSerialNumber() {
-    // TODO Auto-generated method stub
     return 0;
   }
 
   public InternalDistributedSystem getSystem() {
-    // TODO Auto-generated method stub
     return null;
   }
 
   @Override
-  protected void setModifiedEventId(EntryEventImpl clonedEvent) {
-    // TODO Auto-generated method stub
-
-  }
-
+  protected void setModifiedEventId(EntryEventImpl clonedEvent) {}
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java b/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
index 45916bc..3adbce0 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java
@@ -220,7 +220,7 @@ public class LocalManager extends Manager {
         managementTask.run();
         // All local resources are created for the ManagementTask
         // Now Management tasks can proceed.
-        int updateRate = cache.getDistributedSystem().getConfig().getJmxManagerUpdateRate();
+        int updateRate = cache.getInternalDistributedSystem().getConfig().getJmxManagerUpdateRate();
         singleThreadFederationScheduler.scheduleAtFixedRate(managementTask, updateRate, updateRate,
             TimeUnit.MILLISECONDS);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java b/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java
index 5cbb990..9394efb 100755
--- a/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java
@@ -123,9 +123,9 @@ public class ManagementAgent {
   }
 
   private boolean isServerNode(GemFireCacheImpl cache) {
-    return (cache.getDistributedSystem().getDistributedMember()
+    return (cache.getInternalDistributedSystem().getDistributedMember()
         .getVmKind() != DistributionManager.LOCATOR_DM_TYPE
-        && cache.getDistributedSystem().getDistributedMember()
+        && cache.getInternalDistributedSystem().getDistributedMember()
             .getVmKind() != DistributionManager.ADMIN_ONLY_DM_TYPE
         && !cache.isClient());
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementAdapter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementAdapter.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementAdapter.java
index 183a5a8..1dc90dc 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementAdapter.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementAdapter.java
@@ -185,9 +185,9 @@ public class ManagementAdapter {
       }
 
 
-      if (cache.getDistributedSystem().getConfig().getJmxManager()) {
+      if (cache.getInternalDistributedSystem().getConfig().getJmxManager()) {
         this.service.createManager();
-        if (cache.getDistributedSystem().getConfig().getJmxManagerStart()) {
+        if (cache.getInternalDistributedSystem().getConfig().getJmxManagerStart()) {
           this.service.startManager();
         }
       }
@@ -1036,7 +1036,8 @@ public class ManagementAdapter {
       return;
     }
     // Don't register the CacheServices in the Locator
-    InternalDistributedMember member = cacheImpl.getDistributedSystem().getDistributedMember();
+    InternalDistributedMember member =
+        cacheImpl.getInternalDistributedSystem().getDistributedMember();
     if (member.getVmKind() == DistributionManager.LOCATOR_DM_TYPE) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
index 1559aad..d6a1efa 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
@@ -299,8 +299,8 @@ public class MemberMBeanBridge {
 
     if (dm instanceof DistributionManager) {
       DistributionManager distManager = (DistributionManager) system.getDistributionManager();
-      this.redundancyZone =
-          distManager.getRedundancyZone(cache.getDistributedSystem().getDistributedMember());
+      this.redundancyZone = distManager
+          .getRedundancyZone(cache.getInternalDistributedSystem().getDistributedMember());
     }
 
 
@@ -1038,7 +1038,7 @@ public class MemberMBeanBridge {
 
       try {
         BackupManager manager =
-            cache.startBackup(cache.getDistributedSystem().getDistributedMember());
+            cache.startBackup(cache.getInternalDistributedSystem().getDistributedMember());
         boolean abort = true;
         Set<PersistentID> existingDataStores;
         Set<PersistentID> successfulDataStores;

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
index 6dd5615..28ce092 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
@@ -393,7 +393,7 @@ public class CreateAlterDestroyRegionCommands extends AbstractCommandsSupport {
   public boolean verifyDistributedRegionMbean(Cache cache, String regionName) {
     GemFireCacheImpl gemfireCache = (GemFireCacheImpl) cache;
     int federationInterval =
-        gemfireCache.getDistributedSystem().getConfig().getJmxManagerUpdateRate();
+        gemfireCache.getInternalDistributedSystem().getConfig().getJmxManagerUpdateRate();
     long timeEnd = System.currentTimeMillis() + federationInterval + 50;
 
     for (; System.currentTimeMillis() <= timeEnd;) {

http://git-wip-us.apache.org/repos/asf/geode/blob/76c49838/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
index 148aa5f..421f9d7 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
@@ -52,8 +52,8 @@ public class DeployFunction implements Function, InternalEntity {
       final byte[][] jarBytes = (byte[][]) args[1];
       Cache cache = CacheFactory.getAnyInstance();
 
-      final JarDeployer jarDeployer = new JarDeployer(
-          ((GemFireCacheImpl) cache).getDistributedSystem().getConfig().getDeployWorkingDir());
+      final JarDeployer jarDeployer = new JarDeployer(((GemFireCacheImpl) cache)
+          .getInternalDistributedSystem().getConfig().getDeployWorkingDir());
 
       DistributedMember member = cache.getDistributedSystem().getDistributedMember();
 


Mime
View raw message