ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/3] incubator-ignite git commit: #ignite-51: Fix class GridCacheEntryInfo.
Date Fri, 06 Mar 2015 11:18:01 GMT
#ignite-51: Fix class GridCacheEntryInfo.


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

Branch: refs/heads/ignite-51
Commit: 9f3c240422e63a91bbe01e10024ef3ef3da257e5
Parents: 1f62056
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Mar 6 14:17:10 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Mar 6 14:17:10 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheEntryInfo.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9f3c2404/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java
index c3a5530..012b9b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java
@@ -63,6 +63,9 @@ public class GridCacheEntryInfo implements Message {
     @GridDirectTransient
     private boolean deleted;
 
+    /** */
+    private static final int SIZE_OVERHEAD = 3 * 8 /* reference */ + 4 /* int */ + 2 * 8
/* long */ + 32 /* version */;
+
     /**
      * @return Cache ID.
      */
@@ -333,7 +336,8 @@ public class GridCacheEntryInfo implements Message {
      * @throws IgniteCheckedException If failed.
      */
     public void unmarshalValue(GridCacheContext<?, ?> ctx, ClassLoader ldr) throws
IgniteCheckedException {
-        val.finishUnmarshal(ctx.cacheObjectContext(), ldr);
+        if (val != null)
+            val.finishUnmarshal(ctx.cacheObjectContext(), ldr);
     }
 
     /**
@@ -355,7 +359,7 @@ public class GridCacheEntryInfo implements Message {
         else
             size += key.valueBytes(cacheObjCtx).length;
 
-        return size;
+        return SIZE_OVERHEAD + size;
     }
 
     /**


Mime
View raw message