ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [29/50] [abbrv] incubator-ignite git commit: # sprint-4 Fixed isEmpty() logic.
Date Fri, 08 May 2015 14:14:09 GMT
# sprint-4 Fixed isEmpty() logic.


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

Branch: refs/heads/ignite-709_2
Commit: c3f3dd141ba9a3cb1e7044f807e624c57ef38084
Parents: a33d3d4
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu May 7 13:14:40 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu May 7 13:14:40 2015 +0700

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheAdapter.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c3f3dd14/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 6674993..afddc79 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
@@ -489,7 +489,12 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
     /** {@inheritDoc} */
     @Override public boolean isEmpty() {
-        return values().isEmpty();
+        try {
+            return localSize(CachePeekModes.ONHEAP_ONLY) == 0;
+        }
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
+        }
     }
 
     /** {@inheritDoc} */


Mime
View raw message