ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [15/17] incubator-ignite git commit: ignite-nio - Removing message clone
Date Sun, 15 Feb 2015 06:44:12 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
index 23c1306..b99c69d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
@@ -147,7 +147,7 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -155,19 +155,19 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeByteArray("entriesBytes", entriesBytes))
+                if (!writer.writeField("entriesBytes", entriesBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeLong("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeLong("topVer", topVer))
+                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
@@ -186,7 +186,7 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
 
         switch (readState) {
             case 3:
-                entriesBytes = reader.readByteArray("entriesBytes");
+                entriesBytes = reader.readField("entriesBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -194,7 +194,7 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
                 readState++;
 
             case 4:
-                futId = reader.readLong("futId");
+                futId = reader.readField("futId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -202,7 +202,7 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
                 readState++;
 
             case 5:
-                topVer = reader.readLong("topVer");
+                topVer = reader.readField("topVer", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
index b1f9902..d73240a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
@@ -136,7 +136,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -144,19 +144,19 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeBoolean("err", err))
+                if (!writer.writeField("err", err, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeLong("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeCollection("rejectedKeyBytes", rejectedKeyBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("rejectedKeyBytes", rejectedKeyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -175,7 +175,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
 
         switch (readState) {
             case 3:
-                err = reader.readBoolean("err");
+                err = reader.readField("err", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -183,7 +183,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 4:
-                futId = reader.readLong("futId");
+                futId = reader.readField("futId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -191,7 +191,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 5:
-                rejectedKeyBytes = reader.readCollection("rejectedKeyBytes", MessageFieldType.BYTE_ARR);
+                rejectedKeyBytes = reader.readCollectionField("rejectedKeyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
index 839031b..e3dc0e6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
@@ -650,7 +650,7 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -658,19 +658,19 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter {
 
         switch (writer.state()) {
             case 0:
-                if (!writer.writeInt("cacheId", cacheId))
+                if (!writer.writeField("cacheId", cacheId, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 1:
-                if (!writer.writeMessage("depInfo", depInfo))
+                if (!writer.writeField("depInfo", depInfo, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 2:
-                if (!writer.writeLong("msgId", msgId))
+                if (!writer.writeField("msgId", msgId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
@@ -686,7 +686,7 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter {
 
         switch (readState) {
             case 0:
-                cacheId = reader.readInt("cacheId");
+                cacheId = reader.readField("cacheId", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -694,7 +694,7 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter {
                 readState++;
 
             case 1:
-                depInfo = reader.readMessage("depInfo");
+                depInfo = reader.readField("depInfo", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -702,7 +702,7 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter {
                 readState++;
 
             case 2:
-                msgId = reader.readLong("msgId");
+                msgId = reader.readField("msgId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
index dd30b5a..4e5a83c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
@@ -124,7 +124,7 @@ public class GridCacheValueBytes extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -132,13 +132,13 @@ public class GridCacheValueBytes extends MessageAdapter {
 
         switch (writer.state()) {
             case 0:
-                if (!writer.writeByteArray("bytes", bytes))
+                if (!writer.writeField("bytes", bytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 1:
-                if (!writer.writeBoolean("plain", plain))
+                if (!writer.writeField("plain", plain, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
@@ -154,7 +154,7 @@ public class GridCacheValueBytes extends MessageAdapter {
 
         switch (readState) {
             case 0:
-                bytes = reader.readByteArray("bytes");
+                bytes = reader.readField("bytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -162,7 +162,7 @@ public class GridCacheValueBytes extends MessageAdapter {
                 readState++;
 
             case 1:
-                plain = reader.readBoolean("plain");
+                plain = reader.readField("plain", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
index d6f175e..e84ae1d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
@@ -117,7 +117,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -125,31 +125,31 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeIgniteUuid("miniId", miniId))
+                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeMessage("nearXidVer", nearXidVer))
+                if (!writer.writeField("nearXidVer", nearXidVer, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeBoolean("sys", sys))
+                if (!writer.writeField("sys", sys, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeInt("txNum", txNum))
+                if (!writer.writeField("txNum", txNum, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
@@ -168,7 +168,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
 
         switch (readState) {
             case 8:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -176,7 +176,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
                 readState++;
 
             case 9:
-                miniId = reader.readIgniteUuid("miniId");
+                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -184,7 +184,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
                 readState++;
 
             case 10:
-                nearXidVer = reader.readMessage("nearXidVer");
+                nearXidVer = reader.readField("nearXidVer", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -192,7 +192,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
                 readState++;
 
             case 11:
-                sys = reader.readBoolean("sys");
+                sys = reader.readField("sys", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -200,7 +200,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
                 readState++;
 
             case 12:
-                txNum = reader.readInt("txNum");
+                txNum = reader.readField("txNum", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
index 0168398..e1a35d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
@@ -92,7 +92,7 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -100,19 +100,19 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeIgniteUuid("miniId", miniId))
+                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeBoolean("success", success))
+                if (!writer.writeField("success", success, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
@@ -131,7 +131,7 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
 
         switch (readState) {
             case 8:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -139,7 +139,7 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
                 readState++;
 
             case 9:
-                miniId = reader.readIgniteUuid("miniId");
+                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -147,7 +147,7 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
                 readState++;
 
             case 10:
-                success = reader.readBoolean("success");
+                success = reader.readField("success", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
index b25f290..3538c07 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
@@ -147,7 +147,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -155,43 +155,43 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeIgniteUuid("miniId", miniId))
+                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeBoolean("nearOnlyCheck", nearOnlyCheck))
+                if (!writer.writeField("nearOnlyCheck", nearOnlyCheck, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeMessage("nearXidVer", nearXidVer))
+                if (!writer.writeField("nearXidVer", nearXidVer, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeUuid("originatingNodeId", originatingNodeId))
+                if (!writer.writeField("originatingNodeId", originatingNodeId, MessageFieldType.UUID))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeLong("originatingThreadId", originatingThreadId))
+                if (!writer.writeField("originatingThreadId", originatingThreadId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeBoolean("sys", sys))
+                if (!writer.writeField("sys", sys, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
@@ -210,7 +210,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
 
         switch (readState) {
             case 8:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -218,7 +218,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
                 readState++;
 
             case 9:
-                miniId = reader.readIgniteUuid("miniId");
+                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -226,7 +226,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
                 readState++;
 
             case 10:
-                nearOnlyCheck = reader.readBoolean("nearOnlyCheck");
+                nearOnlyCheck = reader.readField("nearOnlyCheck", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -234,7 +234,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
                 readState++;
 
             case 11:
-                nearXidVer = reader.readMessage("nearXidVer");
+                nearXidVer = reader.readField("nearXidVer", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -242,7 +242,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
                 readState++;
 
             case 12:
-                originatingNodeId = reader.readUuid("originatingNodeId");
+                originatingNodeId = reader.readField("originatingNodeId", MessageFieldType.UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -250,7 +250,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
                 readState++;
 
             case 13:
-                originatingThreadId = reader.readLong("originatingThreadId");
+                originatingThreadId = reader.readField("originatingThreadId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -258,7 +258,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
                 readState++;
 
             case 14:
-                sys = reader.readBoolean("sys");
+                sys = reader.readField("sys", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
index 69682cb..b402f18 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
@@ -135,7 +135,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -143,25 +143,25 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeByteArray("committedTxInfoBytes", committedTxInfoBytes))
+                if (!writer.writeField("committedTxInfoBytes", committedTxInfoBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeIgniteUuid("miniId", miniId))
+                if (!writer.writeField("miniId", miniId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeBoolean("sys", sys))
+                if (!writer.writeField("sys", sys, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
@@ -180,7 +180,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
 
         switch (readState) {
             case 8:
-                committedTxInfoBytes = reader.readByteArray("committedTxInfoBytes");
+                committedTxInfoBytes = reader.readField("committedTxInfoBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -188,7 +188,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
                 readState++;
 
             case 9:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -196,7 +196,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
                 readState++;
 
             case 10:
-                miniId = reader.readIgniteUuid("miniId");
+                miniId = reader.readField("miniId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -204,7 +204,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
                 readState++;
 
             case 11:
-                sys = reader.readBoolean("sys");
+                sys = reader.readField("sys", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
index 19da7fe..f057f7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
@@ -194,7 +194,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -202,37 +202,37 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeCollection("keysBytes", keysBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("keysBytes", keysBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeCollection("nearKeysBytes", nearKeysBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("nearKeysBytes", nearKeysBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeCollection("nearVers", nearVers, MessageFieldType.MSG))
+                if (!writer.writeCollectionField("nearVers", nearVers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeLong("topVer", topVer))
+                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeLong("ttl", ttl))
+                if (!writer.writeField("ttl", ttl, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeCollection("vers", vers, MessageFieldType.MSG))
+                if (!writer.writeCollectionField("vers", vers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -251,7 +251,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
 
         switch (readState) {
             case 3:
-                keysBytes = reader.readCollection("keysBytes", MessageFieldType.BYTE_ARR);
+                keysBytes = reader.readCollectionField("keysBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -259,7 +259,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 4:
-                nearKeysBytes = reader.readCollection("nearKeysBytes", MessageFieldType.BYTE_ARR);
+                nearKeysBytes = reader.readCollectionField("nearKeysBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -267,7 +267,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 5:
-                nearVers = reader.readCollection("nearVers", MessageFieldType.MSG);
+                nearVers = reader.readCollectionField("nearVers", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -275,7 +275,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 6:
-                topVer = reader.readLong("topVer");
+                topVer = reader.readField("topVer", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -283,7 +283,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 7:
-                ttl = reader.readLong("ttl");
+                ttl = reader.readField("ttl", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -291,7 +291,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 8:
-                vers = reader.readCollection("vers", MessageFieldType.MSG);
+                vers = reader.readCollectionField("vers", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
index f58c520..9717e28 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
@@ -247,7 +247,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -255,31 +255,31 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeByteArray("candsByIdxBytes", candsByIdxBytes))
+                if (!writer.writeField("candsByIdxBytes", candsByIdxBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeByteArray("candsByKeyBytes", candsByKeyBytes))
+                if (!writer.writeField("candsByKeyBytes", candsByKeyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeCollection("committedVers", committedVers, MessageFieldType.MSG))
+                if (!writer.writeCollectionField("committedVers", committedVers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeCollection("rolledbackVers", rolledbackVers, MessageFieldType.MSG))
+                if (!writer.writeCollectionField("rolledbackVers", rolledbackVers, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeMessage("ver", ver))
+                if (!writer.writeField("ver", ver, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -298,7 +298,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
 
         switch (readState) {
             case 3:
-                candsByIdxBytes = reader.readByteArray("candsByIdxBytes");
+                candsByIdxBytes = reader.readField("candsByIdxBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -306,7 +306,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 readState++;
 
             case 4:
-                candsByKeyBytes = reader.readByteArray("candsByKeyBytes");
+                candsByKeyBytes = reader.readField("candsByKeyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -314,7 +314,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 readState++;
 
             case 5:
-                committedVers = reader.readCollection("committedVers", MessageFieldType.MSG);
+                committedVers = reader.readCollectionField("committedVers", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -322,7 +322,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 readState++;
 
             case 6:
-                rolledbackVers = reader.readCollection("rolledbackVers", MessageFieldType.MSG);
+                rolledbackVers = reader.readCollectionField("rolledbackVers", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -330,7 +330,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 readState++;
 
             case 7:
-                ver = reader.readMessage("ver");
+                ver = reader.readField("ver", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index ed20375..8b16f87 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -433,7 +433,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -441,97 +441,97 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeObjectArray("drVersByIdx", drVersByIdx, MessageFieldType.MSG))
+                if (!writer.writeArrayField("drVersByIdx", drVersByIdx, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeByteArray("grpLockKeyBytes", grpLockKeyBytes))
+                if (!writer.writeField("grpLockKeyBytes", grpLockKeyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeBoolean("isInTx", isInTx))
+                if (!writer.writeField("isInTx", isInTx, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeBoolean("isInvalidate", isInvalidate))
+                if (!writer.writeField("isInvalidate", isInvalidate, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeBoolean("isRead", isRead))
+                if (!writer.writeField("isRead", isRead, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeByte("isolation", isolation != null ? (byte)isolation.ordinal() : -1))
+                if (!writer.writeField("isolation", isolation != null ? (byte)isolation.ordinal() : -1, MessageFieldType.BYTE))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeCollection("keyBytes", keyBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("keyBytes", keyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeMessage("nearXidVer", nearXidVer))
+                if (!writer.writeField("nearXidVer", nearXidVer, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeUuid("nodeId", nodeId))
+                if (!writer.writeField("nodeId", nodeId, MessageFieldType.UUID))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeBoolean("partLock", partLock))
+                if (!writer.writeField("partLock", partLock, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 19:
-                if (!writer.writeBooleanArray("retVals", retVals))
+                if (!writer.writeField("retVals", retVals, MessageFieldType.BOOLEAN_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeLong("threadId", threadId))
+                if (!writer.writeField("threadId", threadId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 21:
-                if (!writer.writeLong("timeout", timeout))
+                if (!writer.writeField("timeout", timeout, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 22:
-                if (!writer.writeInt("txSize", txSize))
+                if (!writer.writeField("txSize", txSize, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 23:
-                if (!writer.writeByteArray("writeEntriesBytes", writeEntriesBytes))
+                if (!writer.writeField("writeEntriesBytes", writeEntriesBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -550,7 +550,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
 
         switch (readState) {
             case 8:
-                drVersByIdx = reader.readObjectArray("drVersByIdx", MessageFieldType.MSG, GridCacheVersion.class);
+                drVersByIdx = reader.readArrayField("drVersByIdx", MessageFieldType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
                     return false;
@@ -558,7 +558,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 9:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -566,7 +566,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 10:
-                grpLockKeyBytes = reader.readByteArray("grpLockKeyBytes");
+                grpLockKeyBytes = reader.readField("grpLockKeyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -574,7 +574,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 11:
-                isInTx = reader.readBoolean("isInTx");
+                isInTx = reader.readField("isInTx", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -582,7 +582,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 12:
-                isInvalidate = reader.readBoolean("isInvalidate");
+                isInvalidate = reader.readField("isInvalidate", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -590,7 +590,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 13:
-                isRead = reader.readBoolean("isRead");
+                isRead = reader.readField("isRead", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -600,7 +600,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
             case 14:
                 byte isolationOrd;
 
-                isolationOrd = reader.readByte("isolation");
+                isolationOrd = reader.readField("isolation", MessageFieldType.BYTE);
 
                 if (!reader.isLastRead())
                     return false;
@@ -610,7 +610,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 15:
-                keyBytes = reader.readCollection("keyBytes", MessageFieldType.BYTE_ARR);
+                keyBytes = reader.readCollectionField("keyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -618,7 +618,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 16:
-                nearXidVer = reader.readMessage("nearXidVer");
+                nearXidVer = reader.readField("nearXidVer", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -626,7 +626,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 17:
-                nodeId = reader.readUuid("nodeId");
+                nodeId = reader.readField("nodeId", MessageFieldType.UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -634,7 +634,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 18:
-                partLock = reader.readBoolean("partLock");
+                partLock = reader.readField("partLock", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -642,7 +642,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 19:
-                retVals = reader.readBooleanArray("retVals");
+                retVals = reader.readField("retVals", MessageFieldType.BOOLEAN_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -650,7 +650,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 20:
-                threadId = reader.readLong("threadId");
+                threadId = reader.readField("threadId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -658,7 +658,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 21:
-                timeout = reader.readLong("timeout");
+                timeout = reader.readField("timeout", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -666,7 +666,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 22:
-                txSize = reader.readInt("txSize");
+                txSize = reader.readField("txSize", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -674,7 +674,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 23:
-                writeEntriesBytes = reader.readByteArray("writeEntriesBytes");
+                writeEntriesBytes = reader.readField("writeEntriesBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index f02d826..0654e14 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -284,7 +284,7 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -292,19 +292,19 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeByteArray("errBytes", errBytes))
+                if (!writer.writeField("errBytes", errBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeCollection("valBytes", valBytes, MessageFieldType.MSG))
+                if (!writer.writeCollectionField("valBytes", valBytes, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -323,7 +323,7 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
 
         switch (readState) {
             case 8:
-                errBytes = reader.readByteArray("errBytes");
+                errBytes = reader.readField("errBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -331,7 +331,7 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
                 readState++;
 
             case 9:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -339,7 +339,7 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
                 readState++;
 
             case 10:
-                valBytes = reader.readCollection("valBytes", MessageFieldType.MSG);
+                valBytes = reader.readCollectionField("valBytes", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/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 9896e18..21a31e8 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
@@ -351,7 +351,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -359,79 +359,79 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeMessage("baseVer", baseVer))
+                if (!writer.writeField("baseVer", baseVer, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeBoolean("commit", commit))
+                if (!writer.writeField("commit", commit, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeMessage("commitVer", commitVer))
+                if (!writer.writeField("commitVer", commitVer, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeByteArray("grpLockKeyBytes", grpLockKeyBytes))
+                if (!writer.writeField("grpLockKeyBytes", grpLockKeyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeBoolean("invalidate", invalidate))
+                if (!writer.writeField("invalidate", invalidate, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeCollection("recoveryWritesBytes", recoveryWritesBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("recoveryWritesBytes", recoveryWritesBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeBoolean("syncCommit", syncCommit))
+                if (!writer.writeField("syncCommit", syncCommit, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeBoolean("syncRollback", syncRollback))
+                if (!writer.writeField("syncRollback", syncRollback, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeBoolean("sys", sys))
+                if (!writer.writeField("sys", sys, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeLong("threadId", threadId))
+                if (!writer.writeField("threadId", threadId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 19:
-                if (!writer.writeInt("txSize", txSize))
+                if (!writer.writeField("txSize", txSize, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeCollection("writeEntriesBytes", writeEntriesBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("writeEntriesBytes", writeEntriesBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -450,7 +450,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
         switch (readState) {
             case 8:
-                baseVer = reader.readMessage("baseVer");
+                baseVer = reader.readField("baseVer", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -458,7 +458,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 9:
-                commit = reader.readBoolean("commit");
+                commit = reader.readField("commit", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -466,7 +466,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 10:
-                commitVer = reader.readMessage("commitVer");
+                commitVer = reader.readField("commitVer", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -474,7 +474,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 11:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -482,7 +482,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 12:
-                grpLockKeyBytes = reader.readByteArray("grpLockKeyBytes");
+                grpLockKeyBytes = reader.readField("grpLockKeyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -490,7 +490,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 13:
-                invalidate = reader.readBoolean("invalidate");
+                invalidate = reader.readField("invalidate", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -498,7 +498,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 14:
-                recoveryWritesBytes = reader.readCollection("recoveryWritesBytes", MessageFieldType.BYTE_ARR);
+                recoveryWritesBytes = reader.readCollectionField("recoveryWritesBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -506,7 +506,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 15:
-                syncCommit = reader.readBoolean("syncCommit");
+                syncCommit = reader.readField("syncCommit", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -514,7 +514,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 16:
-                syncRollback = reader.readBoolean("syncRollback");
+                syncRollback = reader.readField("syncRollback", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -522,7 +522,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 17:
-                sys = reader.readBoolean("sys");
+                sys = reader.readField("sys", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -530,7 +530,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 18:
-                threadId = reader.readLong("threadId");
+                threadId = reader.readField("threadId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -538,7 +538,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 19:
-                txSize = reader.readInt("txSize");
+                txSize = reader.readField("txSize", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -546,7 +546,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 20:
-                writeEntriesBytes = reader.readCollection("writeEntriesBytes", MessageFieldType.BYTE_ARR);
+                writeEntriesBytes = reader.readCollectionField("writeEntriesBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
index 8d21c0e..b69350c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
@@ -81,7 +81,7 @@ public class GridDistributedTxFinishResponse<K, V> extends GridCacheMessage<K, V
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -89,13 +89,13 @@ public class GridDistributedTxFinishResponse<K, V> extends GridCacheMessage<K, V
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeField("futId", futId, MessageFieldType.IGNITE_UUID))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeMessage("txId", txId))
+                if (!writer.writeField("txId", txId, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -114,7 +114,7 @@ public class GridDistributedTxFinishResponse<K, V> extends GridCacheMessage<K, V
 
         switch (readState) {
             case 3:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readField("futId", MessageFieldType.IGNITE_UUID);
 
                 if (!reader.isLastRead())
                     return false;
@@ -122,7 +122,7 @@ public class GridDistributedTxFinishResponse<K, V> extends GridCacheMessage<K, V
                 readState++;
 
             case 4:
-                txId = reader.readMessage("txId");
+                txId = reader.readField("txId", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/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 d685b48..738c5ba 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
@@ -409,7 +409,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -417,85 +417,85 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeMessage("commitVer", commitVer))
+                if (!writer.writeField("commitVer", commitVer, MessageFieldType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeByte("concurrency", concurrency != null ? (byte)concurrency.ordinal() : -1))
+                if (!writer.writeField("concurrency", concurrency != null ? (byte)concurrency.ordinal() : -1, MessageFieldType.BYTE))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeByteArray("dhtVersBytes", dhtVersBytes))
+                if (!writer.writeField("dhtVersBytes", dhtVersBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeByteArray("grpLockKeyBytes", grpLockKeyBytes))
+                if (!writer.writeField("grpLockKeyBytes", grpLockKeyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeBoolean("invalidate", invalidate))
+                if (!writer.writeField("invalidate", invalidate, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeByte("isolation", isolation != null ? (byte)isolation.ordinal() : -1))
+                if (!writer.writeField("isolation", isolation != null ? (byte)isolation.ordinal() : -1, MessageFieldType.BYTE))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeBoolean("partLock", partLock))
+                if (!writer.writeField("partLock", partLock, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeCollection("readsBytes", readsBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("readsBytes", readsBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeBoolean("sys", sys))
+                if (!writer.writeField("sys", sys, MessageFieldType.BOOLEAN))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeLong("threadId", threadId))
+                if (!writer.writeField("threadId", threadId, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeLong("timeout", timeout))
+                if (!writer.writeField("timeout", timeout, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
 
             case 19:
-                if (!writer.writeByteArray("txNodesBytes", txNodesBytes))
+                if (!writer.writeField("txNodesBytes", txNodesBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeInt("txSize", txSize))
+                if (!writer.writeField("txSize", txSize, MessageFieldType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 21:
-                if (!writer.writeCollection("writesBytes", writesBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("writesBytes", writesBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -514,7 +514,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
 
         switch (readState) {
             case 8:
-                commitVer = reader.readMessage("commitVer");
+                commitVer = reader.readField("commitVer", MessageFieldType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -524,7 +524,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             case 9:
                 byte concurrencyOrd;
 
-                concurrencyOrd = reader.readByte("concurrency");
+                concurrencyOrd = reader.readField("concurrency", MessageFieldType.BYTE);
 
                 if (!reader.isLastRead())
                     return false;
@@ -534,7 +534,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 10:
-                dhtVersBytes = reader.readByteArray("dhtVersBytes");
+                dhtVersBytes = reader.readField("dhtVersBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -542,7 +542,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 11:
-                grpLockKeyBytes = reader.readByteArray("grpLockKeyBytes");
+                grpLockKeyBytes = reader.readField("grpLockKeyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -550,7 +550,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 12:
-                invalidate = reader.readBoolean("invalidate");
+                invalidate = reader.readField("invalidate", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -560,7 +560,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             case 13:
                 byte isolationOrd;
 
-                isolationOrd = reader.readByte("isolation");
+                isolationOrd = reader.readField("isolation", MessageFieldType.BYTE);
 
                 if (!reader.isLastRead())
                     return false;
@@ -570,7 +570,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 14:
-                partLock = reader.readBoolean("partLock");
+                partLock = reader.readField("partLock", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -578,7 +578,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 15:
-                readsBytes = reader.readCollection("readsBytes", MessageFieldType.BYTE_ARR);
+                readsBytes = reader.readCollectionField("readsBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -586,7 +586,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 16:
-                sys = reader.readBoolean("sys");
+                sys = reader.readField("sys", MessageFieldType.BOOLEAN);
 
                 if (!reader.isLastRead())
                     return false;
@@ -594,7 +594,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 17:
-                threadId = reader.readLong("threadId");
+                threadId = reader.readField("threadId", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -602,7 +602,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 18:
-                timeout = reader.readLong("timeout");
+                timeout = reader.readField("timeout", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -610,7 +610,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 19:
-                txNodesBytes = reader.readByteArray("txNodesBytes");
+                txNodesBytes = reader.readField("txNodesBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -618,7 +618,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 20:
-                txSize = reader.readInt("txSize");
+                txSize = reader.readField("txSize", MessageFieldType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -626,7 +626,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 21:
-                writesBytes = reader.readCollection("writesBytes", MessageFieldType.BYTE_ARR);
+                writesBytes = reader.readCollectionField("writesBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
index c8576a1..6c0ad3d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
@@ -156,7 +156,7 @@ public class GridDistributedTxPrepareResponse<K, V> extends GridDistributedBaseM
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -164,13 +164,13 @@ public class GridDistributedTxPrepareResponse<K, V> extends GridDistributedBaseM
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeByteArray("candsBytes", candsBytes))
+                if (!writer.writeField("candsBytes", candsBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeByteArray("errBytes", errBytes))
+                if (!writer.writeField("errBytes", errBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -189,7 +189,7 @@ public class GridDistributedTxPrepareResponse<K, V> extends GridDistributedBaseM
 
         switch (readState) {
             case 8:
-                candsBytes = reader.readByteArray("candsBytes");
+                candsBytes = reader.readField("candsBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -197,7 +197,7 @@ public class GridDistributedTxPrepareResponse<K, V> extends GridDistributedBaseM
                 readState++;
 
             case 9:
-                errBytes = reader.readByteArray("errBytes");
+                errBytes = reader.readField("errBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
index 8526a9e..0b77dc7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
@@ -122,7 +122,7 @@ public class GridDistributedUnlockRequest<K, V> extends GridDistributedBaseMessa
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -130,7 +130,7 @@ public class GridDistributedUnlockRequest<K, V> extends GridDistributedBaseMessa
 
         switch (writer.state()) {
             case 8:
-                if (!writer.writeCollection("keyBytes", keyBytes, MessageFieldType.BYTE_ARR))
+                if (!writer.writeCollectionField("keyBytes", keyBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
@@ -149,7 +149,7 @@ public class GridDistributedUnlockRequest<K, V> extends GridDistributedBaseMessa
 
         switch (readState) {
             case 8:
-                keyBytes = reader.readCollection("keyBytes", MessageFieldType.BYTE_ARR);
+                keyBytes = reader.readCollectionField("keyBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
index 7a2d68c..6b95b8c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
@@ -74,7 +74,7 @@ public class GridDhtAffinityAssignmentRequest<K, V> extends GridCacheMessage<K,
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -82,7 +82,7 @@ public class GridDhtAffinityAssignmentRequest<K, V> extends GridCacheMessage<K,
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeLong("topVer", topVer))
+                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
@@ -101,7 +101,7 @@ public class GridDhtAffinityAssignmentRequest<K, V> extends GridCacheMessage<K,
 
         switch (readState) {
             case 3:
-                topVer = reader.readLong("topVer");
+                topVer = reader.readField("topVer", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af8edc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
index ea797f8..fca59fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
@@ -114,7 +114,7 @@ public class GridDhtAffinityAssignmentResponse<K, V> extends GridCacheMessage<K,
             return false;
 
         if (!writer.isTypeWritten()) {
-            if (!writer.writeByte(null, directType()))
+            if (!writer.writeMessageType(directType()))
                 return false;
 
             writer.onTypeWritten();
@@ -122,13 +122,13 @@ public class GridDhtAffinityAssignmentResponse<K, V> extends GridCacheMessage<K,
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeByteArray("affAssignmentBytes", affAssignmentBytes))
+                if (!writer.writeField("affAssignmentBytes", affAssignmentBytes, MessageFieldType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeLong("topVer", topVer))
+                if (!writer.writeField("topVer", topVer, MessageFieldType.LONG))
                     return false;
 
                 writer.incrementState();
@@ -147,7 +147,7 @@ public class GridDhtAffinityAssignmentResponse<K, V> extends GridCacheMessage<K,
 
         switch (readState) {
             case 3:
-                affAssignmentBytes = reader.readByteArray("affAssignmentBytes");
+                affAssignmentBytes = reader.readField("affAssignmentBytes", MessageFieldType.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -155,7 +155,7 @@ public class GridDhtAffinityAssignmentResponse<K, V> extends GridCacheMessage<K,
                 readState++;
 
             case 4:
-                topVer = reader.readLong("topVer");
+                topVer = reader.readField("topVer", MessageFieldType.LONG);
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message