ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [37/50] [abbrv] incubator-ignite git commit: Revert "ignite-nio - Removing message clone"
Date Sun, 15 Feb 2015 08:42:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
index fd9ae8c..3c863fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
@@ -172,7 +172,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -180,25 +180,25 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("infosBytes", infosBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("infosBytes", infosBytes))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeCollectionField("missedKeyBytes", missedKeyBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollection("missedKeyBytes", missedKeyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -217,7 +217,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
 
         switch (readState) {
             case 3:
-                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -225,7 +225,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
                 readState++;
 
             case 4:
-                infosBytes = reader.readField("infosBytes", MessageFieldType.BYTE_ARR);
+                infosBytes = reader.readByteArray("infosBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -233,7 +233,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
                 readState++;
 
             case 5:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -241,7 +241,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
                 readState++;
 
             case 6:
-                missedKeyBytes = reader.readCollectionField("missedKeyBytes", MessageFieldType.BYTE_ARR);
+                missedKeyBytes = reader.readCollection("missedKeyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
index 94616ce..8867d47 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
@@ -197,7 +197,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -205,37 +205,37 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeCollectionField("parts", parts, MessageFieldType.INT))
+                if (!writer.writeCollection("parts", parts, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("timeout", timeout, MessageFieldType.LONG))
+                if (!writer.writeLong("timeout", timeout))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeField("topicBytes", topicBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("topicBytes", topicBytes))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeField("updateSeq", updateSeq, MessageFieldType.LONG))
+                if (!writer.writeLong("updateSeq", updateSeq))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeField("workerId", workerId, MessageFieldType.INT))
+                if (!writer.writeInt("workerId", workerId))
                     return false;
 
                 writer.incrementState();
@@ -254,7 +254,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
 
         switch (readState) {
             case 3:
-                parts = reader.readCollectionField("parts", MessageFieldType.INT);
+                parts = reader.readCollection("parts", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -262,7 +262,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 4:
-                timeout = reader.readField("timeout", MessageFieldType.LONG);
+                timeout = reader.readLong("timeout");
 
                 if (!reader.isLastRead())
                     return false;
@@ -270,7 +270,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 5:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -278,7 +278,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 6:
-                topicBytes = reader.readField("topicBytes", MessageFieldType.BYTE_ARR);
+                topicBytes = reader.readByteArray("topicBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -286,7 +286,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 7:
-                updateSeq = reader.readField("updateSeq", MessageFieldType.LONG);
+                updateSeq = reader.readLong("updateSeq");
 
                 if (!reader.isLastRead())
                     return false;
@@ -294,7 +294,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 8:
-                workerId = reader.readField("workerId", MessageFieldType.INT);
+                workerId = reader.readInt("workerId");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
index 2c4a373..b942b57 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
@@ -150,7 +150,7 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements Compar
         writer.setBuffer(buf);
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -158,19 +158,19 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements Compar
 
         switch (writer.state()) {
             case 0:
-                if (!writer.writeField("evt", evt, MessageFieldType.INT))
+                if (!writer.writeInt("evt", evt))
                     return false;
 
                 writer.incrementState();
 
             case 1:
-                if (!writer.writeField("nodeId", nodeId, MessageFieldType.UUID))
+                if (!writer.writeUuid("nodeId", nodeId))
                     return false;
 
                 writer.incrementState();
 
             case 2:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -186,7 +186,7 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements Compar
 
         switch (readState) {
             case 0:
-                evt = reader.readField("evt", MessageFieldType.INT);
+                evt = reader.readInt("evt");
 
                 if (!reader.isLastRead())
                     return false;
@@ -194,7 +194,7 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements Compar
                 readState++;
 
             case 1:
-                nodeId = reader.readField("nodeId", MessageFieldType.UUID);
+                nodeId = reader.readUuid("nodeId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -202,7 +202,7 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements Compar
                 readState++;
 
             case 2:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
index b46ef7f..0af7cd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
@@ -280,7 +280,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -288,37 +288,37 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeField("ack", ack, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("ack", ack))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("infoBytes", infoBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("infoBytes", infoBytes))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeCollectionField("last", last, MessageFieldType.INT))
+                if (!writer.writeCollection("last", last, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeCollectionField("missed", missed, MessageFieldType.INT))
+                if (!writer.writeCollection("missed", missed, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeField("updateSeq", updateSeq, MessageFieldType.LONG))
+                if (!writer.writeLong("updateSeq", updateSeq))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeField("workerId", workerId, MessageFieldType.INT))
+                if (!writer.writeInt("workerId", workerId))
                     return false;
 
                 writer.incrementState();
@@ -337,7 +337,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
 
         switch (readState) {
             case 3:
-                ack = reader.readField("ack", MessageFieldType.BOOLEAN);
+                ack = reader.readBoolean("ack");
 
                 if (!reader.isLastRead())
                     return false;
@@ -345,7 +345,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 4:
-                infoBytes = reader.readField("infoBytes", MessageFieldType.BYTE_ARR);
+                infoBytes = reader.readByteArray("infoBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -353,7 +353,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 5:
-                last = reader.readCollectionField("last", MessageFieldType.INT);
+                last = reader.readCollection("last", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -361,7 +361,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 6:
-                missed = reader.readCollectionField("missed", MessageFieldType.INT);
+                missed = reader.readCollection("missed", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -369,7 +369,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 7:
-                updateSeq = reader.readField("updateSeq", MessageFieldType.LONG);
+                updateSeq = reader.readLong("updateSeq");
 
                 if (!reader.isLastRead())
                     return false;
@@ -377,7 +377,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 8:
-                workerId = reader.readField("workerId", MessageFieldType.INT);
+                workerId = reader.readInt("workerId");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
index 2dfe529..60bea32 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
@@ -82,7 +82,7 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends GridCacheMessage<K
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -90,13 +90,13 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends GridCacheMessage<K
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeField("exchId", exchId, MessageFieldType.MSG))
+                if (!writer.writeMessage("exchId", exchId))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("lastVer", lastVer, MessageFieldType.MSG))
+                if (!writer.writeMessage("lastVer", lastVer))
                     return false;
 
                 writer.incrementState();
@@ -115,7 +115,7 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends GridCacheMessage<K
 
         switch (readState) {
             case 3:
-                exchId = reader.readField("exchId", MessageFieldType.MSG);
+                exchId = reader.readMessage("exchId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -123,7 +123,7 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends GridCacheMessage<K
                 readState++;
 
             case 4:
-                lastVer = reader.readField("lastVer", MessageFieldType.MSG);
+                lastVer = reader.readMessage("lastVer");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
index 46924c2..d4b8a14 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
@@ -123,7 +123,7 @@ public class GridDhtPartitionsFullMessage<K, V> extends GridDhtPartitionsAbstrac
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -131,13 +131,13 @@ public class GridDhtPartitionsFullMessage<K, V> extends GridDhtPartitionsAbstrac
 
         switch (writer.state()) {
             case 5:
-                if (!writer.writeField("partsBytes", partsBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("partsBytes", partsBytes))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -156,7 +156,7 @@ public class GridDhtPartitionsFullMessage<K, V> extends GridDhtPartitionsAbstrac
 
         switch (readState) {
             case 5:
-                partsBytes = reader.readField("partsBytes", MessageFieldType.BYTE_ARR);
+                partsBytes = reader.readByteArray("partsBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -164,7 +164,7 @@ public class GridDhtPartitionsFullMessage<K, V> extends GridDhtPartitionsAbstrac
                 readState++;
 
             case 6:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
index 14fec54..0c477c1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
@@ -102,7 +102,7 @@ public class GridDhtPartitionsSingleMessage<K, V> extends GridDhtPartitionsAbstr
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -110,7 +110,7 @@ public class GridDhtPartitionsSingleMessage<K, V> extends GridDhtPartitionsAbstr
 
         switch (writer.state()) {
             case 5:
-                if (!writer.writeField("partsBytes", partsBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("partsBytes", partsBytes))
                     return false;
 
                 writer.incrementState();
@@ -129,7 +129,7 @@ public class GridDhtPartitionsSingleMessage<K, V> extends GridDhtPartitionsAbstr
 
         switch (readState) {
             case 5:
-                partsBytes = reader.readField("partsBytes", MessageFieldType.BYTE_ARR);
+                partsBytes = reader.readByteArray("partsBytes");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
index b8be015..2599c95 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
@@ -52,7 +52,7 @@ public class GridDhtPartitionsSingleRequest<K, V> extends GridDhtPartitionsAbstr
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index 568948a..15971ca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -246,7 +246,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -254,67 +254,67 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeField("accessTtl", accessTtl, MessageFieldType.LONG))
+                if (!writer.writeLong("accessTtl", accessTtl))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeMapField("keyBytes", keyBytes, MessageFieldType.BYTE_ARR, MessageFieldType.BOOLEAN))
+                if (!writer.writeMap("keyBytes", keyBytes, MessageFieldType.BYTE_ARR, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeField("readThrough", readThrough, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("readThrough", readThrough))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeField("reload", reload, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("reload", reload))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeField("skipVals", skipVals, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("skipVals", skipVals))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeField("subjId", subjId, MessageFieldType.UUID))
+                if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeField("taskNameHash", taskNameHash, MessageFieldType.INT))
+                if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeField("ver", ver, MessageFieldType.MSG))
+                if (!writer.writeMessage("ver", ver))
                     return false;
 
                 writer.incrementState();
@@ -333,7 +333,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
 
         switch (readState) {
             case 3:
-                accessTtl = reader.readField("accessTtl", MessageFieldType.LONG);
+                accessTtl = reader.readLong("accessTtl");
 
                 if (!reader.isLastRead())
                     return false;
@@ -341,7 +341,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 4:
-                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -349,7 +349,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 5:
-                keyBytes = reader.readMapField("keyBytes", MessageFieldType.BYTE_ARR, MessageFieldType.BOOLEAN, true);
+                keyBytes = reader.readMap("keyBytes", MessageFieldType.BYTE_ARR, MessageFieldType.BOOLEAN, true);
 
                 if (!reader.isLastRead())
                     return false;
@@ -357,7 +357,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 6:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -365,7 +365,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 7:
-                readThrough = reader.readField("readThrough", MessageFieldType.BOOLEAN);
+                readThrough = reader.readBoolean("readThrough");
 
                 if (!reader.isLastRead())
                     return false;
@@ -373,7 +373,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 8:
-                reload = reader.readField("reload", MessageFieldType.BOOLEAN);
+                reload = reader.readBoolean("reload");
 
                 if (!reader.isLastRead())
                     return false;
@@ -381,7 +381,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 9:
-                skipVals = reader.readField("skipVals", MessageFieldType.BOOLEAN);
+                skipVals = reader.readBoolean("skipVals");
 
                 if (!reader.isLastRead())
                     return false;
@@ -389,7 +389,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 10:
-                subjId = reader.readField("subjId", MessageFieldType.UUID);
+                subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -397,7 +397,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 11:
-                taskNameHash = reader.readField("taskNameHash", MessageFieldType.INT);
+                taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
                     return false;
@@ -405,7 +405,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 12:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -413,7 +413,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 13:
-                ver = reader.readField("ver", MessageFieldType.MSG);
+                ver = reader.readMessage("ver");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
index 1e7787c..db94b95 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
@@ -207,7 +207,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -215,43 +215,43 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeField("entriesBytes", entriesBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("entriesBytes", entriesBytes))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("errBytes", errBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("errBytes", errBytes))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeCollectionField("invalidParts", invalidParts, MessageFieldType.INT))
+                if (!writer.writeCollection("invalidParts", invalidParts, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeField("ver", ver, MessageFieldType.MSG))
+                if (!writer.writeMessage("ver", ver))
                     return false;
 
                 writer.incrementState();
@@ -270,7 +270,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
 
         switch (readState) {
             case 3:
-                entriesBytes = reader.readField("entriesBytes", MessageFieldType.BYTE_ARR);
+                entriesBytes = reader.readByteArray("entriesBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -278,7 +278,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 4:
-                errBytes = reader.readField("errBytes", MessageFieldType.BYTE_ARR);
+                errBytes = reader.readByteArray("errBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -286,7 +286,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 5:
-                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -294,7 +294,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 6:
-                invalidParts = reader.readCollectionField("invalidParts", MessageFieldType.INT);
+                invalidParts = reader.readCollection("invalidParts", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -302,7 +302,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 7:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -310,7 +310,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 8:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -318,7 +318,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 9:
-                ver = reader.readField("ver", MessageFieldType.MSG);
+                ver = reader.readMessage("ver");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
index 325398a..9c298d4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
@@ -338,7 +338,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -346,73 +346,73 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
 
         switch (writer.state()) {
             case 24:
-                if (!writer.writeField("accessTtl", accessTtl, MessageFieldType.LONG))
+                if (!writer.writeLong("accessTtl", accessTtl))
                     return false;
 
                 writer.incrementState();
 
             case 25:
-                if (!writer.writeArrayField("dhtVers", dhtVers, MessageFieldType.MSG))
+                if (!writer.writeObjectArray("dhtVers", dhtVers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 26:
-                if (!writer.writeArrayField("filterBytes", filterBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeObjectArray("filterBytes", filterBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 27:
-                if (!writer.writeField("hasTransforms", hasTransforms, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("hasTransforms", hasTransforms))
                     return false;
 
                 writer.incrementState();
 
             case 28:
-                if (!writer.writeField("implicitSingleTx", implicitSingleTx, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("implicitSingleTx", implicitSingleTx))
                     return false;
 
                 writer.incrementState();
 
             case 29:
-                if (!writer.writeField("implicitTx", implicitTx, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("implicitTx", implicitTx))
                     return false;
 
                 writer.incrementState();
 
             case 30:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 31:
-                if (!writer.writeField("onePhaseCommit", onePhaseCommit, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("onePhaseCommit", onePhaseCommit))
                     return false;
 
                 writer.incrementState();
 
             case 32:
-                if (!writer.writeField("subjId", subjId, MessageFieldType.UUID))
+                if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
             case 33:
-                if (!writer.writeField("syncCommit", syncCommit, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("syncCommit", syncCommit))
                     return false;
 
                 writer.incrementState();
 
             case 34:
-                if (!writer.writeField("taskNameHash", taskNameHash, MessageFieldType.INT))
+                if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
             case 35:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -431,7 +431,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
 
         switch (readState) {
             case 24:
-                accessTtl = reader.readField("accessTtl", MessageFieldType.LONG);
+                accessTtl = reader.readLong("accessTtl");
 
                 if (!reader.isLastRead())
                     return false;
@@ -439,7 +439,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 25:
-                dhtVers = reader.readArrayField("dhtVers", MessageFieldType.MSG, GridCacheVersion.class);
+                dhtVers = reader.readObjectArray("dhtVers", MessageFieldType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
                     return false;
@@ -447,7 +447,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 26:
-                filterBytes = reader.readArrayField("filterBytes", MessageFieldType.BYTE_ARR, byte[].class);
+                filterBytes = reader.readObjectArray("filterBytes", MessageFieldType.BYTE_ARR, byte[].class);
 
                 if (!reader.isLastRead())
                     return false;
@@ -455,7 +455,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 27:
-                hasTransforms = reader.readField("hasTransforms", MessageFieldType.BOOLEAN);
+                hasTransforms = reader.readBoolean("hasTransforms");
 
                 if (!reader.isLastRead())
                     return false;
@@ -463,7 +463,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 28:
-                implicitSingleTx = reader.readField("implicitSingleTx", MessageFieldType.BOOLEAN);
+                implicitSingleTx = reader.readBoolean("implicitSingleTx");
 
                 if (!reader.isLastRead())
                     return false;
@@ -471,7 +471,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 29:
-                implicitTx = reader.readField("implicitTx", MessageFieldType.BOOLEAN);
+                implicitTx = reader.readBoolean("implicitTx");
 
                 if (!reader.isLastRead())
                     return false;
@@ -479,7 +479,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 30:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -487,7 +487,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 31:
-                onePhaseCommit = reader.readField("onePhaseCommit", MessageFieldType.BOOLEAN);
+                onePhaseCommit = reader.readBoolean("onePhaseCommit");
 
                 if (!reader.isLastRead())
                     return false;
@@ -495,7 +495,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 32:
-                subjId = reader.readField("subjId", MessageFieldType.UUID);
+                subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -503,7 +503,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 33:
-                syncCommit = reader.readField("syncCommit", MessageFieldType.BOOLEAN);
+                syncCommit = reader.readBoolean("syncCommit");
 
                 if (!reader.isLastRead())
                     return false;
@@ -511,7 +511,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 34:
-                taskNameHash = reader.readField("taskNameHash", MessageFieldType.INT);
+                taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
                     return false;
@@ -519,7 +519,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 35:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
index 762ad63..0f77a35 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
@@ -188,7 +188,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -196,31 +196,31 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
 
         switch (writer.state()) {
             case 11:
-                if (!writer.writeArrayField("dhtVers", dhtVers, MessageFieldType.MSG))
+                if (!writer.writeObjectArray("dhtVers", dhtVers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeField("filterRes", filterRes, MessageFieldType.BOOLEAN_ARR))
+                if (!writer.writeBooleanArray("filterRes", filterRes))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeArrayField("mappedVers", mappedVers, MessageFieldType.MSG))
+                if (!writer.writeObjectArray("mappedVers", mappedVers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeCollectionField("pending", pending, MessageFieldType.MSG))
+                if (!writer.writeCollection("pending", pending, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -239,7 +239,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
 
         switch (readState) {
             case 11:
-                dhtVers = reader.readArrayField("dhtVers", MessageFieldType.MSG, GridCacheVersion.class);
+                dhtVers = reader.readObjectArray("dhtVers", MessageFieldType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
                     return false;
@@ -247,7 +247,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 readState++;
 
             case 12:
-                filterRes = reader.readField("filterRes", MessageFieldType.BOOLEAN_ARR);
+                filterRes = reader.readBooleanArray("filterRes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -255,7 +255,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 readState++;
 
             case 13:
-                mappedVers = reader.readArrayField("mappedVers", MessageFieldType.MSG, GridCacheVersion.class);
+                mappedVers = reader.readObjectArray("mappedVers", MessageFieldType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
                     return false;
@@ -263,7 +263,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 readState++;
 
             case 14:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -271,7 +271,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 readState++;
 
             case 15:
-                pending = reader.readCollectionField("pending", MessageFieldType.MSG);
+                pending = reader.readCollection("pending", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index a1db07a..6cb1fb9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -165,7 +165,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -173,37 +173,37 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
 
         switch (writer.state()) {
             case 21:
-                if (!writer.writeField("explicitLock", explicitLock, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("explicitLock", explicitLock))
                     return false;
 
                 writer.incrementState();
 
             case 22:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 23:
-                if (!writer.writeField("storeEnabled", storeEnabled, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("storeEnabled", storeEnabled))
                     return false;
 
                 writer.incrementState();
 
             case 24:
-                if (!writer.writeField("subjId", subjId, MessageFieldType.UUID))
+                if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
             case 25:
-                if (!writer.writeField("taskNameHash", taskNameHash, MessageFieldType.INT))
+                if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
             case 26:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -222,7 +222,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
 
         switch (readState) {
             case 21:
-                explicitLock = reader.readField("explicitLock", MessageFieldType.BOOLEAN);
+                explicitLock = reader.readBoolean("explicitLock");
 
                 if (!reader.isLastRead())
                     return false;
@@ -230,7 +230,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
                 readState++;
 
             case 22:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -238,7 +238,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
                 readState++;
 
             case 23:
-                storeEnabled = reader.readField("storeEnabled", MessageFieldType.BOOLEAN);
+                storeEnabled = reader.readBoolean("storeEnabled");
 
                 if (!reader.isLastRead())
                     return false;
@@ -246,7 +246,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
                 readState++;
 
             case 24:
-                subjId = reader.readField("subjId", MessageFieldType.UUID);
+                subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -254,7 +254,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
                 readState++;
 
             case 25:
-                taskNameHash = reader.readField("taskNameHash", MessageFieldType.INT);
+                taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
                     return false;
@@ -262,7 +262,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
                 readState++;
 
             case 26:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
index e1ed3c3..0c8b7c2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
@@ -121,7 +121,7 @@ public class GridNearTxFinishResponse<K, V> extends GridDistributedTxFinishRespo
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -129,19 +129,19 @@ public class GridNearTxFinishResponse<K, V> extends GridDistributedTxFinishRespo
 
         switch (writer.state()) {
             case 5:
-                if (!writer.writeField("errBytes", errBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("errBytes", errBytes))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeField("nearThreadId", nearThreadId, MessageFieldType.LONG))
+                if (!writer.writeLong("nearThreadId", nearThreadId))
                     return false;
 
                 writer.incrementState();
@@ -160,7 +160,7 @@ public class GridNearTxFinishResponse<K, V> extends GridDistributedTxFinishRespo
 
         switch (readState) {
             case 5:
-                errBytes = reader.readField("errBytes", MessageFieldType.BYTE_ARR);
+                errBytes = reader.readByteArray("errBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -168,7 +168,7 @@ public class GridNearTxFinishResponse<K, V> extends GridDistributedTxFinishRespo
                 readState++;
 
             case 6:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -176,7 +176,7 @@ public class GridNearTxFinishResponse<K, V> extends GridDistributedTxFinishRespo
                 readState++;
 
             case 7:
-                nearThreadId = reader.readField("nearThreadId", MessageFieldType.LONG);
+                nearThreadId = reader.readLong("nearThreadId");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
index 2d52660..b4c8af3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
@@ -223,7 +223,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -231,49 +231,49 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
 
         switch (writer.state()) {
             case 22:
-                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 23:
-                if (!writer.writeField("last", last, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("last", last))
                     return false;
 
                 writer.incrementState();
 
             case 24:
-                if (!writer.writeCollectionField("lastBackups", lastBackups, MessageFieldType.UUID))
+                if (!writer.writeCollection("lastBackups", lastBackups, MessageFieldType.UUID))
                     return false;
 
                 writer.incrementState();
 
             case 25:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 26:
-                if (!writer.writeField("near", near, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("near", near))
                     return false;
 
                 writer.incrementState();
 
             case 27:
-                if (!writer.writeField("subjId", subjId, MessageFieldType.UUID))
+                if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
             case 28:
-                if (!writer.writeField("taskNameHash", taskNameHash, MessageFieldType.INT))
+                if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
             case 29:
-                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
+                if (!writer.writeLong("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -292,7 +292,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
 
         switch (readState) {
             case 22:
-                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -300,7 +300,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 23:
-                last = reader.readField("last", MessageFieldType.BOOLEAN);
+                last = reader.readBoolean("last");
 
                 if (!reader.isLastRead())
                     return false;
@@ -308,7 +308,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 24:
-                lastBackups = reader.readCollectionField("lastBackups", MessageFieldType.UUID);
+                lastBackups = reader.readCollection("lastBackups", MessageFieldType.UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -316,7 +316,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 25:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -324,7 +324,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 26:
-                near = reader.readField("near", MessageFieldType.BOOLEAN);
+                near = reader.readBoolean("near");
 
                 if (!reader.isLastRead())
                     return false;
@@ -332,7 +332,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 27:
-                subjId = reader.readField("subjId", MessageFieldType.UUID);
+                subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -340,7 +340,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 28:
-                taskNameHash = reader.readField("taskNameHash", MessageFieldType.INT);
+                taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
                     return false;
@@ -348,7 +348,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
                 readState++;
 
             case 29:
-                topVer = reader.readField("topVer", MessageFieldType.LONG);
+                topVer = reader.readLong("topVer");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index 32d7d23..0d27b44 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@ -231,7 +231,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -239,37 +239,37 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
 
         switch (writer.state()) {
             case 10:
-                if (!writer.writeField("dhtVer", dhtVer, MessageFieldType.MSG))
+                if (!writer.writeMessage("dhtVer", dhtVer))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeCollectionField("invalidParts", invalidParts, MessageFieldType.INT))
+                if (!writer.writeCollection("invalidParts", invalidParts, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
+                if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeCollectionField("ownedValsBytes", ownedValsBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollection("ownedValsBytes", ownedValsBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeCollectionField("pending", pending, MessageFieldType.MSG))
+                if (!writer.writeCollection("pending", pending, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -288,7 +288,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
 
         switch (readState) {
             case 10:
-                dhtVer = reader.readField("dhtVer", MessageFieldType.MSG);
+                dhtVer = reader.readMessage("dhtVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -296,7 +296,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
                 readState++;
 
             case 11:
-                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -304,7 +304,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
                 readState++;
 
             case 12:
-                invalidParts = reader.readCollectionField("invalidParts", MessageFieldType.INT);
+                invalidParts = reader.readCollection("invalidParts", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -312,7 +312,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
                 readState++;
 
             case 13:
-                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
+                miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -320,7 +320,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
                 readState++;
 
             case 14:
-                ownedValsBytes = reader.readCollectionField("ownedValsBytes", MessageFieldType.BYTE_ARR);
+                ownedValsBytes = reader.readCollection("ownedValsBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -328,7 +328,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
                 readState++;
 
             case 15:
-                pending = reader.readCollectionField("pending", MessageFieldType.MSG);
+                pending = reader.readCollection("pending", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
index 819a86d..266bf97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
@@ -54,7 +54,7 @@ public class GridNearUnlockRequest<K, V> extends GridDistributedUnlockRequest<K,
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01689b1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index ff326e8..eda408c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -448,7 +448,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeMessageType(directType()))
+            if (!writer.writeByte(null, directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -456,115 +456,115 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeField("all", all, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("all", all))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeField("argsBytes", argsBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("argsBytes", argsBytes))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeField("cacheName", cacheName, MessageFieldType.STRING))
+                if (!writer.writeString("cacheName", cacheName))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeField("cancel", cancel, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("cancel", cancel))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeField("clause", clause, MessageFieldType.STRING))
+                if (!writer.writeString("clause", clause))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeField("clsName", clsName, MessageFieldType.STRING))
+                if (!writer.writeString("clsName", clsName))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeField("fields", fields, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("fields", fields))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeField("id", id, MessageFieldType.LONG))
+                if (!writer.writeLong("id", id))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeField("incBackups", incBackups, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("incBackups", incBackups))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeField("incMeta", incMeta, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("incMeta", incMeta))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeField("keepPortable", keepPortable, MessageFieldType.BOOLEAN))
+                if (!writer.writeBoolean("keepPortable", keepPortable))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeField("keyValFilterBytes", keyValFilterBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("keyValFilterBytes", keyValFilterBytes))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeField("pageSize", pageSize, MessageFieldType.INT))
+                if (!writer.writeInt("pageSize", pageSize))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeField("prjFilterBytes", prjFilterBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("prjFilterBytes", prjFilterBytes))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeField("rdcBytes", rdcBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("rdcBytes", rdcBytes))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeField("subjId", subjId, MessageFieldType.UUID))
+                if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
             case 19:
-                if (!writer.writeField("taskHash", taskHash, MessageFieldType.INT))
+                if (!writer.writeInt("taskHash", taskHash))
                     return false;
 
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeField("transBytes", transBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeByteArray("transBytes", transBytes))
                     return false;
 
                 writer.incrementState();
 
             case 21:
-                if (!writer.writeField("type", type != null ? (byte)type.ordinal() : -1, MessageFieldType.BYTE))
+                if (!writer.writeByte("type", type != null ? (byte)type.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
@@ -583,7 +583,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
 
         switch (readState) {
             case 3:
-                all = reader.readField("all", MessageFieldType.BOOLEAN);
+                all = reader.readBoolean("all");
 
                 if (!reader.isLastRead())
                     return false;
@@ -591,7 +591,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 4:
-                argsBytes = reader.readField("argsBytes", MessageFieldType.BYTE_ARR);
+                argsBytes = reader.readByteArray("argsBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -599,7 +599,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 5:
-                cacheName = reader.readField("cacheName", MessageFieldType.STRING);
+                cacheName = reader.readString("cacheName");
 
                 if (!reader.isLastRead())
                     return false;
@@ -607,7 +607,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 6:
-                cancel = reader.readField("cancel", MessageFieldType.BOOLEAN);
+                cancel = reader.readBoolean("cancel");
 
                 if (!reader.isLastRead())
                     return false;
@@ -615,7 +615,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 7:
-                clause = reader.readField("clause", MessageFieldType.STRING);
+                clause = reader.readString("clause");
 
                 if (!reader.isLastRead())
                     return false;
@@ -623,7 +623,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 8:
-                clsName = reader.readField("clsName", MessageFieldType.STRING);
+                clsName = reader.readString("clsName");
 
                 if (!reader.isLastRead())
                     return false;
@@ -631,7 +631,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 9:
-                fields = reader.readField("fields", MessageFieldType.BOOLEAN);
+                fields = reader.readBoolean("fields");
 
                 if (!reader.isLastRead())
                     return false;
@@ -639,7 +639,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 10:
-                id = reader.readField("id", MessageFieldType.LONG);
+                id = reader.readLong("id");
 
                 if (!reader.isLastRead())
                     return false;
@@ -647,7 +647,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 11:
-                incBackups = reader.readField("incBackups", MessageFieldType.BOOLEAN);
+                incBackups = reader.readBoolean("incBackups");
 
                 if (!reader.isLastRead())
                     return false;
@@ -655,7 +655,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 12:
-                incMeta = reader.readField("incMeta", MessageFieldType.BOOLEAN);
+                incMeta = reader.readBoolean("incMeta");
 
                 if (!reader.isLastRead())
                     return false;
@@ -663,7 +663,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 13:
-                keepPortable = reader.readField("keepPortable", MessageFieldType.BOOLEAN);
+                keepPortable = reader.readBoolean("keepPortable");
 
                 if (!reader.isLastRead())
                     return false;
@@ -671,7 +671,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 14:
-                keyValFilterBytes = reader.readField("keyValFilterBytes", MessageFieldType.BYTE_ARR);
+                keyValFilterBytes = reader.readByteArray("keyValFilterBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -679,7 +679,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 15:
-                pageSize = reader.readField("pageSize", MessageFieldType.INT);
+                pageSize = reader.readInt("pageSize");
 
                 if (!reader.isLastRead())
                     return false;
@@ -687,7 +687,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 16:
-                prjFilterBytes = reader.readField("prjFilterBytes", MessageFieldType.BYTE_ARR);
+                prjFilterBytes = reader.readByteArray("prjFilterBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -695,7 +695,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 17:
-                rdcBytes = reader.readField("rdcBytes", MessageFieldType.BYTE_ARR);
+                rdcBytes = reader.readByteArray("rdcBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -703,7 +703,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 18:
-                subjId = reader.readField("subjId", MessageFieldType.UUID);
+                subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -711,7 +711,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 19:
-                taskHash = reader.readField("taskHash", MessageFieldType.INT);
+                taskHash = reader.readInt("taskHash");
 
                 if (!reader.isLastRead())
                     return false;
@@ -719,7 +719,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
                 readState++;
 
             case 20:
-                transBytes = reader.readField("transBytes", MessageFieldType.BYTE_ARR);
+                transBytes = reader.readByteArray("transBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -729,7 +729,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
             case 21:
                 byte typeOrd;
 
-                typeOrd = reader.readField("type", MessageFieldType.BYTE);
+                typeOrd = reader.readByte("type");
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message