ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [5/6] incubator-ignite git commit: ignite-nio - Removing message clone
Date Sun, 15 Feb 2015 03:08:51 GMT
ignite-nio - Removing message clone


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

Branch: refs/heads/ignite-nio
Commit: ca27b586a298b859e176779a0458c4b5c882f18b
Parents: f1d4194
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Sat Feb 14 18:54:08 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Sat Feb 14 18:54:08 2015 -0800

----------------------------------------------------------------------
 .../CommunicationMessageCodeGenerator.java      |  2 +-
 .../ignite/internal/GridJobExecuteRequest.java  |  8 +--
 .../internal/direct/DirectByteBufferStream.java | 61 ++++++++------------
 .../internal/direct/DirectMessageReader.java    | 14 ++---
 .../internal/direct/DirectMessageWriter.java    | 13 +++--
 .../communication/GridIoUserMessage.java        |  4 +-
 .../deployment/GridDeploymentInfoBean.java      |  4 +-
 .../deployment/GridDeploymentRequest.java       |  4 +-
 .../eventstorage/GridEventStorageMessage.java   |  4 +-
 .../cache/GridCacheEvictionResponse.java        |  4 +-
 .../distributed/GridCacheTtlUpdateRequest.java  | 16 ++---
 .../distributed/GridDistributedBaseMessage.java |  8 +--
 .../distributed/GridDistributedLockRequest.java |  8 +--
 .../GridDistributedLockResponse.java            |  4 +-
 .../GridDistributedTxFinishRequest.java         |  8 +--
 .../GridDistributedTxPrepareRequest.java        |  8 +--
 .../GridDistributedUnlockRequest.java           |  4 +-
 .../distributed/dht/GridDhtLockRequest.java     |  4 +-
 .../distributed/dht/GridDhtLockResponse.java    | 12 ++--
 .../distributed/dht/GridDhtTxFinishRequest.java |  8 +--
 .../dht/GridDhtTxPrepareRequest.java            |  4 +-
 .../dht/GridDhtTxPrepareResponse.java           | 12 ++--
 .../distributed/dht/GridDhtUnlockRequest.java   |  4 +-
 .../GridDhtAtomicDeferredUpdateResponse.java    |  4 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  | 32 +++++-----
 .../dht/atomic/GridDhtAtomicUpdateResponse.java |  4 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java | 20 +++----
 .../atomic/GridNearAtomicUpdateResponse.java    | 12 ++--
 .../dht/preloader/GridDhtForceKeysRequest.java  |  4 +-
 .../dht/preloader/GridDhtForceKeysResponse.java |  4 +-
 .../GridDhtPartitionDemandMessage.java          |  4 +-
 .../GridDhtPartitionSupplyMessage.java          |  8 +--
 .../distributed/near/GridNearGetRequest.java    |  4 +-
 .../distributed/near/GridNearGetResponse.java   |  4 +-
 .../distributed/near/GridNearLockRequest.java   |  8 +--
 .../distributed/near/GridNearLockResponse.java  | 12 ++--
 .../near/GridNearTxPrepareRequest.java          |  4 +-
 .../near/GridNearTxPrepareResponse.java         | 12 ++--
 .../cache/query/GridCacheQueryResponse.java     |  8 +--
 .../clock/GridClockDeltaSnapshotMessage.java    |  4 +-
 .../dataload/GridDataLoadRequest.java           |  4 +-
 .../processors/igfs/IgfsBlocksMessage.java      |  4 +-
 .../igfs/IgfsFragmentizerRequest.java           |  4 +-
 .../streamer/GridStreamerExecutionRequest.java  |  4 +-
 .../communication/MessageAdapter.java           | 55 +++++++++++-------
 .../extensions/communication/MessageReader.java | 15 ++---
 .../extensions/communication/MessageWriter.java | 15 ++---
 47 files changed, 235 insertions(+), 232 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
index 80cf53e..7ce89a7 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
@@ -602,7 +602,7 @@ public class CommunicationMessageCodeGenerator {
             assert mapValType != null;
 
             returnFalseIfFailed(write, "writer.writeMap", field, name, "Type." + typeEnum(mapKeyType),
-                "Type." + typeEnum(mapKeyType));
+                "Type." + typeEnum(mapValType));
         }
         else
             throw new IllegalStateException("Unsupported type: " + type);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteRequest.java
index ba1b22c..4dee422 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteRequest.java
@@ -519,7 +519,7 @@ public class GridJobExecuteRequest extends MessageAdapter implements GridTaskMes
                 state.increment();
 
             case 9:
-                if (!writer.writeMap("ldrParticipants", ldrParticipants, UUID.class, IgniteUuid.class))
+                if (!writer.writeMap("ldrParticipants", ldrParticipants, Type.UUID, Type.IGNITE_UUID))
                     return false;
 
                 state.increment();
@@ -579,7 +579,7 @@ public class GridJobExecuteRequest extends MessageAdapter implements GridTaskMes
                 state.increment();
 
             case 19:
-                if (!writer.writeCollection("top", top, UUID.class))
+                if (!writer.writeCollection("top", top, Type.UUID))
                     return false;
 
                 state.increment();
@@ -678,7 +678,7 @@ public class GridJobExecuteRequest extends MessageAdapter implements GridTaskMes
                 readState++;
 
             case 9:
-                ldrParticipants = reader.readMap("ldrParticipants", UUID.class, IgniteUuid.class, false);
+                ldrParticipants = reader.readMap("ldrParticipants", Type.UUID, Type.IGNITE_UUID, false);
 
                 if (!reader.isLastRead())
                     return false;
@@ -758,7 +758,7 @@ public class GridJobExecuteRequest extends MessageAdapter implements GridTaskMes
                 readState++;
 
             case 19:
-                top = reader.readCollection("top", UUID.class);
+                top = reader.readCollection("top", Type.UUID);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
index 4b5dc3a..33e277c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
@@ -550,10 +550,10 @@ public class DirectByteBufferStream {
 
     /**
      * @param arr Array.
-     * @param itemCls Component type.
-     * @param writer Writer.
+     * @param itemType Component type.
+     * @param state Current state.
      */
-    public <T> void writeObjectArray(T[] arr, Class<T> itemCls, MessageWriteState state) {
+    public <T> void writeObjectArray(T[] arr, MessageAdapter.Type itemType, MessageWriteState state) {
         if (arr != null) {
             if (it == null) {
                 writeInt(arr.length);
@@ -564,8 +564,6 @@ public class DirectByteBufferStream {
                 it = arrayIterator(arr);
             }
 
-            MessageAdapter.Type itemType = null;//type(itemCls);
-
             while (it.hasNext() || cur != NULL) {
                 if (cur == NULL) {
                     cur = it.next();
@@ -593,10 +591,10 @@ public class DirectByteBufferStream {
 
     /**
      * @param col Collection.
-     * @param itemCls Item type.
-     * @param writer Writer.
+     * @param itemType Item type.
+     * @param state Current state.
      */
-    public <T> void writeCollection(Collection<T> col, Class<T> itemCls, MessageWriteState state) {
+    public <T> void writeCollection(Collection<T> col, MessageAdapter.Type itemType, MessageWriteState state) {
         if (col != null) {
             if (it == null) {
                 writeInt(col.size());
@@ -607,8 +605,6 @@ public class DirectByteBufferStream {
                 it = col.iterator();
             }
 
-            MessageAdapter.Type itemType = null;//type(itemCls);
-
             while (it.hasNext() || cur != NULL) {
                 if (cur == NULL) {
                     cur = it.next();
@@ -636,12 +632,13 @@ public class DirectByteBufferStream {
 
     /**
      * @param map Map.
-     * @param keyCls Key type.
-     * @param valCls Value type.
-     * @param writer Writer.
+     * @param keyType Key type.
+     * @param valType Value type.
+     * @param state Current state.
      */
     @SuppressWarnings("unchecked")
-    public <K, V> void writeMap(Map<K, V> map, Class<K> keyCls, Class<V> valCls, MessageWriteState state) {
+    public <K, V> void writeMap(Map<K, V> map, MessageAdapter.Type keyType, MessageAdapter.Type valType,
+        MessageWriteState state) {
         if (map != null) {
             if (it == null) {
                 writeInt(map.size());
@@ -652,9 +649,6 @@ public class DirectByteBufferStream {
                 it = map.entrySet().iterator();
             }
 
-            MessageAdapter.Type keyType = null;//type(keyCls);
-            MessageAdapter.Type valType = null;//type(valCls);
-
             while (it.hasNext() || cur != NULL) {
                 Map.Entry<K, V> e;
 
@@ -975,12 +969,12 @@ public class DirectByteBufferStream {
     }
 
     /**
-     * @param itemCls Component type.
+     * @param itemType Component type.
      * @param reader Reader.
      * @return Array.
      */
     @SuppressWarnings("unchecked")
-    public <T> T[] readObjectArray(Class<?> itemCls, MessageReader reader) {
+    public <T> T[] readObjectArray(MessageAdapter.Type itemType, MessageReader reader) {
         if (readSize == -1) {
             int size = readInt();
 
@@ -992,9 +986,7 @@ public class DirectByteBufferStream {
 
         if (readSize >= 0) {
             if (objArr == null)
-                objArr = (Object[])Array.newInstance(itemCls, readSize);
-
-            MessageAdapter.Type itemType = null;//type(itemCls);
+                objArr = (Object[])Array.newInstance(itemType.clazz(), readSize);
 
             for (int i = readItems; i < readSize; i++) {
                 Object item = read(itemType, reader);
@@ -1020,12 +1012,12 @@ public class DirectByteBufferStream {
     }
 
     /**
-     * @param itemCls Item type.
+     * @param itemType Item type.
      * @param reader Reader.
      * @return Collection.
      */
     @SuppressWarnings("unchecked")
-    public <C extends Collection<T>, T> C readCollection(Class<T> itemCls, MessageReader reader) {
+    public <C extends Collection<?>> C readCollection(MessageAdapter.Type itemType, MessageReader reader) {
         if (readSize == -1) {
             int size = readInt();
 
@@ -1039,8 +1031,6 @@ public class DirectByteBufferStream {
             if (col == null)
                 col = new ArrayList<>(readSize);
 
-            MessageAdapter.Type itemType = null;//type(itemCls);
-
             for (int i = readItems; i < readSize; i++) {
                 Object item = read(itemType, reader);
 
@@ -1057,23 +1047,23 @@ public class DirectByteBufferStream {
         readItems = 0;
         cur = null;
 
-        Collection<T> col0 = (Collection<T>)col;
+        C col0 = (C)col;
 
         col = null;
 
-        return (C)col0;
+        return col0;
     }
 
     /**
-     * @param keyCls Key type.
-     * @param valCls Value type.
+     * @param keyType Key type.
+     * @param valType Value type.
      * @param reader Reader.
      * @param linked Whether linked map should be created.
      * @return Map.
      */
     @SuppressWarnings("unchecked")
-    public <M extends Map<K, V>, K, V> M readMap(Class<K> keyCls, Class<V> valCls, MessageReader reader,
-        boolean linked) {
+    public <M extends Map<?, ?>> M readMap(MessageAdapter.Type keyType, MessageAdapter.Type valType,
+        MessageReader reader, boolean linked) {
         if (readSize == -1) {
             int size = readInt();
 
@@ -1087,9 +1077,6 @@ public class DirectByteBufferStream {
             if (map == null)
                 map = linked ? U.newLinkedHashMap(readSize) : U.newHashMap(readSize);
 
-            MessageAdapter.Type keyType = null;//type(keyCls);
-            MessageAdapter.Type valType = null;//type(valCls);
-
             for (int i = readItems; i < readSize; i++) {
                 if (!keyDone) {
                     Object key = read(keyType, reader);
@@ -1118,11 +1105,11 @@ public class DirectByteBufferStream {
         readItems = 0;
         cur = null;
 
-        Map<K, V> map0 = (Map<K, V>)map;
+        M map0 = (M)map;
 
         map = null;
 
-        return (M)map0;
+        return map0;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
index f2408c3..b167122 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
@@ -236,8 +236,8 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
-    @Override public <T> T[] readObjectArray(String name, Class<T> itemCls) {
-        T[] msg = stream.readObjectArray(itemCls, this);
+    @Override public <T> T[] readObjectArray(String name, MessageAdapter.Type itemType) {
+        T[] msg = stream.readObjectArray(itemType, this);
 
         lastRead = stream.lastFinished();
 
@@ -245,8 +245,8 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
-    @Override public <C extends Collection<T>, T> C readCollection(String name, Class<T> itemCls) {
-        C col = stream.readCollection(itemCls, this);
+    @Override public <C extends Collection<?>> C readCollection(String name, MessageAdapter.Type itemType) {
+        C col = stream.readCollection(itemType, this);
 
         lastRead = stream.lastFinished();
 
@@ -254,9 +254,9 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
-    @Override public <M extends Map<K, V>, K, V> M readMap(String name, Class<K> keyCls, Class<V> valCls,
-        boolean linked) {
-        M map = stream.readMap(keyCls, valCls, this, linked);
+    @Override public <M extends Map<?, ?>> M readMap(String name, MessageAdapter.Type keyType,
+        MessageAdapter.Type valType, boolean linked) {
+        M map = stream.readMap(keyType, valType, this, linked);
 
         lastRead = stream.lastFinished();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageWriter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageWriter.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageWriter.java
index c4a14fb..9460d74 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageWriter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageWriter.java
@@ -193,22 +193,23 @@ public class DirectMessageWriter implements MessageWriter {
     }
 
     /** {@inheritDoc} */
-    @Override public <T> boolean writeObjectArray(String name, T[] arr, Class<T> itemCls) {
-        stream.writeObjectArray(arr, itemCls, state);
+    @Override public <T> boolean writeObjectArray(String name, T[] arr, MessageAdapter.Type itemType) {
+        stream.writeObjectArray(arr, itemType, state);
 
         return stream.lastFinished();
     }
 
     /** {@inheritDoc} */
-    @Override public <T> boolean writeCollection(String name, Collection<T> col, Class<T> itemCls) {
-        stream.writeCollection(col, itemCls, state);
+    @Override public <T> boolean writeCollection(String name, Collection<T> col, MessageAdapter.Type itemType) {
+        stream.writeCollection(col, itemType, state);
 
         return stream.lastFinished();
     }
 
     /** {@inheritDoc} */
-    @Override public <K, V> boolean writeMap(String name, Map<K, V> map, Class<K> keyCls, Class<V> valCls) {
-        stream.writeMap(map, keyCls, valCls, state);
+    @Override public <K, V> boolean writeMap(String name, Map<K, V> map, MessageAdapter.Type keyType,
+        MessageAdapter.Type valType) {
+        stream.writeMap(map, keyType, valType, state);
 
         return stream.lastFinished();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoUserMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoUserMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoUserMessage.java
index f1d1430..4200c10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoUserMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoUserMessage.java
@@ -264,7 +264,7 @@ public class GridIoUserMessage extends MessageAdapter {
                 state.increment();
 
             case 4:
-                if (!writer.writeMap("ldrParties", ldrParties, UUID.class, IgniteUuid.class))
+                if (!writer.writeMap("ldrParties", ldrParties, Type.UUID, Type.IGNITE_UUID))
                     return false;
 
                 state.increment();
@@ -329,7 +329,7 @@ public class GridIoUserMessage extends MessageAdapter {
                 readState++;
 
             case 4:
-                ldrParties = reader.readMap("ldrParties", UUID.class, IgniteUuid.class, false);
+                ldrParties = reader.readMap("ldrParties", Type.UUID, Type.IGNITE_UUID, false);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java
index ccb2792..10ae53c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java
@@ -188,7 +188,7 @@ public class GridDeploymentInfoBean extends MessageAdapter implements GridDeploy
                 state.increment();
 
             case 3:
-                if (!writer.writeMap("participants", participants, UUID.class, IgniteUuid.class))
+                if (!writer.writeMap("participants", participants, Type.UUID, Type.IGNITE_UUID))
                     return false;
 
                 state.increment();
@@ -239,7 +239,7 @@ public class GridDeploymentInfoBean extends MessageAdapter implements GridDeploy
                 readState++;
 
             case 3:
-                participants = reader.readMap("participants", UUID.class, IgniteUuid.class, false);
+                participants = reader.readMap("participants", Type.UUID, Type.IGNITE_UUID, false);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentRequest.java
index e84caa9..2b1544b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentRequest.java
@@ -201,7 +201,7 @@ public class GridDeploymentRequest extends MessageAdapter {
                 state.increment();
 
             case 2:
-                if (!writer.writeCollection("nodeIds", nodeIds, UUID.class))
+                if (!writer.writeCollection("nodeIds", nodeIds, Type.UUID))
                     return false;
 
                 state.increment();
@@ -246,7 +246,7 @@ public class GridDeploymentRequest extends MessageAdapter {
                 readState++;
 
             case 2:
-                nodeIds = reader.readCollection("nodeIds", UUID.class);
+                nodeIds = reader.readCollection("nodeIds", Type.UUID);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageMessage.java
index e7a1189..342018f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageMessage.java
@@ -336,7 +336,7 @@ public class GridEventStorageMessage extends MessageAdapter {
                 state.increment();
 
             case 6:
-                if (!writer.writeMap("ldrParties", ldrParties, UUID.class, IgniteUuid.class))
+                if (!writer.writeMap("ldrParties", ldrParties, Type.UUID, Type.IGNITE_UUID))
                     return false;
 
                 state.increment();
@@ -417,7 +417,7 @@ public class GridEventStorageMessage extends MessageAdapter {
                 readState++;
 
             case 6:
-                ldrParties = reader.readMap("ldrParties", UUID.class, IgniteUuid.class, false);
+                ldrParties = reader.readMap("ldrParties", Type.UUID, Type.IGNITE_UUID, false);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 c3d8359..44a5d81 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
@@ -177,7 +177,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
                 state.increment();
 
             case 5:
-                if (!writer.writeCollection("rejectedKeyBytes", rejectedKeyBytes, byte[].class))
+                if (!writer.writeCollection("rejectedKeyBytes", rejectedKeyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -213,7 +213,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 5:
-                rejectedKeyBytes = reader.readCollection("rejectedKeyBytes", byte[].class);
+                rejectedKeyBytes = reader.readCollection("rejectedKeyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 fceca4a..078f014 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
@@ -210,19 +210,19 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
 
         switch (state.index()) {
             case 3:
-                if (!writer.writeCollection("keysBytes", keysBytes, byte[].class))
+                if (!writer.writeCollection("keysBytes", keysBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 4:
-                if (!writer.writeCollection("nearKeysBytes", nearKeysBytes, byte[].class))
+                if (!writer.writeCollection("nearKeysBytes", nearKeysBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 5:
-                if (!writer.writeCollection("nearVers", nearVers, GridCacheVersion.class))
+                if (!writer.writeCollection("nearVers", nearVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -240,7 +240,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 state.increment();
 
             case 8:
-                if (!writer.writeCollection("vers", vers, GridCacheVersion.class))
+                if (!writer.writeCollection("vers", vers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -259,7 +259,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
 
         switch (readState) {
             case 3:
-                keysBytes = reader.readCollection("keysBytes", byte[].class);
+                keysBytes = reader.readCollection("keysBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -267,7 +267,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 4:
-                nearKeysBytes = reader.readCollection("nearKeysBytes", byte[].class);
+                nearKeysBytes = reader.readCollection("nearKeysBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -275,7 +275,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 5:
-                nearVers = reader.readCollection("nearVers", GridCacheVersion.class);
+                nearVers = reader.readCollection("nearVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -299,7 +299,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
                 readState++;
 
             case 8:
-                vers = reader.readCollection("vers", GridCacheVersion.class);
+                vers = reader.readCollection("vers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 aa6c607..b33bc40 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
@@ -286,13 +286,13 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 state.increment();
 
             case 5:
-                if (!writer.writeCollection("committedVers", committedVers, GridCacheVersion.class))
+                if (!writer.writeCollection("committedVers", committedVers, Type.MSG))
                     return false;
 
                 state.increment();
 
             case 6:
-                if (!writer.writeCollection("rolledbackVers", rolledbackVers, GridCacheVersion.class))
+                if (!writer.writeCollection("rolledbackVers", rolledbackVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -334,7 +334,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 readState++;
 
             case 5:
-                committedVers = reader.readCollection("committedVers", GridCacheVersion.class);
+                committedVers = reader.readCollection("committedVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -342,7 +342,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 readState++;
 
             case 6:
-                rolledbackVers = reader.readCollection("rolledbackVers", GridCacheVersion.class);
+                rolledbackVers = reader.readCollection("rolledbackVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 d69299f..832c6fd 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
@@ -479,7 +479,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
 
         switch (state.index()) {
             case 8:
-                if (!writer.writeObjectArray("drVersByIdx", drVersByIdx, GridCacheVersion.class))
+                if (!writer.writeObjectArray("drVersByIdx", drVersByIdx, Type.MSG))
                     return false;
 
                 state.increment();
@@ -521,7 +521,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 state.increment();
 
             case 15:
-                if (!writer.writeCollection("keyBytes", keyBytes, byte[].class))
+                if (!writer.writeCollection("keyBytes", keyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -589,7 +589,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
 
         switch (readState) {
             case 8:
-                drVersByIdx = reader.readObjectArray("drVersByIdx", GridCacheVersion.class);
+                drVersByIdx = reader.readObjectArray("drVersByIdx", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -649,7 +649,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 readState++;
 
             case 15:
-                keyBytes = reader.readCollection("keyBytes", byte[].class);
+                keyBytes = reader.readCollection("keyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 8c5934c..60108c8 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
@@ -327,7 +327,7 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
                 state.increment();
 
             case 10:
-                if (!writer.writeCollection("valBytes", valBytes, GridCacheValueBytes.class))
+                if (!writer.writeCollection("valBytes", valBytes, Type.MSG))
                     return false;
 
                 state.increment();
@@ -363,7 +363,7 @@ public class GridDistributedLockResponse<K, V> extends GridDistributedBaseMessag
                 readState++;
 
             case 10:
-                valBytes = reader.readCollection("valBytes", GridCacheValueBytes.class);
+                valBytes = reader.readCollection("valBytes", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 ae613f0..46aa9d8 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
@@ -429,7 +429,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 state.increment();
 
             case 14:
-                if (!writer.writeCollection("recoveryWritesBytes", recoveryWritesBytes, byte[].class))
+                if (!writer.writeCollection("recoveryWritesBytes", recoveryWritesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -465,7 +465,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 state.increment();
 
             case 20:
-                if (!writer.writeCollection("writeEntriesBytes", writeEntriesBytes, byte[].class))
+                if (!writer.writeCollection("writeEntriesBytes", writeEntriesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -533,7 +533,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 14:
-                recoveryWritesBytes = reader.readCollection("recoveryWritesBytes", byte[].class);
+                recoveryWritesBytes = reader.readCollection("recoveryWritesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -581,7 +581,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 readState++;
 
             case 20:
-                writeEntriesBytes = reader.readCollection("writeEntriesBytes", byte[].class);
+                writeEntriesBytes = reader.readCollection("writeEntriesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 d90e3d1..4a9b972 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
@@ -496,7 +496,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 state.increment();
 
             case 15:
-                if (!writer.writeCollection("readsBytes", readsBytes, byte[].class))
+                if (!writer.writeCollection("readsBytes", readsBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -532,7 +532,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 state.increment();
 
             case 21:
-                if (!writer.writeCollection("writesBytes", writesBytes, byte[].class))
+                if (!writer.writeCollection("writesBytes", writesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -616,7 +616,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 15:
-                readsBytes = reader.readCollection("readsBytes", byte[].class);
+                readsBytes = reader.readCollection("readsBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -664,7 +664,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
                 readState++;
 
             case 21:
-                writesBytes = reader.readCollection("writesBytes", byte[].class);
+                writesBytes = reader.readCollection("writesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 d76066e..5dfbdc5 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
@@ -150,7 +150,7 @@ public class GridDistributedUnlockRequest<K, V> extends GridDistributedBaseMessa
 
         switch (state.index()) {
             case 8:
-                if (!writer.writeCollection("keyBytes", keyBytes, byte[].class))
+                if (!writer.writeCollection("keyBytes", keyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -170,7 +170,7 @@ public class GridDistributedUnlockRequest<K, V> extends GridDistributedBaseMessa
 
         switch (readState) {
             case 8:
-                keyBytes = reader.readCollection("keyBytes", byte[].class);
+                keyBytes = reader.readCollection("keyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
index 3f946d2..3fc595c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -402,7 +402,7 @@ public class GridDhtLockRequest<K, V> extends GridDistributedLockRequest<K, V> {
                 state.increment();
 
             case 27:
-                if (!writer.writeCollection("nearKeyBytes", nearKeyBytes, byte[].class))
+                if (!writer.writeCollection("nearKeyBytes", nearKeyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -476,7 +476,7 @@ public class GridDhtLockRequest<K, V> extends GridDistributedLockRequest<K, V> {
                 readState++;
 
             case 27:
-                nearKeyBytes = reader.readCollection("nearKeyBytes", byte[].class);
+                nearKeyBytes = reader.readCollection("nearKeyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
index 9456e11..e4c9f89 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -237,7 +237,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
 
         switch (state.index()) {
             case 11:
-                if (!writer.writeCollection("invalidParts", invalidParts, int.class))
+                if (!writer.writeCollection("invalidParts", invalidParts, Type.INT))
                     return false;
 
                 state.increment();
@@ -249,13 +249,13 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
                 state.increment();
 
             case 13:
-                if (!writer.writeCollection("nearEvictedBytes", nearEvictedBytes, byte[].class))
+                if (!writer.writeCollection("nearEvictedBytes", nearEvictedBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 14:
-                if (!writer.writeCollection("preloadEntriesBytes", preloadEntriesBytes, byte[].class))
+                if (!writer.writeCollection("preloadEntriesBytes", preloadEntriesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -275,7 +275,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
 
         switch (readState) {
             case 11:
-                invalidParts = reader.readCollection("invalidParts", int.class);
+                invalidParts = reader.readCollection("invalidParts", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -291,7 +291,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
                 readState++;
 
             case 13:
-                nearEvictedBytes = reader.readCollection("nearEvictedBytes", byte[].class);
+                nearEvictedBytes = reader.readCollection("nearEvictedBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -299,7 +299,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
                 readState++;
 
             case 14:
-                preloadEntriesBytes = reader.readCollection("preloadEntriesBytes", byte[].class);
+                preloadEntriesBytes = reader.readCollection("preloadEntriesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index d2fbf1a..7e4602d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -418,7 +418,7 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
                 state.increment();
 
             case 25:
-                if (!writer.writeCollection("nearWritesBytes", nearWritesBytes, byte[].class))
+                if (!writer.writeCollection("nearWritesBytes", nearWritesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -430,7 +430,7 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
                 state.increment();
 
             case 27:
-                if (!writer.writeCollection("pendingVers", pendingVers, GridCacheVersion.class))
+                if (!writer.writeCollection("pendingVers", pendingVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -522,7 +522,7 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
                 readState++;
 
             case 25:
-                nearWritesBytes = reader.readCollection("nearWritesBytes", byte[].class);
+                nearWritesBytes = reader.readCollection("nearWritesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -538,7 +538,7 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
                 readState++;
 
             case 27:
-                pendingVers = reader.readCollection("pendingVers", GridCacheVersion.class);
+                pendingVers = reader.readCollection("pendingVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 747a959..97a911d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -388,7 +388,7 @@ public class GridDhtTxPrepareRequest<K, V> extends GridDistributedTxPrepareReque
                 state.increment();
 
             case 27:
-                if (!writer.writeCollection("nearWritesBytes", nearWritesBytes, byte[].class))
+                if (!writer.writeCollection("nearWritesBytes", nearWritesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -484,7 +484,7 @@ public class GridDhtTxPrepareRequest<K, V> extends GridDistributedTxPrepareReque
                 readState++;
 
             case 27:
-                nearWritesBytes = reader.readCollection("nearWritesBytes", byte[].class);
+                nearWritesBytes = reader.readCollection("nearWritesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
index 9398240..b015fb6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
@@ -250,7 +250,7 @@ public class GridDhtTxPrepareResponse<K, V> extends GridDistributedTxPrepareResp
                 state.increment();
 
             case 11:
-                if (!writer.writeCollection("invalidParts", invalidParts, int.class))
+                if (!writer.writeCollection("invalidParts", invalidParts, Type.INT))
                     return false;
 
                 state.increment();
@@ -262,13 +262,13 @@ public class GridDhtTxPrepareResponse<K, V> extends GridDistributedTxPrepareResp
                 state.increment();
 
             case 13:
-                if (!writer.writeCollection("nearEvictedBytes", nearEvictedBytes, byte[].class))
+                if (!writer.writeCollection("nearEvictedBytes", nearEvictedBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 14:
-                if (!writer.writeCollection("preloadEntriesBytes", preloadEntriesBytes, byte[].class))
+                if (!writer.writeCollection("preloadEntriesBytes", preloadEntriesBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -296,7 +296,7 @@ public class GridDhtTxPrepareResponse<K, V> extends GridDistributedTxPrepareResp
                 readState++;
 
             case 11:
-                invalidParts = reader.readCollection("invalidParts", int.class);
+                invalidParts = reader.readCollection("invalidParts", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -312,7 +312,7 @@ public class GridDhtTxPrepareResponse<K, V> extends GridDistributedTxPrepareResp
                 readState++;
 
             case 13:
-                nearEvictedBytes = reader.readCollection("nearEvictedBytes", byte[].class);
+                nearEvictedBytes = reader.readCollection("nearEvictedBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -320,7 +320,7 @@ public class GridDhtTxPrepareResponse<K, V> extends GridDistributedTxPrepareResp
                 readState++;
 
             case 14:
-                preloadEntriesBytes = reader.readCollection("preloadEntriesBytes", byte[].class);
+                preloadEntriesBytes = reader.readCollection("preloadEntriesBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
index 2b2e70b..2e6762f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
@@ -138,7 +138,7 @@ public class GridDhtUnlockRequest<K, V> extends GridDistributedUnlockRequest<K,
 
         switch (state.index()) {
             case 9:
-                if (!writer.writeCollection("nearKeyBytes", nearKeyBytes, byte[].class))
+                if (!writer.writeCollection("nearKeyBytes", nearKeyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -158,7 +158,7 @@ public class GridDhtUnlockRequest<K, V> extends GridDistributedUnlockRequest<K,
 
         switch (readState) {
             case 9:
-                nearKeyBytes = reader.readCollection("nearKeyBytes", byte[].class);
+                nearKeyBytes = reader.readCollection("nearKeyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
index a9a2181..a0896f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
@@ -106,7 +106,7 @@ public class GridDhtAtomicDeferredUpdateResponse<K, V> extends GridCacheMessage<
 
         switch (state.index()) {
             case 3:
-                if (!writer.writeCollection("futVers", futVers, GridCacheVersion.class))
+                if (!writer.writeCollection("futVers", futVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -126,7 +126,7 @@ public class GridDhtAtomicDeferredUpdateResponse<K, V> extends GridCacheMessage<
 
         switch (readState) {
             case 3:
-                futVers = reader.readCollection("futVers", GridCacheVersion.class);
+                futVers = reader.readCollection("futVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
index 9267123..df1ed45 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
@@ -746,13 +746,13 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 state.increment();
 
             case 4:
-                if (!writer.writeCollection("drVers", drVers, GridCacheVersion.class))
+                if (!writer.writeCollection("drVers", drVers, Type.MSG))
                     return false;
 
                 state.increment();
 
             case 5:
-                if (!writer.writeCollection("entryProcessorsBytes", entryProcessorsBytes, byte[].class))
+                if (!writer.writeCollection("entryProcessorsBytes", entryProcessorsBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -770,19 +770,19 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 state.increment();
 
             case 8:
-                if (!writer.writeObjectArray("invokeArgsBytes", invokeArgsBytes, byte[].class))
+                if (!writer.writeObjectArray("invokeArgsBytes", invokeArgsBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 9:
-                if (!writer.writeCollection("keyBytes", keyBytes, byte[].class))
+                if (!writer.writeCollection("keyBytes", keyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 10:
-                if (!writer.writeCollection("nearEntryProcessorsBytes", nearEntryProcessorsBytes, byte[].class))
+                if (!writer.writeCollection("nearEntryProcessorsBytes", nearEntryProcessorsBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -794,7 +794,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 state.increment();
 
             case 12:
-                if (!writer.writeCollection("nearKeyBytes", nearKeyBytes, byte[].class))
+                if (!writer.writeCollection("nearKeyBytes", nearKeyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -806,7 +806,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 state.increment();
 
             case 14:
-                if (!writer.writeCollection("nearValBytes", nearValBytes, GridCacheValueBytes.class))
+                if (!writer.writeCollection("nearValBytes", nearValBytes, Type.MSG))
                     return false;
 
                 state.increment();
@@ -848,7 +848,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 state.increment();
 
             case 21:
-                if (!writer.writeCollection("valBytes", valBytes, GridCacheValueBytes.class))
+                if (!writer.writeCollection("valBytes", valBytes, Type.MSG))
                     return false;
 
                 state.increment();
@@ -882,7 +882,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 4:
-                drVers = reader.readCollection("drVers", GridCacheVersion.class);
+                drVers = reader.readCollection("drVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -890,7 +890,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 5:
-                entryProcessorsBytes = reader.readCollection("entryProcessorsBytes", byte[].class);
+                entryProcessorsBytes = reader.readCollection("entryProcessorsBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -914,7 +914,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 8:
-                invokeArgsBytes = reader.readObjectArray("invokeArgsBytes", byte[].class);
+                invokeArgsBytes = reader.readObjectArray("invokeArgsBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -922,7 +922,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 9:
-                keyBytes = reader.readCollection("keyBytes", byte[].class);
+                keyBytes = reader.readCollection("keyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -930,7 +930,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 10:
-                nearEntryProcessorsBytes = reader.readCollection("nearEntryProcessorsBytes", byte[].class);
+                nearEntryProcessorsBytes = reader.readCollection("nearEntryProcessorsBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -946,7 +946,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 12:
-                nearKeyBytes = reader.readCollection("nearKeyBytes", byte[].class);
+                nearKeyBytes = reader.readCollection("nearKeyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -962,7 +962,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 14:
-                nearValBytes = reader.readCollection("nearValBytes", GridCacheValueBytes.class);
+                nearValBytes = reader.readCollection("nearValBytes", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -1022,7 +1022,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
                 readState++;
 
             case 21:
-                valBytes = reader.readCollection("valBytes", GridCacheValueBytes.class);
+                valBytes = reader.readCollection("valBytes", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
index 140f941..1dbbaff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
@@ -235,7 +235,7 @@ public class GridDhtAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> im
                 state.increment();
 
             case 6:
-                if (!writer.writeCollection("nearEvictedBytes", nearEvictedBytes, byte[].class))
+                if (!writer.writeCollection("nearEvictedBytes", nearEvictedBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -279,7 +279,7 @@ public class GridDhtAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> im
                 readState++;
 
             case 6:
-                nearEvictedBytes = reader.readCollection("nearEvictedBytes", byte[].class);
+                nearEvictedBytes = reader.readCollection("nearEvictedBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
index 1ca6afe..6600b76 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -612,7 +612,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 state.increment();
 
             case 5:
-                if (!writer.writeCollection("drVers", drVers, GridCacheVersion.class))
+                if (!writer.writeCollection("drVers", drVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -630,7 +630,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 state.increment();
 
             case 8:
-                if (!writer.writeObjectArray("filterBytes", filterBytes, byte[].class))
+                if (!writer.writeObjectArray("filterBytes", filterBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -654,13 +654,13 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 state.increment();
 
             case 12:
-                if (!writer.writeObjectArray("invokeArgsBytes", invokeArgsBytes, byte[].class))
+                if (!writer.writeObjectArray("invokeArgsBytes", invokeArgsBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
 
             case 13:
-                if (!writer.writeCollection("keyBytes", keyBytes, byte[].class))
+                if (!writer.writeCollection("keyBytes", keyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -708,7 +708,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 state.increment();
 
             case 21:
-                if (!writer.writeCollection("valBytes", valBytes, GridCacheValueBytes.class))
+                if (!writer.writeCollection("valBytes", valBytes, Type.MSG))
                     return false;
 
                 state.increment();
@@ -744,7 +744,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 readState++;
 
             case 5:
-                drVers = reader.readCollection("drVers", GridCacheVersion.class);
+                drVers = reader.readCollection("drVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -768,7 +768,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 readState++;
 
             case 8:
-                filterBytes = reader.readObjectArray("filterBytes", byte[].class);
+                filterBytes = reader.readObjectArray("filterBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -800,7 +800,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 readState++;
 
             case 12:
-                invokeArgsBytes = reader.readObjectArray("invokeArgsBytes", byte[].class);
+                invokeArgsBytes = reader.readObjectArray("invokeArgsBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -808,7 +808,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 readState++;
 
             case 13:
-                keyBytes = reader.readCollection("keyBytes", byte[].class);
+                keyBytes = reader.readCollection("keyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;
@@ -880,7 +880,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
                 readState++;
 
             case 21:
-                valBytes = reader.readCollection("valBytes", GridCacheValueBytes.class);
+                valBytes = reader.readCollection("valBytes", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
index 9cfe6dc..f339465 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
@@ -491,7 +491,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> i
                 state.increment();
 
             case 7:
-                if (!writer.writeCollection("nearSkipIdxs", nearSkipIdxs, int.class))
+                if (!writer.writeCollection("nearSkipIdxs", nearSkipIdxs, Type.INT))
                     return false;
 
                 state.increment();
@@ -503,13 +503,13 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> i
                 state.increment();
 
             case 9:
-                if (!writer.writeCollection("nearValBytes", nearValBytes, GridCacheValueBytes.class))
+                if (!writer.writeCollection("nearValBytes", nearValBytes, Type.MSG))
                     return false;
 
                 state.increment();
 
             case 10:
-                if (!writer.writeCollection("nearValsIdxs", nearValsIdxs, int.class))
+                if (!writer.writeCollection("nearValsIdxs", nearValsIdxs, Type.INT))
                     return false;
 
                 state.increment();
@@ -579,7 +579,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> i
                 readState++;
 
             case 7:
-                nearSkipIdxs = reader.readCollection("nearSkipIdxs", int.class);
+                nearSkipIdxs = reader.readCollection("nearSkipIdxs", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -595,7 +595,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> i
                 readState++;
 
             case 9:
-                nearValBytes = reader.readCollection("nearValBytes", GridCacheValueBytes.class);
+                nearValBytes = reader.readCollection("nearValBytes", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -603,7 +603,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> i
                 readState++;
 
             case 10:
-                nearValsIdxs = reader.readCollection("nearValsIdxs", int.class);
+                nearValsIdxs = reader.readCollection("nearValsIdxs", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysRequest.java
index 5ee0ae2..da3d9df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysRequest.java
@@ -205,7 +205,7 @@ public class GridDhtForceKeysRequest<K, V> extends GridCacheMessage<K, V> implem
                 state.increment();
 
             case 4:
-                if (!writer.writeCollection("keyBytes", keyBytes, byte[].class))
+                if (!writer.writeCollection("keyBytes", keyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -245,7 +245,7 @@ public class GridDhtForceKeysRequest<K, V> extends GridCacheMessage<K, V> implem
                 readState++;
 
             case 4:
-                keyBytes = reader.readCollection("keyBytes", byte[].class);
+                keyBytes = reader.readCollection("keyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 eb68770..70b62c3 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
@@ -221,7 +221,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
                 state.increment();
 
             case 6:
-                if (!writer.writeCollection("missedKeyBytes", missedKeyBytes, byte[].class))
+                if (!writer.writeCollection("missedKeyBytes", missedKeyBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -265,7 +265,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
                 readState++;
 
             case 6:
-                missedKeyBytes = reader.readCollection("missedKeyBytes", byte[].class);
+                missedKeyBytes = reader.readCollection("missedKeyBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 69f622f..f188d22 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
@@ -229,7 +229,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
 
         switch (state.index()) {
             case 3:
-                if (!writer.writeCollection("parts", parts, int.class))
+                if (!writer.writeCollection("parts", parts, Type.INT))
                     return false;
 
                 state.increment();
@@ -279,7 +279,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
 
         switch (readState) {
             case 3:
-                parts = reader.readCollection("parts", int.class);
+                parts = reader.readCollection("parts", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 58969b3..142150b 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
@@ -326,13 +326,13 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 state.increment();
 
             case 5:
-                if (!writer.writeCollection("last", last, int.class))
+                if (!writer.writeCollection("last", last, Type.INT))
                     return false;
 
                 state.increment();
 
             case 6:
-                if (!writer.writeCollection("missed", missed, int.class))
+                if (!writer.writeCollection("missed", missed, Type.INT))
                     return false;
 
                 state.increment();
@@ -380,7 +380,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 5:
-                last = reader.readCollection("last", int.class);
+                last = reader.readCollection("last", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -388,7 +388,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
                 readState++;
 
             case 6:
-                missed = reader.readCollection("missed", int.class);
+                missed = reader.readCollection("missed", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 6361d9e..5673242 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
@@ -295,7 +295,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 state.increment();
 
             case 5:
-                if (!writer.writeMap("keyBytes", keyBytes, byte[].class, boolean.class))
+                if (!writer.writeMap("keyBytes", keyBytes, Type.BYTE_ARR, Type.BOOLEAN))
                     return false;
 
                 state.increment();
@@ -379,7 +379,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 5:
-                keyBytes = reader.readMap("keyBytes", byte[].class, boolean.class, true);
+                keyBytes = reader.readMap("keyBytes", Type.BYTE_ARR, Type.BOOLEAN, true);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 095e455..29695f2 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
@@ -259,7 +259,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 state.increment();
 
             case 6:
-                if (!writer.writeCollection("invalidParts", invalidParts, int.class))
+                if (!writer.writeCollection("invalidParts", invalidParts, Type.INT))
                     return false;
 
                 state.increment();
@@ -321,7 +321,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
                 readState++;
 
             case 6:
-                invalidParts = reader.readCollection("invalidParts", int.class);
+                invalidParts = reader.readCollection("invalidParts", Type.INT);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 09e5c64..58054c1 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
@@ -382,13 +382,13 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 state.increment();
 
             case 25:
-                if (!writer.writeObjectArray("dhtVers", dhtVers, GridCacheVersion.class))
+                if (!writer.writeObjectArray("dhtVers", dhtVers, Type.MSG))
                     return false;
 
                 state.increment();
 
             case 26:
-                if (!writer.writeObjectArray("filterBytes", filterBytes, byte[].class))
+                if (!writer.writeObjectArray("filterBytes", filterBytes, Type.BYTE_ARR))
                     return false;
 
                 state.increment();
@@ -470,7 +470,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 25:
-                dhtVers = reader.readObjectArray("dhtVers", GridCacheVersion.class);
+                dhtVers = reader.readObjectArray("dhtVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -478,7 +478,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
                 readState++;
 
             case 26:
-                filterBytes = reader.readObjectArray("filterBytes", byte[].class);
+                filterBytes = reader.readObjectArray("filterBytes", Type.BYTE_ARR);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca27b586/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 7cc1c46..0587f06 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
@@ -218,7 +218,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
 
         switch (state.index()) {
             case 11:
-                if (!writer.writeObjectArray("dhtVers", dhtVers, GridCacheVersion.class))
+                if (!writer.writeObjectArray("dhtVers", dhtVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -230,7 +230,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 state.increment();
 
             case 13:
-                if (!writer.writeObjectArray("mappedVers", mappedVers, GridCacheVersion.class))
+                if (!writer.writeObjectArray("mappedVers", mappedVers, Type.MSG))
                     return false;
 
                 state.increment();
@@ -242,7 +242,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 state.increment();
 
             case 15:
-                if (!writer.writeCollection("pending", pending, GridCacheVersion.class))
+                if (!writer.writeCollection("pending", pending, Type.MSG))
                     return false;
 
                 state.increment();
@@ -262,7 +262,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
 
         switch (readState) {
             case 11:
-                dhtVers = reader.readObjectArray("dhtVers", GridCacheVersion.class);
+                dhtVers = reader.readObjectArray("dhtVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -278,7 +278,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 readState++;
 
             case 13:
-                mappedVers = reader.readObjectArray("mappedVers", GridCacheVersion.class);
+                mappedVers = reader.readObjectArray("mappedVers", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -294,7 +294,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
                 readState++;
 
             case 15:
-                pending = reader.readCollection("pending", GridCacheVersion.class);
+                pending = reader.readCollection("pending", Type.MSG);
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message