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 19:10:08 UTC
[geode] branch develop updated: GEODE-3594: remove calls of
getInstance (#1029)
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 369af90 GEODE-3594: remove calls of getInstance (#1029)
369af90 is described below
commit 369af90d2a2cf9286d12c365a11402a5f43639d7
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Thu Nov 9 11:10:06 2017 -0800
GEODE-3594: remove calls of getInstance (#1029)
GEODE-3594: remove calls of getInstance
DM.getExistingCache is now used instead.
---
.../geode/internal/cache/SearchLoadAndWriteProcessor.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
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 552048c..f7e8506 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
@@ -1271,7 +1271,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
}
private int getSearchTimeout() {
- return region.getCache().getSearchTimeout(); // CacheFactory.getInstance(((DistributedRegion)this.region).getSystem()).getSearchTimeout();
+ return region.getCache().getSearchTimeout();
}
private void resetResults() {
@@ -1504,7 +1504,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
try {
// check to see if we would have to wait on initialization latch (if global)
// if so abort and reply with null
- InternalCache cache = (InternalCache) CacheFactory.getInstance(dm.getSystem());
+ InternalCache cache = dm.getExistingCache();
if (cache.isGlobalRegionInitializing(this.regionName)) {
replyWithNull(dm);
if (logger.isDebugEnabled()) {
@@ -1513,8 +1513,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
return;
}
- LocalRegion region =
- (LocalRegion) CacheFactory.getInstance(dm.getSystem()).getRegion(this.regionName);
+ LocalRegion region = (LocalRegion) dm.getExistingCache().getRegion(this.regionName);
Object o = null;
if (region != null) {
@@ -1850,8 +1849,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
int oldLevel = LocalRegion.setThreadInitLevelRequirement(LocalRegion.BEFORE_INITIAL_IMAGE);
try {
- LocalRegion region =
- (LocalRegion) CacheFactory.getInstance(dm.getSystem()).getRegion(this.regionName);
+ LocalRegion region = (LocalRegion) dm.getExistingCache().getRegion(this.regionName);
if (region != null) {
setClearCountReference(region);
try {
@@ -2210,7 +2208,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
long startTime = dm.cacheTimeMillis();
int oldLevel = LocalRegion.setThreadInitLevelRequirement(LocalRegion.BEFORE_INITIAL_IMAGE);
try {
- InternalCache gfc = (InternalCache) CacheFactory.getInstance(dm.getSystem());
+ InternalCache gfc = dm.getExistingCache();
LocalRegion region = (LocalRegion) gfc.getRegion(this.regionName);
if (region != null && region.isInitialized()
&& (dm.cacheTimeMillis() - startTime < timeoutMs)) {
@@ -2467,7 +2465,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
long startTime = dm.cacheTimeMillis();
int oldLevel = LocalRegion.setThreadInitLevelRequirement(LocalRegion.BEFORE_INITIAL_IMAGE);
try {
- InternalCache gfc = (InternalCache) CacheFactory.getInstance(dm.getSystem());
+ InternalCache gfc = dm.getExistingCache();
LocalRegion region = (LocalRegion) gfc.getRegion(this.regionName);
if (region != null && region.isInitialized()
&& (dm.cacheTimeMillis() - startTime < timeoutMs)) {
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].