geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [10/21] incubator-geode git commit: Fix for GEODE-109
Date Thu, 24 Sep 2015 22:44:47 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/FlushAllExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/FlushAllExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/FlushAllExecutor.java
index 7f8d4e0..40c22b6 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/FlushAllExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/FlushAllExecutor.java
@@ -2,6 +2,7 @@ package com.gemstone.gemfire.internal.redis.executor;
 
 import java.util.Map.Entry;
 
+import com.gemstone.gemfire.cache.EntryDestroyedException;
 import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
 import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
@@ -15,11 +16,15 @@ public class FlushAllExecutor extends AbstractExecutor {
     if (context.hasTransaction())
       throw new UnsupportedOperationInTransactionException();
 
-    for (Entry<String, RedisDataType> e: context.getRegionCache().metaEntrySet()) {
-      String skey = e.getKey();
-      RedisDataType type = e.getValue();
-      removeEntry(Coder.stringToByteWrapper(skey), type, context);
-        
+    for (Entry<String, RedisDataType> e: context.getRegionProvider().metaEntrySet()) {
+      try {
+        String skey = e.getKey();
+        RedisDataType type = e.getValue();
+        removeEntry(Coder.stringToByteWrapper(skey), type, context);
+      } catch (EntryDestroyedException e1) {
+        continue;
+      }
+
     }
 
     command.setResponse(Coder.getSimpleStringResponse(context.getByteBufAllocator(), "OK"));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/KeysExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/KeysExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/KeysExecutor.java
index 4276e9f..2588217 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/KeysExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/KeysExecutor.java
@@ -11,7 +11,7 @@ import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.RedisConstants;
 import com.gemstone.gemfire.internal.redis.RedisConstants.ArityDef;
-import com.gemstone.gemfire.internal.redis.executor.org.apache.hadoop.fs.GlobPattern;
+import com.gemstone.gemfire.internal.redis.org.apache.hadoop.fs.GlobPattern;
 import com.gemstone.gemfire.redis.GemFireRedisServer;
 
 public class KeysExecutor extends AbstractExecutor {
@@ -25,7 +25,7 @@ public class KeysExecutor extends AbstractExecutor {
     }
 
     String glob = Coder.bytesToString(commandElems.get(1));
-    Set<String> allKeys = context.getRegionCache().metaKeySet();
+    Set<String> allKeys = context.getRegionProvider().metaKeySet();
     List<String> matchingKeys = new ArrayList<String>();
 
     Pattern pattern;
@@ -37,8 +37,7 @@ public class KeysExecutor extends AbstractExecutor {
     }
 
     for (String key: allKeys) {
-      if (!(key.equals(GemFireRedisServer.LISTS_META_DATA_REGION) ||
-              key.equals(GemFireRedisServer.REDIS_META_DATA_REGION) ||
+      if (!(key.equals(GemFireRedisServer.REDIS_META_DATA_REGION) ||
               key.equals(GemFireRedisServer.STRING_REGION) ||
               key.equals(GemFireRedisServer.HLL_REGION))
               && pattern.matcher(key).matches())

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ListQuery.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ListQuery.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ListQuery.java
index 3980061..4ae9990 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ListQuery.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ListQuery.java
@@ -4,19 +4,19 @@ public enum ListQuery {
 
   LINDEX {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry ORDER BY key asc LIMIT $1";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE key != 'head' AND key != 'tail' ORDER BY key asc LIMIT $1";
     }
   }, LRANGE {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry ORDER BY key asc LIMIT $1";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE key != 'head' AND key != 'tail' ORDER BY key asc LIMIT $1";
     }
   }, LREMG {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value = $1 ORDER BY key asc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value = $1 AND key != 'head' AND key != 'tail' ORDER BY key asc LIMIT $2";
     }
   }, LREML {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value = $1 ORDER BY key desc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value = $1 AND key != 'head' AND key != 'tail' ORDER BY key desc LIMIT $2";
     }
   }, LREME {
     public String getQueryString(String fullpath) {
@@ -24,11 +24,11 @@ public enum ListQuery {
     }
   }, LSET {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT * FROM " + fullpath + ".keySet key ORDER BY key asc LIMIT $1";
+      return "SELECT DISTINCT * FROM " + fullpath + ".keySet key WHERE key != 'head' AND key != 'tail' ORDER BY key asc LIMIT $1";
     }
   }, LTRIM {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT * FROM " + fullpath + ".keySet key ORDER BY key asc LIMIT $1";
+      return "SELECT DISTINCT * FROM " + fullpath + ".keySet key WHERE key != 'head' AND key != 'tail' ORDER BY key asc LIMIT $1";
     }
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PersistExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PersistExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PersistExecutor.java
index b027c9f..85ed437 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PersistExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PersistExecutor.java
@@ -25,7 +25,7 @@ public class PersistExecutor extends AbstractExecutor {
 
     ByteArrayWrapper key = command.getKey();
     
-    boolean canceled = context.getRegionCache().cancelKeyExpiration(key);
+    boolean canceled = context.getRegionProvider().cancelKeyExpiration(key);
     
     if (canceled)
       command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), TIMEOUT_REMOVED));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PingExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PingExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PingExecutor.java
index 9585b61..3387687 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PingExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/PingExecutor.java
@@ -1,7 +1,7 @@
 package com.gemstone.gemfire.internal.redis.executor;
 
-import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.Coder;
+import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 
 public class PingExecutor extends AbstractExecutor {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/QuitExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/QuitExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/QuitExecutor.java
index 88f0574..2bca4fb 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/QuitExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/QuitExecutor.java
@@ -1,9 +1,9 @@
 package com.gemstone.gemfire.internal.redis.executor;
 
+import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.RedisConstants;
-import com.gemstone.gemfire.internal.redis.Coder;
 
 public class QuitExecutor extends AbstractExecutor {
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ScanExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ScanExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ScanExecutor.java
index a87c725..9257aff 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ScanExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/ScanExecutor.java
@@ -84,7 +84,7 @@ public class ScanExecutor extends AbstractScanExecutor {
     }
 
     @SuppressWarnings("unchecked")
-    List<String> returnList = (List<String>) getIteration(context.getRegionCache().metaKeySet(), matchPattern, count, cursor);
+    List<String> returnList = (List<String>) getIteration(context.getRegionProvider().metaKeySet(), matchPattern, count, cursor);
 
     command.setResponse(Coder.getScanResponse(context.getByteBufAllocator(), returnList));
   }
@@ -98,7 +98,7 @@ public class ScanExecutor extends AbstractScanExecutor {
     int numElements = 0;
     int i = -1;
     for (String key: (Collection<String>) list) {
-      if (key.equals(GemFireRedisServer.REDIS_META_DATA_REGION) || key.equals(GemFireRedisServer.LISTS_META_DATA_REGION) || key.equals(GemFireRedisServer.STRING_REGION) || key.equals(GemFireRedisServer.HLL_REGION))
+      if (key.equals(GemFireRedisServer.REDIS_META_DATA_REGION) || key.equals(GemFireRedisServer.STRING_REGION) || key.equals(GemFireRedisServer.HLL_REGION))
         continue;
       i++;
       if (beforeCursor < cursor) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/SortedSetQuery.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/SortedSetQuery.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/SortedSetQuery.java
index 97d0398..24788dd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/SortedSetQuery.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/SortedSetQuery.java
@@ -104,67 +104,67 @@ public enum SortedSetQuery {
     }
   }, ZRBSNINFI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score <= $1 ORDER BY value asc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score <= $1 ORDER BY entry.value asc LIMIT $2";
     }
   }, ZRBSNINF {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score < $1 ORDER BY value asc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score < $1 ORDER BY entry.value asc LIMIT $2";
     }
   }, ZRBSPINFI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score >= $1 ORDER BY value asc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score >= $1 ORDER BY entry.value asc LIMIT $2";
     }
   }, ZRBSPINF {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score > $1 ORDER BY value asc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score > $1 ORDER BY entry.value asc LIMIT $2";
     }
   }, ZRBSSTISI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score >= $1 AND value.score <= $2 ORDER BY value asc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score >= $1 AND entry.value.score <= $2 ORDER BY entry.value asc LIMIT $3";
     }
   }, ZRBSSTI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score >= $1 AND value.score < $2 ORDER BY value asc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score >= $1 AND entry.value.score < $2 ORDER BY entry.value asc LIMIT $3";
     }
   }, ZRBSSI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score > $1 AND value.score <= $2 ORDER BY value asc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score > $1 AND entry.value.score <= $2 ORDER BY entry.value asc LIMIT $3";
     }
   }, ZRBS {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score > $1 AND value.score < $2 ORDER BY value asc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score > $1 AND entry.value.score < $2 ORDER BY entry.value asc LIMIT $3";
     }
   }, ZREVRBSNINFI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value <= $1 ORDER BY value desc, key desc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value <= $1 ORDER BY entry.value desc, entry.key desc LIMIT $2";
     }
   }, ZREVRBSNINF {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score < $1 ORDER BY value desc, key desc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score < $1 ORDER BY entry.value desc, entry.key desc LIMIT $2";
     }
   }, ZREVRBSPINFI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score >= $1 ORDER BY value desc, key desc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score >= $1 ORDER BY entry.value desc, entry.key desc LIMIT $2";
     }
   }, ZREVRBSPINF {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score > $1 ORDER BY value desc, key desc LIMIT $2";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score > $1 ORDER BY entry.value desc, entry.key desc LIMIT $2";
     }
   }, ZREVRBSSTISI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score >= $1 AND value.score <= $2 ORDER BY value desc, key desc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score >= $1 AND entry.value.score <= $2 ORDER BY entry.value desc, entry.key desc LIMIT $3";
     }
   }, ZREVRBSSTI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score >= $1 AND value.score < $2 ORDER BY value desc, key desc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score >= $1 AND entry.value.score < $2 ORDER BY entry.value desc, entry.key desc LIMIT $3";
     }
   }, ZREVRBSSI {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score > $1 AND value.score <= $2 ORDER BY value desc, key desc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score > $1 AND entry.value.score <= $2 ORDER BY entry.value desc, entry.key desc LIMIT $3";
     }
   }, ZREVRBS {
     public String getQueryString(String fullpath) {
-      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE value.score > $1 AND value.score < $2 ORDER BY value desc, key desc LIMIT $3";
+      return "SELECT DISTINCT entry.key, entry.value FROM " + fullpath + ".entrySet entry WHERE entry.value.score > $1 AND entry.value.score < $2 ORDER BY entry.value desc, entry.key desc LIMIT $3";
     }
   }, ZREVRANGE {
     public String getQueryString(String fullpath) {
@@ -176,11 +176,11 @@ public enum SortedSetQuery {
     }
   }, ZRANK {
     public String getQueryString(String fullpath) {
-      return "SELECT COUNT(*) FROM " + fullpath + ".entrySet entry WHERE value < $1 OR (value = $2 AND key.compareTo($3) < 0)";
+      return "SELECT COUNT(*) FROM " + fullpath + ".entrySet entry WHERE entry.value < $1 OR (entry.value = $2 AND entry.key.compareTo($3) < 0)";
     }
   }, ZREVRANK {
     public String getQueryString(String fullpath) {
-      return "SELECT COUNT(*) FROM " + fullpath + ".entrySet entry WHERE value > $1 OR (value = $2 AND key.compareTo($3) > 0)";
+      return "SELECT COUNT(*) FROM " + fullpath + ".entrySet entry WHERE entry.value > $1 OR (entry.value = $2 AND entry.key.compareTo($3) > 0)";
     }
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TTLExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TTLExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TTLExecutor.java
index 91ed98c..47f2f49 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TTLExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TTLExecutor.java
@@ -9,7 +9,7 @@ import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.Extendable;
 import com.gemstone.gemfire.internal.redis.RedisConstants.ArityDef;
 import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.RegionCache;
+import com.gemstone.gemfire.internal.redis.RegionProvider;
 
 public class TTLExecutor extends AbstractExecutor implements Extendable {
 
@@ -27,7 +27,7 @@ public class TTLExecutor extends AbstractExecutor implements Extendable {
     }
 
     ByteArrayWrapper key = command.getKey();
-    RegionCache rC = context.getRegionCache();
+    RegionProvider rC = context.getRegionProvider();
     boolean exists = false;
     RedisDataType val = rC.getRedisDataType(key);
     if (val != null)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TypeExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TypeExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TypeExecutor.java
index dc4172f..75e5e53 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TypeExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/TypeExecutor.java
@@ -21,7 +21,7 @@ public class TypeExecutor extends AbstractExecutor {
 
     ByteArrayWrapper key = command.getKey();
 
-    RedisDataType type = context.getRegionCache().getRedisDataType(key);
+    RedisDataType type = context.getRegionProvider().getRedisDataType(key);
 
     if (type == null)
       command.setResponse(Coder.getBulkStringResponse(context.getByteBufAllocator(), "none"));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/UnkownExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/UnkownExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/UnkownExecutor.java
index 524003d..fd64c39 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/UnkownExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/UnkownExecutor.java
@@ -1,9 +1,9 @@
 package com.gemstone.gemfire.internal.redis.executor;
 
+import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.RedisConstants;
-import com.gemstone.gemfire.internal.redis.Coder;
 
 public class UnkownExecutor extends AbstractExecutor {
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HDelExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HDelExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HDelExecutor.java
index bd8777b..11122fe 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HDelExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HDelExecutor.java
@@ -43,7 +43,7 @@ public class HDelExecutor extends HashExecutor {
         numDeleted++;
     }
     if (keyRegion.isEmpty()) {
-      context.getRegionCache().removeKey(key, RedisDataType.REDIS_HASH);
+      context.getRegionProvider().removeKey(key, RedisDataType.REDIS_HASH);
     }
     command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), numDeleted));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HGetAllExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HGetAllExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HGetAllExecutor.java
index 96eb5a9..ae8100e 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HGetAllExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HGetAllExecutor.java
@@ -1,16 +1,17 @@
 package com.gemstone.gemfire.internal.redis.executor.hash;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
+import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.RedisConstants.ArityDef;
 import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.Coder;
 
 public class HGetAllExecutor extends HashExecutor {
 
@@ -33,7 +34,7 @@ public class HGetAllExecutor extends HashExecutor {
       return;
     }
 
-    Set<Map.Entry<ByteArrayWrapper,ByteArrayWrapper>> entries = keyRegion.entrySet();
+    Collection<Map.Entry<ByteArrayWrapper,ByteArrayWrapper>> entries = new ArrayList(keyRegion.entrySet()); // This creates a CopyOnRead behavior
    
    if (entries.isEmpty()) {
      command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HKeysExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HKeysExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HKeysExecutor.java
index 988ac37..5c401ff 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HKeysExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HKeysExecutor.java
@@ -1,15 +1,16 @@
 package com.gemstone.gemfire.internal.redis.executor.hash;
 
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
+import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
-import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.RedisConstants.ArityDef;
+import com.gemstone.gemfire.internal.redis.RedisDataType;
 
 public class HKeysExecutor extends HashExecutor {
 
@@ -32,7 +33,7 @@ public class HKeysExecutor extends HashExecutor {
       return;
     }
 
-   Set<ByteArrayWrapper> keys = keyRegion.keySet();
+   Set<ByteArrayWrapper> keys = new HashSet(keyRegion.keySet());
    
    if (keys.isEmpty()) {
      command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HScanExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HScanExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HScanExecutor.java
index fb0ddc0..ded681a 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HScanExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HScanExecutor.java
@@ -2,6 +2,7 @@ package com.gemstone.gemfire.internal.redis.executor.hash;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map.Entry;
 import java.util.regex.Pattern;
@@ -30,7 +31,7 @@ public class HScanExecutor extends AbstractScanExecutor {
 
     ByteArrayWrapper key = command.getKey();
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, ByteArrayWrapper> keyRegion = (Region<ByteArrayWrapper, ByteArrayWrapper>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, ByteArrayWrapper> keyRegion = (Region<ByteArrayWrapper, ByteArrayWrapper>) context.getRegionProvider().getRegion(key);
     checkDataType(key, RedisDataType.REDIS_HASH, context);
     if (keyRegion == null) {
       command.setResponse(Coder.getScanResponse(context.getByteBufAllocator(), new ArrayList<String>()));
@@ -100,7 +101,7 @@ public class HScanExecutor extends AbstractScanExecutor {
       return;
     }
 
-    List<Object> returnList = getIteration(keyRegion.entrySet(), matchPattern, count, cursor);
+    List<Object> returnList = getIteration(new HashSet(keyRegion.entrySet()), matchPattern, count, cursor);
 
     command.setResponse(Coder.getScanResponse(context.getByteBufAllocator(), returnList));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HValsExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HValsExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HValsExecutor.java
index a17b054..8d5edaf 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HValsExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HValsExecutor.java
@@ -1,15 +1,16 @@
 package com.gemstone.gemfire.internal.redis.executor.hash;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
+import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
-import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.RedisConstants.ArityDef;
+import com.gemstone.gemfire.internal.redis.RedisDataType;
 
 public class HValsExecutor extends HashExecutor {
 
@@ -31,8 +32,8 @@ public class HValsExecutor extends HashExecutor {
       command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));
       return;
     }
-
-    Collection<ByteArrayWrapper> vals = keyRegion.values();
+    
+    Collection<ByteArrayWrapper> vals = new ArrayList(keyRegion.values());
 
     if (vals.isEmpty()) {
       command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HashExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HashExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HashExecutor.java
index 0abe42f..94b5115 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HashExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hash/HashExecutor.java
@@ -12,12 +12,12 @@ public abstract class HashExecutor extends AbstractExecutor {
   
   @SuppressWarnings("unchecked")
   protected Region<ByteArrayWrapper, ByteArrayWrapper> getOrCreateRegion(ExecutionHandlerContext context, ByteArrayWrapper key, RedisDataType type) {
-   return (Region<ByteArrayWrapper, ByteArrayWrapper>) context.getRegionCache().getOrCreateRegion(key, type, context);
+   return (Region<ByteArrayWrapper, ByteArrayWrapper>) context.getRegionProvider().getOrCreateRegion(key, type, context);
   }
   
   @SuppressWarnings("unchecked")
   protected Region<ByteArrayWrapper, ByteArrayWrapper> getRegion(ExecutionHandlerContext context, ByteArrayWrapper key) {
-   return (Region<ByteArrayWrapper, ByteArrayWrapper>) context.getRegionCache().getRegion(key);
+   return (Region<ByteArrayWrapper, ByteArrayWrapper>) context.getRegionProvider().getRegion(key);
   }
   
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/HllExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/HllExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/HllExecutor.java
index 1744f37..2f2a963 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/HllExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/HllExecutor.java
@@ -13,7 +13,7 @@ public abstract class HllExecutor extends AbstractExecutor {
   public static final Integer DEFAULT_HLL_SPARSE = 32;
   
   protected final void checkAndSetDataType(ByteArrayWrapper key, ExecutionHandlerContext context) {
-    Object oldVal = context.getRegionCache().metaPutIfAbsent(key, RedisDataType.REDIS_HLL);
+    Object oldVal = context.getRegionProvider().metaPutIfAbsent(key, RedisDataType.REDIS_HLL);
     if (oldVal == RedisDataType.REDIS_PROTECTED)
       throw new RedisDataTypeMismatchException("The key name \"" + key + "\" is protected");
     if (oldVal != null && oldVal != RedisDataType.REDIS_HLL)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFAddExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFAddExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFAddExecutor.java
index 6177a0a..1fbe9e1 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFAddExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFAddExecutor.java
@@ -22,7 +22,7 @@ public class PFAddExecutor extends HllExecutor {
 
     ByteArrayWrapper key = command.getKey();
     checkAndSetDataType(key, context);
-    Region<ByteArrayWrapper, HyperLogLogPlus> keyRegion = context.getRegionCache().gethLLRegion();
+    Region<ByteArrayWrapper, HyperLogLogPlus> keyRegion = context.getRegionProvider().gethLLRegion();
 
     HyperLogLogPlus hll = keyRegion.get(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFCountExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFCountExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFCountExecutor.java
index d056907..bdced51 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFCountExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFCountExecutor.java
@@ -22,7 +22,7 @@ public class PFCountExecutor extends HllExecutor {
       return;
     }
 
-    Region<ByteArrayWrapper, HyperLogLogPlus> keyRegion = context.getRegionCache().gethLLRegion();
+    Region<ByteArrayWrapper, HyperLogLogPlus> keyRegion = context.getRegionProvider().gethLLRegion();
 
     List<HyperLogLogPlus> hlls = new ArrayList<HyperLogLogPlus>();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFMergeExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFMergeExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFMergeExecutor.java
index cc1ccf7..f646791 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFMergeExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/hll/PFMergeExecutor.java
@@ -24,7 +24,7 @@ public class PFMergeExecutor extends HllExecutor {
 
     ByteArrayWrapper destKey = command.getKey();
     checkAndSetDataType(destKey, context);
-    Region<ByteArrayWrapper, HyperLogLogPlus> keyRegion = context.getRegionCache().gethLLRegion();
+    Region<ByteArrayWrapper, HyperLogLogPlus> keyRegion = context.getRegionProvider().gethLLRegion();
     HyperLogLogPlus mergedHLL = keyRegion.get(destKey);
     if (mergedHLL == null)
       mergedHLL = new HyperLogLogPlus(DEFAULT_HLL_DENSE);
@@ -38,7 +38,7 @@ public class PFMergeExecutor extends HllExecutor {
         hlls.add(h);
     }
     if (hlls.isEmpty()) {
-      context.getRegionCache().removeKey(destKey);
+      context.getRegionProvider().removeKey(destKey);
       command.setResponse(Coder.getSimpleStringResponse(context.getByteBufAllocator(), "OK"));
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LIndexExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LIndexExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LIndexExecutor.java
index c2064a1..997f1af 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LIndexExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LIndexExecutor.java
@@ -38,7 +38,7 @@ public class LIndexExecutor extends ListExecutor {
       return;
     }
 
-    int listSize = keyRegion.size();
+    int listSize = keyRegion.size() - LIST_EMPTY_SIZE;
 
     Integer redisIndex;
 
@@ -90,7 +90,7 @@ public class LIndexExecutor extends ListExecutor {
 
     Query query = getQuery(key, ListQuery.LINDEX, context);
 
-    Object[] params = {new Integer(index + 1)};
+    Object[] params = {Integer.valueOf(index + 1)};
 
     SelectResults<?> results = (SelectResults<?>) query.execute(params);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LLenExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LLenExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LLenExecutor.java
index 224cf60..63f0e1a 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LLenExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LLenExecutor.java
@@ -35,7 +35,7 @@ public class LLenExecutor extends ListExecutor {
       return;
     }
     
-    listSize = keyRegion.size();
+    listSize = keyRegion.size() - LIST_EMPTY_SIZE;
 
     command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), listSize));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRangeExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRangeExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRangeExecutor.java
index a0b9901..84b5193 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRangeExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRangeExecutor.java
@@ -43,7 +43,7 @@ public class LRangeExecutor extends ListExecutor {
       return;
     }
 
-    int listSize = keyRegion.size();
+    int listSize = keyRegion.size() - LIST_EMPTY_SIZE;
     if (listSize == 0) {
       command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));
       return;
@@ -70,7 +70,7 @@ public class LRangeExecutor extends ListExecutor {
     
     List<Struct> range;
     try {
-      range = getRange(context, key, redisStart, redisStop);
+      range = getRange(context, key, redisStart, redisStop, keyRegion);
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
@@ -81,14 +81,12 @@ public class LRangeExecutor extends ListExecutor {
       command.setResponse(Coder.getBulkStringArrayResponseOfValues(context.getByteBufAllocator(), range));
   }
 
-  private List<Struct> getRange(ExecutionHandlerContext context, ByteArrayWrapper key, int start, int stop) throws Exception {
+  private List<Struct> getRange(ExecutionHandlerContext context, ByteArrayWrapper key, int start, int stop, Region r) throws Exception {
 
     Query query = getQuery(key, ListQuery.LRANGE, context);
 
-    Object[] params = {new Integer(stop + 1)};
-
+    Object[] params = {Integer.valueOf(stop + 1)};
     SelectResults<Struct> results = (SelectResults<Struct>) query.execute(params);
-
     int size = results.size();
     if (results == null || size <= start) {
       return null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRemExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRemExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRemExecutor.java
index 58daba3..8a50b4f 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRemExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LRemExecutor.java
@@ -79,10 +79,10 @@ public class LRemExecutor extends ListExecutor {
     Query query;
     if (count > 0) {
       query = getQuery(key, ListQuery.LREMG, context);
-      params = new Object[]{value, new Integer(count)};
+      params = new Object[]{value, Integer.valueOf(count)};
     } else if (count < 0) {
       query = getQuery(key, ListQuery.LREML, context);
-      params = new Object[]{value, new Integer(-count)};
+      params = new Object[]{value, Integer.valueOf(-count)};
     } else {
       query = getQuery(key, ListQuery.LREME, context);
       params = new Object[]{value};

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LSetExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LSetExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LSetExecutor.java
index ae09878..0668f02 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LSetExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LSetExecutor.java
@@ -52,7 +52,7 @@ public class LSetExecutor extends ListExecutor {
       return;
     }
 
-    int listSize = keyRegion.size();
+    int listSize = keyRegion.size() - LIST_EMPTY_SIZE;
     if (index < 0)
       index += listSize;
     if (index < 0 || index > listSize) {
@@ -79,7 +79,7 @@ public class LSetExecutor extends ListExecutor {
   private Integer getIndexKey(ExecutionHandlerContext context, ByteArrayWrapper key, int index) throws Exception {
     Query query = getQuery(key, ListQuery.LSET, context);
 
-    Object[] params = {new Integer(index + 1)};
+    Object[] params = {Integer.valueOf(index + 1)};
     
     SelectResults<Integer> results = (SelectResults<Integer>) query.execute(params);
     int size = results.size();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LTrimExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LTrimExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LTrimExecutor.java
index cb3e9a4..11ae338 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LTrimExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/LTrimExecutor.java
@@ -40,16 +40,16 @@ public class LTrimExecutor extends ListExecutor {
 
 
     checkDataType(key, RedisDataType.REDIS_LIST, context);
-    Region<Integer, ByteArrayWrapper> keyRegion = getRegion(context, key);
+    Region keyRegion = getRegion(context, key);
 
     if (keyRegion == null) {
       command.setResponse(Coder.getErrorResponse(context.getByteBufAllocator(), ERROR_KEY_NOT_EXISTS));
       return;
     }
 
-    int listSize = keyRegion.size();
+    int listSize = keyRegion.size() - LIST_EMPTY_SIZE;
     if (listSize == 0) {
-      command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));
+      command.setResponse(Coder.getSimpleStringResponse(context.getByteBufAllocator(), SUCCESS));
       return;
     }
 
@@ -70,37 +70,35 @@ public class LTrimExecutor extends ListExecutor {
       command.setResponse(Coder.getSimpleStringResponse(context.getByteBufAllocator(), SUCCESS));
       return;
     } else if (redisStart == 0 && redisStop < redisStart) {
-      context.getRegionCache().removeKey(key, RedisDataType.REDIS_LIST);
+      context.getRegionProvider().removeKey(key, RedisDataType.REDIS_LIST);
       command.setResponse(Coder.getSimpleStringResponse(context.getByteBufAllocator(), SUCCESS));
       return;
     }
 
     List<Integer> keepList;
     try {
-      keepList = getRange(context, key, redisStart, redisStop);
+      keepList = getRange(context, key, redisStart, redisStop, keyRegion);
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
     
-    for (Integer keyElement: keyRegion.keySet()) {
-      if (!keepList.contains(keyElement))
+    for (Object keyElement: keyRegion.keySet()) {
+      if (!keepList.contains(keyElement) && keyElement instanceof Integer)
         keyRegion.remove(keyElement);
     }
     
     // Reset indexes in meta data region
-    Region<String, Integer> meta = context.getRegionCache().getListsMetaRegion();
-    meta.put(key + "head", keepList.get(0));
-    meta.put(key + "tail", keepList.get(keepList.size() - 1));
+    keyRegion.put("head", keepList.get(0));
+    keyRegion.put("tail", keepList.get(keepList.size() - 1));
     command.setResponse(Coder.getSimpleStringResponse(context.getByteBufAllocator(), SUCCESS));
   }
 
-  private List<Integer> getRange(ExecutionHandlerContext context, ByteArrayWrapper key, int start, int stop) throws Exception {
+  private List<Integer> getRange(ExecutionHandlerContext context, ByteArrayWrapper key, int start, int stop, Region r) throws Exception {
     Query query = getQuery(key, ListQuery.LTRIM, context);
 
-    Object[] params = {new Integer(stop + 1)};
-
+    Object[] params = {Integer.valueOf(stop + 1)};
+    
     SelectResults<Integer> results = (SelectResults<Integer>) query.execute(params);
-
     if (results == null || results.size() <= start) {
       return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/ListExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/ListExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/ListExecutor.java
index 5b8e0cc..ebb36a1 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/ListExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/ListExecutor.java
@@ -3,6 +3,7 @@ package com.gemstone.gemfire.internal.redis.executor.list;
 import java.util.List;
 
 import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionDestroyedException;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
@@ -13,6 +14,8 @@ import com.gemstone.gemfire.internal.redis.executor.AbstractExecutor;
 
 public abstract class ListExecutor extends AbstractExecutor {
 
+  protected static final int LIST_EMPTY_SIZE = 2;
+  
   protected static enum ListDirection {LEFT, RIGHT};
 
   protected final static QueryService getQueryService() {
@@ -22,12 +25,12 @@ public abstract class ListExecutor extends AbstractExecutor {
   @SuppressWarnings("unchecked")
   @Override
   protected Region<Integer, ByteArrayWrapper> getOrCreateRegion(ExecutionHandlerContext context, ByteArrayWrapper key, RedisDataType type) {
-    return (Region<Integer, ByteArrayWrapper>) context.getRegionCache().getOrCreateRegion(key, type, context);
+    return (Region<Integer, ByteArrayWrapper>) context.getRegionProvider().getOrCreateRegion(key, type, context);
   }
   
   @SuppressWarnings("unchecked")
   protected Region<Integer, ByteArrayWrapper> getRegion(ExecutionHandlerContext context, ByteArrayWrapper key) {
-    return (Region<Integer, ByteArrayWrapper>) context.getRegionCache().getRegion(key);
+    return (Region<Integer, ByteArrayWrapper>) context.getRegionProvider().getRegion(key);
   }
 
   /**
@@ -45,14 +48,12 @@ public abstract class ListExecutor extends AbstractExecutor {
    * @param context Context of this push
    */
   protected void pushElements(ByteArrayWrapper key, List<byte[]> commandElems, int startIndex, int endIndex,
-      Region<Integer, ByteArrayWrapper> keyRegion, ListDirection pushType, ExecutionHandlerContext context) {
-    Region<String, Integer> meta = context.getRegionCache().getListsMetaRegion();
-
-    String indexKey = pushType == ListDirection.LEFT ? key + "head" : key + "tail";
-    String oppositeKey = pushType == ListDirection.RIGHT ? key + "head" : key + "tail";
-    Integer index = meta.get(indexKey);
-    Integer opp = meta.get(oppositeKey);
+      Region keyRegion, ListDirection pushType, ExecutionHandlerContext context) {
 
+    String indexKey = pushType == ListDirection.LEFT ? "head" : "tail";
+    String oppositeKey = pushType == ListDirection.RIGHT ? "head" : "tail";
+    Integer index = (Integer) keyRegion.get(indexKey);
+    Integer opp = (Integer) keyRegion.get(oppositeKey);
     if (index != opp)
       index += pushType == ListDirection.LEFT ? -1 : 1; // Subtract index if left push, add if right push
 
@@ -76,8 +77,9 @@ public abstract class ListExecutor extends AbstractExecutor {
       Object oldValue;
       do {
         oldValue = keyRegion.putIfAbsent(index, wrapper);
-        if (oldValue != null)
+        if (oldValue != null) {
           index += pushType == ListDirection.LEFT ? -1 : 1; // Subtract index if left push, add if right push
+        }
       } while (oldValue != null);
 
       /**
@@ -119,9 +121,9 @@ public abstract class ListExecutor extends AbstractExecutor {
 
       boolean indexSet = false;
       do {
-        Integer existingIndex = meta.get(indexKey);
+        Integer existingIndex = (Integer) keyRegion.get(indexKey);
         if ((pushType == ListDirection.RIGHT && existingIndex < index) || (pushType == ListDirection.LEFT && existingIndex > index))
-          indexSet = meta.replace(indexKey, existingIndex, index);
+          indexSet = keyRegion.replace(indexKey, existingIndex, index);
         else
           break;
       } while (!indexSet);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PopExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PopExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PopExecutor.java
index af3f8b0..e501de0 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PopExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PopExecutor.java
@@ -3,6 +3,7 @@ package com.gemstone.gemfire.internal.redis.executor.list;
 import java.util.List;
 
 import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionDestroyedException;
 import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
 import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
@@ -24,16 +25,15 @@ public abstract class PopExecutor extends ListExecutor implements Extendable {
     ByteArrayWrapper key = command.getKey();
 
     checkDataType(key, RedisDataType.REDIS_LIST, context);
-    Region<Integer, ByteArrayWrapper> keyRegion = getRegion(context, key);
-    Region<String, Integer> meta = context.getRegionCache().getListsMetaRegion();
+    Region keyRegion = getRegion(context, key);
 
-    if (keyRegion == null || keyRegion.size() == 0) {
+    if (keyRegion == null || keyRegion.size() == LIST_EMPTY_SIZE) {
       command.setResponse(Coder.getNilResponse(context.getByteBufAllocator()));
       return;
     }
 
-    String indexKey = popType() == ListDirection.LEFT ? key + "head" : key + "tail";
-    String oppositeKey = popType() == ListDirection.RIGHT ? key + "head" : key + "tail";
+    String indexKey = popType() == ListDirection.LEFT ? "head" : "tail";
+    String oppositeKey = popType() == ListDirection.RIGHT ? "head" : "tail";
     Integer index = 0;
     int originalIndex = index;
     int incr = popType() == ListDirection.LEFT ? 1 : -1;
@@ -49,10 +49,11 @@ public abstract class PopExecutor extends ListExecutor implements Extendable {
     
     boolean indexChanged = false;
     do {
-      index = meta.get(indexKey);
-      if (index == meta.get(oppositeKey))
+      index = (Integer) keyRegion.get(indexKey);
+      Integer opp = (Integer) keyRegion.get(oppositeKey);
+      if (index.equals(opp))
         break;
-      indexChanged = meta.replace(indexKey, index, index + incr);
+      indexChanged = keyRegion.replace(indexKey, index, index + incr);
     } while(!indexChanged);
     
     /**
@@ -67,7 +68,7 @@ public abstract class PopExecutor extends ListExecutor implements Extendable {
     boolean removed = false;
     int i = 0;
     do {
-      valueWrapper = keyRegion.get(index);
+      valueWrapper = (ByteArrayWrapper) keyRegion.get(index);
       if (valueWrapper != null)
         removed = keyRegion.remove(index, valueWrapper);
       
@@ -116,12 +117,12 @@ public abstract class PopExecutor extends ListExecutor implements Extendable {
        */
       
       index += incr;
-      int metaIndex = meta.get(indexKey);
+      Integer metaIndex = (Integer) keyRegion.get(indexKey);
       if (i < 1 && (popType() == ListDirection.LEFT && metaIndex < originalIndex ||
           popType() == ListDirection.RIGHT && metaIndex > originalIndex))
         index = metaIndex;
       i++;
-    } while (!removed && keyRegion.size() != 0);
+    } while (!removed && keyRegion.size() != LIST_EMPTY_SIZE);
     if (valueWrapper != null)
       command.setResponse(Coder.getBulkStringResponse(context.getByteBufAllocator(), valueWrapper.toBytes()));
     else

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushExecutor.java
index 4414e0a..fdc7208 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushExecutor.java
@@ -29,7 +29,7 @@ public abstract class PushExecutor extends PushXExecutor implements Extendable {
 
     Region<Integer, ByteArrayWrapper> keyRegion = getOrCreateRegion(context, key, RedisDataType.REDIS_LIST);
     pushElements(key, commandElems, START_VALUES_INDEX, commandElems.size(), keyRegion, pushType(), context);
-    int listSize = keyRegion.size();
+    int listSize = keyRegion.size() - LIST_EMPTY_SIZE;
     command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), listSize));
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushXExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushXExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushXExecutor.java
index fbbad1e..ac89522 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushXExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/list/PushXExecutor.java
@@ -33,7 +33,7 @@ public abstract class PushXExecutor extends ListExecutor implements Extendable {
     checkDataType(key, RedisDataType.REDIS_LIST, context);    
     pushElements(key, commandElems, 2, 3, keyRegion, pushType(), context);
     
-    int listSize = keyRegion.size();
+    int listSize = keyRegion.size() - LIST_EMPTY_SIZE;
 
     command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), listSize));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/org/apache/hadoop/fs/GlobPattern.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/org/apache/hadoop/fs/GlobPattern.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/org/apache/hadoop/fs/GlobPattern.java
deleted file mode 100644
index b6cd906..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/org/apache/hadoop/fs/GlobPattern.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.gemstone.gemfire.internal.redis.executor.org.apache.hadoop.fs;
-
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-/**
- * A class for POSIX glob pattern with brace expansions.
- */
-public class GlobPattern {
-  private static final char BACKSLASH = '\\';
-  private Pattern compiled;
-  private boolean hasWildcard = false;
-
-  /**
-   * Construct the glob pattern object with a glob pattern string
-   * @param globPattern the glob pattern string
-   */
-  public GlobPattern(String globPattern) {
-    set(globPattern);
-  }
-
-  /**
-   * @return the compiled pattern
-   */
-  public Pattern compiled() {
-    return compiled;
-  }
-
-  /**
-   * Compile glob pattern string
-   * @param globPattern the glob pattern
-   * @return the pattern object
-   */
-  public static Pattern compile(String globPattern) {
-    return new GlobPattern(globPattern).compiled();
-  }
-
-  /**
-   * Match input against the compiled glob pattern
-   * @param s input chars
-   * @return true for successful matches
-   */
-  public boolean matches(CharSequence s) {
-    return compiled.matcher(s).matches();
-  }
-
-  /**
-   * Set and compile a glob pattern
-   * @param glob  the glob pattern string
-   */
-  public void set(String glob) {
-    StringBuilder regex = new StringBuilder();
-    int setOpen = 0;
-    int curlyOpen = 0;
-    int len = glob.length();
-    hasWildcard = false;
-
-    for (int i = 0; i < len; i++) {
-      char c = glob.charAt(i);
-
-      switch (c) {
-      case BACKSLASH:
-        if (++i >= len) {
-          error("Missing escaped character", glob, i);
-        }
-        regex.append(c).append(glob.charAt(i));
-        continue;
-      case '.':
-      case '$':
-      case '(':
-      case ')':
-      case '|':
-      case '+':
-        // escape regex special chars that are not glob special chars
-        regex.append(BACKSLASH);
-        break;
-      case '*':
-        regex.append('.');
-        hasWildcard = true;
-        break;
-      case '?':
-        regex.append('.');
-        hasWildcard = true;
-        continue;
-      case '{': // start of a group
-        regex.append("(?:"); // non-capturing
-        curlyOpen++;
-        hasWildcard = true;
-        continue;
-      case ',':
-        regex.append(curlyOpen > 0 ? '|' : c);
-        continue;
-      case '}':
-        if (curlyOpen > 0) {
-          // end of a group
-          curlyOpen--;
-          regex.append(")");
-          continue;
-        }
-        break;
-      case '[':
-        if (setOpen > 0) {
-          error("Unclosed character class", glob, i);
-        }
-        setOpen++;
-        hasWildcard = true;
-        break;
-      case '^': // ^ inside [...] can be unescaped
-        if (setOpen == 0) {
-          regex.append(BACKSLASH);
-        }
-        break;
-      case '!': // [! needs to be translated to [^
-        regex.append(setOpen > 0 && '[' == glob.charAt(i - 1) ? '^' : '!');
-        continue;
-      case ']':
-        // Many set errors like [][] could not be easily detected here,
-        // as []], []-] and [-] are all valid POSIX glob and java regex.
-        // We'll just let the regex compiler do the real work.
-        setOpen = 0;
-        break;
-      default:
-      }
-      regex.append(c);
-    }
-
-    if (setOpen > 0) {
-      error("Unclosed character class", glob, len);
-    }
-    if (curlyOpen > 0) {
-      error("Unclosed group", glob, len);
-    }
-    compiled = Pattern.compile(regex.toString());
-  }
-
-  /**
-   * @return true if this is a wildcard pattern (with special chars)
-   */
-  public boolean hasWildcard() {
-    return hasWildcard;
-  }
-
-  private static void error(String message, String pattern, int pos) {
-    throw new PatternSyntaxException(message, pattern, pos);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SAddExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SAddExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SAddExecutor.java
index aa4a5f2..fd33104 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SAddExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SAddExecutor.java
@@ -25,7 +25,7 @@ public class SAddExecutor extends SetExecutor {
 
     ByteArrayWrapper key = command.getKey();
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getOrCreateRegion(key, RedisDataType.REDIS_SET, context);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getOrCreateRegion(key, RedisDataType.REDIS_SET, context);
 
     if (commandElems.size() >= 4) {
       Map<ByteArrayWrapper, Boolean> entries = new HashMap<ByteArrayWrapper, Boolean>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SCardExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SCardExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SCardExecutor.java
index 4677565..5b8d842 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SCardExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SCardExecutor.java
@@ -26,7 +26,7 @@ public class SCardExecutor extends SetExecutor {
 
     ByteArrayWrapper key = command.getKey();
     checkDataType(key, RedisDataType.REDIS_SET, context);
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
 
     if (keyRegion == null) {
       command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NOT_EXISTS));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SIsMemberExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SIsMemberExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SIsMemberExecutor.java
index 355f70f..33de3aa 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SIsMemberExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SIsMemberExecutor.java
@@ -30,7 +30,7 @@ public class SIsMemberExecutor extends SetExecutor {
     
     checkDataType(key, RedisDataType.REDIS_SET, context);
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
 
     if (keyRegion == null) {
       command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NOT_EXISTS));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMembersExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMembersExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMembersExecutor.java
index bc68033..9536fa5 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMembersExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMembersExecutor.java
@@ -1,15 +1,16 @@
 package com.gemstone.gemfire.internal.redis.executor.set;
 
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
+import com.gemstone.gemfire.internal.redis.Coder;
 import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.RedisConstants.ArityDef;
 import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.Coder;
 
 public class SMembersExecutor extends SetExecutor {
 
@@ -25,14 +26,14 @@ public class SMembersExecutor extends SetExecutor {
     ByteArrayWrapper key = command.getKey();
     checkDataType(key, RedisDataType.REDIS_SET, context);
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
     
     if (keyRegion == null) {
       command.setResponse(Coder.getEmptyArrayResponse(context.getByteBufAllocator()));
       return;
     }
     
-    Set<ByteArrayWrapper> members = keyRegion.keySet();
+    Set<ByteArrayWrapper> members = new HashSet(keyRegion.keySet()); // Emulate copy on read
     
     command.setResponse(Coder.getBulkStringArrayResponse(context.getByteBufAllocator(), members));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMoveExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMoveExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMoveExecutor.java
index f7f5c86..a73bbd9 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMoveExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SMoveExecutor.java
@@ -32,7 +32,7 @@ public class SMoveExecutor extends SetExecutor {
     checkDataType(source, RedisDataType.REDIS_SET, context);
     checkDataType(destination, RedisDataType.REDIS_SET, context);
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> sourceRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(source);
+    Region<ByteArrayWrapper, Boolean> sourceRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(source);
 
     if (sourceRegion == null) {
       command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NOT_MOVED));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SPopExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SPopExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SPopExecutor.java
index 73e59de..6461f34 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SPopExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SPopExecutor.java
@@ -23,7 +23,7 @@ public class SPopExecutor extends SetExecutor {
     
     ByteArrayWrapper key = command.getKey();
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
     if (keyRegion == null || keyRegion.isEmpty()) {
       command.setResponse(Coder.getNilResponse(context.getByteBufAllocator()));
       return;
@@ -37,7 +37,7 @@ public class SPopExecutor extends SetExecutor {
     
     keyRegion.remove(pop);
     if (keyRegion.isEmpty()) {
-      context.getRegionCache().removeKey(key);
+      context.getRegionProvider().removeKey(key);
     }
     command.setResponse(Coder.getBulkStringResponse(context.getByteBufAllocator(), pop.toBytes()));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRandMemberExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRandMemberExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRandMemberExecutor.java
index 5494b30..34954c5 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRandMemberExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRandMemberExecutor.java
@@ -28,7 +28,7 @@ public class SRandMemberExecutor extends SetExecutor {
 
     ByteArrayWrapper key = command.getKey();
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
 
     int count = 1;
 
@@ -49,7 +49,7 @@ public class SRandMemberExecutor extends SetExecutor {
     int members = keyRegion.size();
 
     if (members <= count && count != 1) {
-      command.setResponse(Coder.getBulkStringArrayResponse(context.getByteBufAllocator(), keyRegion.keySet()));
+      command.setResponse(Coder.getBulkStringArrayResponse(context.getByteBufAllocator(), new HashSet<ByteArrayWrapper>(keyRegion.keySet())));
       return;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRemExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRemExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRemExecutor.java
index f85e095..482d83e 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRemExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SRemExecutor.java
@@ -26,7 +26,7 @@ public class SRemExecutor extends SetExecutor {
     ByteArrayWrapper key = command.getKey();
     checkDataType(key, RedisDataType.REDIS_SET, context);
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
     
     if (keyRegion == null) {
       command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NONE_REMOVED));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SScanExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SScanExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SScanExecutor.java
index 87605df..7c0133b 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SScanExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SScanExecutor.java
@@ -30,7 +30,7 @@ public class SScanExecutor extends AbstractScanExecutor {
     ByteArrayWrapper key = command.getKey();
     checkDataType(key, RedisDataType.REDIS_SET, context);
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, Boolean> keyRegion = (Region<ByteArrayWrapper, Boolean>) context.getRegionProvider().getRegion(key);
     if (keyRegion == null) {
       command.setResponse(Coder.getScanResponse(context.getByteBufAllocator(), new ArrayList<String>()));
       return;
@@ -96,7 +96,7 @@ public class SScanExecutor extends AbstractScanExecutor {
     }
 
     @SuppressWarnings("unchecked")
-    List<ByteArrayWrapper> returnList = (List<ByteArrayWrapper>) getIteration(keyRegion.keySet(), matchPattern, count, cursor);
+    List<ByteArrayWrapper> returnList = (List<ByteArrayWrapper>) getIteration(new ArrayList(keyRegion.keySet()), matchPattern, count, cursor);
 
     command.setResponse(Coder.getScanResponse(context.getByteBufAllocator(), returnList));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SetOpExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SetOpExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SetOpExecutor.java
index f2cfd9d..7cd1932 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SetOpExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/set/SetOpExecutor.java
@@ -14,7 +14,7 @@ import com.gemstone.gemfire.internal.redis.Command;
 import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
 import com.gemstone.gemfire.internal.redis.Extendable;
 import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.RegionCache;
+import com.gemstone.gemfire.internal.redis.RegionProvider;
 
 public abstract class SetOpExecutor extends SetExecutor implements Extendable {
 
@@ -27,12 +27,11 @@ public abstract class SetOpExecutor extends SetExecutor implements Extendable {
       command.setResponse(Coder.getErrorResponse(context.getByteBufAllocator(), getArgsError()));
       return;
     }
-    RegionCache rC = context.getRegionCache();
+    RegionProvider rC = context.getRegionProvider();
     ByteArrayWrapper destination = null;
     if (isStorage())
       destination = command.getKey();
 
-
     ByteArrayWrapper firstSetKey = new ByteArrayWrapper(commandElems.get(setsStartIndex++));
     if (!isStorage())
       checkDataType(firstSetKey, RedisDataType.REDIS_SET, context);
@@ -53,10 +52,8 @@ public abstract class SetOpExecutor extends SetExecutor implements Extendable {
     }
     if (setList.isEmpty()) {
       if (isStorage()) {
-        if (firstSet == null) {
           command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), 0));
-          context.getRegionCache().removeKey(destination);
-        }
+          context.getRegionProvider().removeKey(destination);
       } else {
         if (firstSet == null)
           command.setResponse(Coder.getNilResponse(context.getByteBufAllocator()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/SortedSetExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/SortedSetExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/SortedSetExecutor.java
index 7443019..f193727 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/SortedSetExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/SortedSetExecutor.java
@@ -12,13 +12,13 @@ public abstract class SortedSetExecutor extends AbstractExecutor {
   @Override
   protected Region<ByteArrayWrapper, DoubleWrapper> getOrCreateRegion(ExecutionHandlerContext context, ByteArrayWrapper key, RedisDataType type) {
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, DoubleWrapper> r = (Region<ByteArrayWrapper, DoubleWrapper>) context.getRegionCache().getOrCreateRegion(key, type, context);
+    Region<ByteArrayWrapper, DoubleWrapper> r = (Region<ByteArrayWrapper, DoubleWrapper>) context.getRegionProvider().getOrCreateRegion(key, type, context);
     return r;
   }
   
   protected Region<ByteArrayWrapper, DoubleWrapper> getRegion(ExecutionHandlerContext context, ByteArrayWrapper key) {
     @SuppressWarnings("unchecked")
-    Region<ByteArrayWrapper, DoubleWrapper> r = (Region<ByteArrayWrapper, DoubleWrapper>) context.getRegionCache().getRegion(key);
+    Region<ByteArrayWrapper, DoubleWrapper> r = (Region<ByteArrayWrapper, DoubleWrapper>) context.getRegionProvider().getRegion(key);
     return r;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByLexExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByLexExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByLexExecutor.java
index 2e91ffb..e5bb73f 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByLexExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByLexExecutor.java
@@ -163,9 +163,7 @@ public class ZRangeByLexExecutor extends SortedSetExecutor {
     }
     if (limit > 0)
       params[params.length - 1] =  (limit + offset);
-
     SelectResults<ByteArrayWrapper> results = (SelectResults<ByteArrayWrapper>) query.execute(params);
-
     List<ByteArrayWrapper> list = results.asList();
     int size = list.size();
     return list.subList(Math.min(size, offset), size);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByScoreExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByScoreExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByScoreExecutor.java
index e554618..fc73713 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByScoreExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRangeByScoreExecutor.java
@@ -1,6 +1,7 @@
 package com.gemstone.gemfire.internal.redis.executor.sortedset;
 
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.List;
 
 import com.gemstone.gemfire.cache.Region;
@@ -135,7 +136,7 @@ public class ZRangeByScoreExecutor extends SortedSetExecutor implements Extendab
     if (start == Double.POSITIVE_INFINITY || stop == Double.NEGATIVE_INFINITY || start > stop || (start == stop && (!startInclusive || !stopInclusive)))
       return null;
     if (start == Double.NEGATIVE_INFINITY && stop == Double.POSITIVE_INFINITY)
-      return keyRegion.entrySet();
+      return new HashSet(keyRegion.entrySet());
 
     Query query;
     Object[] params;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemExecutor.java
index c119281..d5d7a75 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemExecutor.java
@@ -42,7 +42,7 @@ public class ZRemExecutor extends SortedSetExecutor {
         numDeletedMembers++;
     }
     if (keyRegion.isEmpty())
-      context.getRegionCache().removeKey(key);
+      context.getRegionProvider().removeKey(key);
     command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), numDeletedMembers));
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByLexExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByLexExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByLexExecutor.java
index 6dc7f51..2b26100 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByLexExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByLexExecutor.java
@@ -1,5 +1,6 @@
 package com.gemstone.gemfire.internal.redis.executor.sortedset;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
@@ -90,7 +91,7 @@ public class ZRemRangeByLexExecutor extends SortedSetExecutor {
 
   private Collection<ByteArrayWrapper> getRange(ByteArrayWrapper key, Region<ByteArrayWrapper, DoubleWrapper> keyRegion, ExecutionHandlerContext context, ByteArrayWrapper start, ByteArrayWrapper stop, boolean startInclusive, boolean stopInclusive) throws Exception {
     if (start.equals("-") && stop.equals("+"))
-      return keyRegion.keySet();
+      return new ArrayList<ByteArrayWrapper>(keyRegion.keySet());
     else if (start.equals("+") || stop.equals("-"))
       return null;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7d2296bb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByRankExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByRankExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByRankExecutor.java
index 24a4ed2..34452e3 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByRankExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/executor/sortedset/ZRemRangeByRankExecutor.java
@@ -69,7 +69,7 @@ public class ZRemRangeByRankExecutor extends SortedSetExecutor {
     try {
       if (startRank == 0 && stopRank == sSetSize- 1) {
         numRemoved = keyRegion.size();
-        context.getRegionCache().removeKey(key);
+        context.getRegionProvider().removeKey(key);
       } else {
         removeList = getRemoveKeys(context, key, startRank, stopRank);
       }
@@ -89,7 +89,7 @@ public class ZRemRangeByRankExecutor extends SortedSetExecutor {
           numRemoved++;
       }
       if (keyRegion.isEmpty())
-        context.getRegionCache().removeKey(key);
+        context.getRegionProvider().removeKey(key);
     }
     command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), numRemoved));
   }



Mime
View raw message