geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [4/8] incubator-geode git commit: getOldValue now used instead of this.oldValue
Date Tue, 29 Sep 2015 21:35:21 GMT
getOldValue now used instead of this.oldValue


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

Branch: refs/heads/feature/GEODE-324
Commit: 8107c61f7bccf310e8fe2ed5e85a4139fa259eb9
Parents: bb2cdb0
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Tue Sep 29 10:59:02 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Tue Sep 29 10:59:02 2015 -0700

----------------------------------------------------------------------
 .../internal/cache/RemotePutMessage.java        | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8107c61f/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
index 1f028d3..d6b89ef 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
@@ -1006,23 +1006,24 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
       if (this.versionTag instanceof DiskVersionTag) flags |= FLAG_PERSISTENT;
       out.writeByte(flags);
       out.writeByte(this.op.ordinal);
-      if (this.oldValueIsSerialized && this.oldValue != null) {
+      Object ov = getOldValue();
+      if (this.oldValueIsSerialized && ov != null) {
         byte[] oldValueBytes;
-        if (this.oldValue instanceof byte[]) {
-          oldValueBytes = (byte[]) this.oldValue;
+        if (ov instanceof byte[]) {
+          oldValueBytes = (byte[]) ov;
           DataSerializer.writeObject(new VMCachedDeserializable(oldValueBytes), out);
-        } else if (this.oldValue instanceof CachedDeserializable) {
-          if (this.oldValue instanceof StoredObject) {
-            ((StoredObject) this.oldValue).sendAsCachedDeserializable(out);
+        } else if (ov instanceof CachedDeserializable) {
+          if (ov instanceof StoredObject) {
+            ((StoredObject) ov).sendAsCachedDeserializable(out);
           } else {
-            DataSerializer.writeObject(this.oldValue, out);
+            DataSerializer.writeObject(ov, out);
           }
         } else {
-          oldValueBytes = EntryEventImpl.serialize(this.oldValue);
+          oldValueBytes = EntryEventImpl.serialize(ov);
           DataSerializer.writeObject(new VMCachedDeserializable(oldValueBytes), out);
         }
       } else {
-        DataSerializer.writeObject(this.oldValue, out);
+        DataSerializer.writeObject(ov, out);
       }
       if (this.versionTag != null) {
         InternalDataSerializer.invokeToData(this.versionTag, out);
@@ -1066,8 +1067,7 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
 
     @Override
     public void importOldBytes(byte[] ov, boolean isSerialized) {
-      this.oldValueIsSerialized = isSerialized;
-      this.oldValue = ov;
+      importOldObject(ov, isSerialized);
     }
   }
 


Mime
View raw message