IGNITE-4535 - Obheap local entries iterator for local cache

Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/924930cd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/924930cd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/924930cd

Branch: refs/heads/ignite-4535
Commit: 924930cdf480aa1a8e90c285e127185d8b64ce7f
Parents: c9c1bc1
Author: Alexey Goncharuk <alexey.goncha...@gmail.com>
Authored: Thu Apr 20 11:39:25 2017 +0300
Committer: Alexey Goncharuk <alexey.goncha...@gmail.com>
Committed: Thu Apr 20 11:39:25 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/924930cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index cab919d..174d43d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -726,10 +726,14 @@ public abstract class GridCacheAdapter<K, V> implements 
IgniteInternalCache<K, V
             if (modes.near && ctx.isNear())
                 its.add(ctx.near().nearEntries().iterator());
 
-            if (modes.primary || modes.backup) {
-                GridDhtCacheAdapter<K, V> cache = ctx.isNear() ? 
ctx.near().dht() : ctx.dht();
+            if (ctx.isLocal())
+                its.add(ctx.local().entrySet().iterator());
+            else {
+                if (modes.primary || modes.backup) {
+                    GridDhtCacheAdapter<K, V> cache = ctx.isNear() ? 
ctx.near().dht() : ctx.dht();
 
-                its.add(cache.localEntriesIterator(modes.primary, 
modes.backup, keepBinary));
+                    its.add(cache.localEntriesIterator(modes.primary, 
modes.backup, keepBinary));
+                }
             }
         }
 

Reply via email to