You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2017/11/09 18:32:46 UTC

[geode] branch develop updated: GEODE-3599: remove getInstance calls (#1037)

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

dschneider pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2d5d643  GEODE-3599: remove getInstance calls (#1037)
2d5d643 is described below

commit 2d5d64394bccd0555ef7255c739d50eb7f412072
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Thu Nov 9 10:32:44 2017 -0800

    GEODE-3599: remove getInstance calls (#1037)
    
    GEODE-3599: remove getInstance calls
    
    DM.getExsitingCache is now used instead.
---
 .../java/org/apache/geode/internal/cache/CreateRegionProcessor.java     | 2 +-
 .../apache/geode/internal/cache/persistence/MembershipFlushRequest.java | 2 +-
 .../apache/geode/internal/cache/persistence/MembershipViewRequest.java  | 2 +-
 .../geode/internal/cache/persistence/PersistentStateQueryMessage.java   | 2 +-
 .../internal/cache/persistence/PrepareNewPersistentMemberMessage.java   | 2 +-
 .../geode/internal/cache/persistence/RemovePersistentMemberMessage.java | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
index 5680472..94abc68 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
@@ -344,7 +344,7 @@ public class CreateRegionProcessor implements ProfileExchangeProcessor {
         // get the region from the path, but do NOT wait on initialization,
         // otherwise we could have a distributed deadlock
 
-        InternalCache cache = (InternalCache) CacheFactory.getInstance(dm.getSystem());
+        InternalCache cache = dm.getExistingCache();
 
         // Fix for bug 42051 - Discover any regions that are in the process
         // of being destroyed
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipFlushRequest.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipFlushRequest.java
index 2a30856..25980d9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipFlushRequest.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipFlushRequest.java
@@ -73,7 +73,7 @@ public class MembershipFlushRequest extends PooledDistributionMessage implements
       // get the region from the path, but do NOT wait on initialization,
       // otherwise we could have a distributed deadlock
 
-      Cache cache = CacheFactory.getInstance(dm.getSystem());
+      Cache cache = dm.getExistingCache();
       PartitionedRegion region = (PartitionedRegion) cache.getRegion(this.regionPath);
       if (region != null && region.getRegionAdvisor().isInitialized()) {
         ProxyBucketRegion[] proxyBuckets = region.getRegionAdvisor().getProxyBucketArray();
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipViewRequest.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipViewRequest.java
index 420d256..82dc815 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipViewRequest.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipViewRequest.java
@@ -108,7 +108,7 @@ public class MembershipViewRequest extends DistributionMessage implements Messag
       // get the region from the path, but do NOT wait on initialization,
       // otherwise we could have a distributed deadlock
 
-      Cache cache = CacheFactory.getInstance(dm.getSystem());
+      Cache cache = dm.getExistingCache();
       Region region = cache.getRegion(this.regionPath);
       PersistenceAdvisor persistenceAdvisor = null;
       if (region instanceof DistributedRegion) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistentStateQueryMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistentStateQueryMessage.java
index 018325d..e87fd46 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistentStateQueryMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistentStateQueryMessage.java
@@ -101,7 +101,7 @@ public class PersistentStateQueryMessage extends HighPriorityDistributionMessage
       // get the region from the path, but do NOT wait on initialization,
       // otherwise we could have a distributed deadlock
 
-      Cache cache = CacheFactory.getInstance(dm.getSystem());
+      Cache cache = dm.getExistingCache();
       Region region = cache.getRegion(this.regionPath);
       PersistenceAdvisor persistenceAdvisor = null;
       if (region instanceof DistributedRegion) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PrepareNewPersistentMemberMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PrepareNewPersistentMemberMessage.java
index 5029bb0..f0385d9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PrepareNewPersistentMemberMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PrepareNewPersistentMemberMessage.java
@@ -91,7 +91,7 @@ public class PrepareNewPersistentMemberMessage extends HighPriorityDistributionM
       // get the region from the path, but do NOT wait on initialization,
       // otherwise we could have a distributed deadlock
 
-      Cache cache = CacheFactory.getInstance(dm.getSystem());
+      Cache cache = dm.getExistingCache();
       Region region = cache.getRegion(this.regionPath);
       PersistenceAdvisor persistenceAdvisor = null;
       if (region instanceof DistributedRegion) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/RemovePersistentMemberMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/RemovePersistentMemberMessage.java
index a035c74..0d67ca0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/RemovePersistentMemberMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/RemovePersistentMemberMessage.java
@@ -95,7 +95,7 @@ public class RemovePersistentMemberMessage extends HighPriorityDistributionMessa
       // get the region from the path, but do NOT wait on initialization,
       // otherwise we could have a distributed deadlock
 
-      Cache cache = CacheFactory.getInstance(dm.getSystem());
+      Cache cache = dm.getExistingCache();
       Region region = cache.getRegion(this.regionPath);
       PersistenceAdvisor persistenceAdvisor = null;
       if (region instanceof DistributedRegion) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].