ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [48/50] [abbrv] incubator-ignite git commit: # IGNITE-96 Fixed TODO by usage of internal API.
Date Thu, 12 Feb 2015 10:34:30 GMT
# IGNITE-96 Fixed TODO by usage of internal API.


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

Branch: refs/heads/ignite-82
Commit: 4db559b895f0fac86d6bbe64d8125b299d63aa31
Parents: 78cc69e
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Feb 12 17:30:57 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Feb 12 17:30:57 2015 +0700

----------------------------------------------------------------------
 .../ignite/internal/visor/cache/VisorCache.java   | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4db559b8/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
index 649c602..a82c943 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
@@ -30,12 +30,11 @@ import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
-import javax.cache.*;
 import java.io.*;
 import java.util.*;
 
 /**
- * Data transfer object for {@link org.apache.ignite.cache.GridCache}.
+ * Data transfer object for {@link IgniteCache}.
  */
 public class VisorCache implements Serializable {
     /** */
@@ -189,22 +188,21 @@ public class VisorCache implements Serializable {
         int size = ca.size();
         int near = ca.nearSize();
 
-        Set<Cache.Entry> set = ca.entrySet();
+        Set<GridCacheEntryEx> set = ca.map().entries0();
 
         long memSz = 0;
 
-        Iterator<Cache.Entry> it = set.iterator();
+        Iterator<GridCacheEntryEx> it = set.iterator();
 
         int sz = sample > 0 ? sample : DFLT_CACHE_SIZE_SAMPLING;
 
         int cnt = 0;
 
-//        TODO ignite-96
-//        while (it.hasNext() && cnt < sz) {
-//            memSz += it.next().memorySize();
-//
-//            cnt++;
-//        }
+        while (it.hasNext() && cnt < sz) {
+            memSz += it.next().memorySize();
+
+            cnt++;
+        }
 
         if (cnt > 0)
             memSz = (long)((double)memSz / cnt * size);


Mime
View raw message