ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [4/6] incubator-ignite git commit: IGNITE-141 - Marshallers refactoring
Date Wed, 04 Mar 2015 00:49:17 GMT
IGNITE-141 - Marshallers refactoring


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

Branch: refs/heads/ignite-141
Commit: c08158daaf59fdfa0a7781a69154b053a3a4b3b5
Parents: 0fd5967
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Tue Mar 3 16:17:29 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Tue Mar 3 16:17:29 2015 -0800

----------------------------------------------------------------------
 .../GridDistributedTxFinishRequest.java         | 40 ++++++++++------
 .../GridDistributedTxPrepareRequest.java        | 48 ++++++++++++++------
 2 files changed, 60 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c08158da/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
index cb5968d..7acec91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
@@ -311,30 +311,36 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeBoolean("syncCommit", syncCommit))
+                if (!writer.writeByte("plc", plc != null ? (byte)plc.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeBoolean("syncRollback", syncRollback))
+                if (!writer.writeBoolean("syncCommit", syncCommit))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeByte("sys", plc != null ? (byte)plc.ordinal() : -1))
+                if (!writer.writeBoolean("syncRollback", syncRollback))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeLong("threadId", threadId))
+                if (!writer.writeBoolean("sys", sys))
                     return false;
 
                 writer.incrementState();
 
             case 18:
+                if (!writer.writeLong("threadId", threadId))
+                    return false;
+
+                writer.incrementState();
+
+            case 19:
                 if (!writer.writeInt("txSize", txSize))
                     return false;
 
@@ -405,15 +411,19 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 reader.incrementState();
 
             case 14:
-                syncCommit = reader.readBoolean("syncCommit");
+                byte plcOrd;
+
+                plcOrd = reader.readByte("plc");
 
                 if (!reader.isLastRead())
                     return false;
 
+                plc = GridIoPolicy.fromOrdinal(plcOrd);
+
                 reader.incrementState();
 
             case 15:
-                syncRollback = reader.readBoolean("syncRollback");
+                syncCommit = reader.readBoolean("syncCommit");
 
                 if (!reader.isLastRead())
                     return false;
@@ -421,19 +431,15 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 reader.incrementState();
 
             case 16:
-                byte plcOrd;
-
-                plcOrd = reader.readByte("plc");
+                syncRollback = reader.readBoolean("syncRollback");
 
                 if (!reader.isLastRead())
                     return false;
 
-                plc = GridIoPolicy.fromOrdinal(plcOrd);
-
                 reader.incrementState();
 
             case 17:
-                threadId = reader.readLong("threadId");
+                sys = reader.readBoolean("sys");
 
                 if (!reader.isLastRead())
                     return false;
@@ -441,6 +447,14 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 reader.incrementState();
 
             case 18:
+                threadId = reader.readLong("threadId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 19:
                 txSize = reader.readInt("txSize");
 
                 if (!reader.isLastRead())
@@ -460,7 +474,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 19;
+        return 20;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c08158da/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index 6dced98..13f930a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -484,48 +484,54 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeCollection("readsBytes", readsBytes, MessageCollectionItemType.BYTE_ARR))
+                if (!writer.writeByte("plc", plc != null ? (byte)plc.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeBoolean("sys", sys))
+                if (!writer.writeCollection("readsBytes", readsBytes, MessageCollectionItemType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeLong("threadId", threadId))
+                if (!writer.writeBoolean("sys", sys))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeLong("timeout", timeout))
+                if (!writer.writeLong("threadId", threadId))
                     return false;
 
                 writer.incrementState();
 
             case 19:
-                if (!writer.writeByteArray("txNodesBytes", txNodesBytes))
+                if (!writer.writeLong("timeout", timeout))
                     return false;
 
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeInt("txSize", txSize))
+                if (!writer.writeByteArray("txNodesBytes", txNodesBytes))
                     return false;
 
                 writer.incrementState();
 
             case 21:
-                if (!writer.writeMessage("writeVer", writeVer))
+                if (!writer.writeInt("txSize", txSize))
                     return false;
 
                 writer.incrementState();
 
             case 22:
+                if (!writer.writeMessage("writeVer", writeVer))
+                    return false;
+
+                writer.incrementState();
+
+            case 23:
                 if (!writer.writeCollection("writesBytes", writesBytes, MessageCollectionItemType.BYTE_ARR))
                     return false;
 
@@ -612,15 +618,19 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 15:
-                readsBytes = reader.readCollection("readsBytes", MessageCollectionItemType.BYTE_ARR);
+                byte plcOrd;
+
+                plcOrd = reader.readByte("plc");
 
                 if (!reader.isLastRead())
                     return false;
 
+                plc = GridIoPolicy.fromOrdinal(plcOrd);
+
                 reader.incrementState();
 
             case 16:
-                sys = reader.readBoolean("sys");
+                readsBytes = reader.readCollection("readsBytes", MessageCollectionItemType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -628,7 +638,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 17:
-                threadId = reader.readLong("threadId");
+                sys = reader.readBoolean("sys");
 
                 if (!reader.isLastRead())
                     return false;
@@ -636,7 +646,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 18:
-                timeout = reader.readLong("timeout");
+                threadId = reader.readLong("threadId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -644,7 +654,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 19:
-                txNodesBytes = reader.readByteArray("txNodesBytes");
+                timeout = reader.readLong("timeout");
 
                 if (!reader.isLastRead())
                     return false;
@@ -652,7 +662,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 20:
-                txSize = reader.readInt("txSize");
+                txNodesBytes = reader.readByteArray("txNodesBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -660,7 +670,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 21:
-                writeVer = reader.readMessage("writeVer");
+                txSize = reader.readInt("txSize");
 
                 if (!reader.isLastRead())
                     return false;
@@ -668,6 +678,14 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 reader.incrementState();
 
             case 22:
+                writeVer = reader.readMessage("writeVer");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 23:
                 writesBytes = reader.readCollection("writesBytes", MessageCollectionItemType.BYTE_ARR);
 
                 if (!reader.isLastRead())
@@ -687,7 +705,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 23;
+        return 24;
     }
 
     /** {@inheritDoc} */


Mime
View raw message