You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2015/09/29 23:35:22 UTC

[5/8] incubator-geode git commit: Now uses StoredObject.sendAsByteArray to prevent heap copy

Now uses StoredObject.sendAsByteArray to prevent heap copy


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

Branch: refs/heads/feature/GEODE-324
Commit: fc0e0af1c7eb9e19fda6d7cff57970de6746d7ad
Parents: 8107c61
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue Sep 29 11:26:29 2015 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Tue Sep 29 11:26:29 2015 -0700

----------------------------------------------------------------------
 .../gemfire/internal/cache/DistributedCacheOperation.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc0e0af1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
index 692595c..fc9046c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
@@ -65,7 +65,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.OffHeapReference;
+import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
 
@@ -117,9 +117,9 @@ public abstract class DistributedCacheOperation {
         DataSerializer.writeObject(vObj, out);
       } else if (deserializationPolicy == DESERIALIZATION_POLICY_NONE) {
         // We only have NONE with a vObj when vObj is off-heap and not serialized.
-        OffHeapReference ohref = (OffHeapReference) vObj;
-        assert !ohref.isSerialized();
-        DataSerializer.writeByteArray(ohref.getValueAsHeapByteArray(), out);
+        StoredObject so = (StoredObject) vObj;
+        assert !so.isSerialized();
+        so.sendAsByteArray(out);
       } else { // LAZY
         // TODO OFFHEAP MERGE: cache the oldValue that is serialized here
         // into the event