ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [09/22] incubator-ignite git commit: #ignite-51: IgniteTxEntry implements Message: TxEntryValueHolder to upper level.
Date Wed, 04 Mar 2015 13:26:44 GMT
#ignite-51: IgniteTxEntry implements Message: TxEntryValueHolder to upper level.


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

Branch: refs/heads/ignite-51
Commit: 954777cc33db970848a8b006e339a0e316d645fa
Parents: 22df51c
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Tue Mar 3 18:54:38 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Tue Mar 3 18:54:38 2015 +0300

----------------------------------------------------------------------
 .../cache/transactions/TxEntryValueHolder.java  | 22 ++++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954777cc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
index c1c759f..5a4689c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
@@ -235,29 +235,29 @@ public class TxEntryValueHolder implements Message {
 
         switch (writer.state()) {
             case 0:
-                if (!writer.writeBoolean("hasWriteVal", hasWriteVal))
+                if (!writer.writeBoolean("hasReadVal", hasReadVal))
                     return false;
 
                 writer.incrementState();
 
             case 1:
-                if (!writer.writeBoolean("hasReadVal", hasReadVal))
+                if (!writer.writeBoolean("hasWriteVal", hasWriteVal))
                     return false;
 
                 writer.incrementState();
 
             case 2:
-                if (!writer.writeInt("op", op.ordinal()))
+                if (!writer.writeByte("op", op != null ? (byte)op.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
+
             case 3:
-                if (!writer.writeMessage("cacheObject", val))
+                if (!writer.writeMessage("val", val))
                     return false;
 
                 writer.incrementState();
 
-
         }
 
         return true;
@@ -272,7 +272,7 @@ public class TxEntryValueHolder implements Message {
 
         switch (reader.state()) {
             case 0:
-                hasWriteVal = reader.readBoolean("hasWriteVal");
+                hasReadVal = reader.readBoolean("hasReadVal");
 
                 if (!reader.isLastRead())
                     return false;
@@ -280,22 +280,26 @@ public class TxEntryValueHolder implements Message {
                 reader.incrementState();
 
             case 1:
-                hasReadVal = reader.readBoolean("hasReadVal");
+                hasWriteVal = reader.readBoolean("hasWriteVal");
 
                 if (!reader.isLastRead())
                     return false;
 
                 reader.incrementState();
+
             case 2:
-                op = GridCacheOperation.fromOrdinal(reader.readInt("op"));
+                byte opOrd = reader.readByte("op");
 
                 if (!reader.isLastRead())
                     return false;
 
+                if (opOrd != -1)
+                    op = GridCacheOperation.fromOrdinal(opOrd);
+
                 reader.incrementState();
 
             case 3:
-                val = reader.readMessage("cacheObject");
+                val = reader.readMessage("val");
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message