ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [08/16] incubator-ignite git commit: # gg-9791 - Communication fixes
Date Fri, 20 Feb 2015 06:20:22 GMT
# gg-9791 - Communication fixes


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

Branch: refs/heads/gg-9791
Commit: e2f2bc0abae6d9d570aa7eff5b084dd75e0443cb
Parents: 63245b0
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Wed Feb 18 21:30:38 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Wed Feb 18 21:30:38 2015 -0800

----------------------------------------------------------------------
 .../ignite/codegen/MessageCodeGenerator.java    |  2 +-
 .../ignite/internal/GridJobCancelRequest.java   |  2 +-
 .../ignite/internal/GridJobExecuteRequest.java  |  2 +-
 .../ignite/internal/GridJobExecuteResponse.java |  2 +-
 .../ignite/internal/GridJobSiblingsRequest.java |  2 +-
 .../internal/GridJobSiblingsResponse.java       |  5 +-
 .../ignite/internal/GridTaskCancelRequest.java  |  2 +-
 .../ignite/internal/GridTaskSessionRequest.java |  2 +-
 .../internal/direct/DirectMessageReader.java    |  8 +---
 .../internal/direct/DirectMessageWriter.java    |  4 +-
 .../checkpoint/GridCheckpointRequest.java       |  2 +-
 .../managers/communication/GridIoMessage.java   |  2 +-
 .../communication/GridIoMessageFactory.java     |  3 ++
 .../communication/GridIoUserMessage.java        |  2 +-
 .../deployment/GridDeploymentInfoBean.java      |  2 +-
 .../deployment/GridDeploymentRequest.java       |  2 +-
 .../deployment/GridDeploymentResponse.java      |  2 +-
 .../eventstorage/GridEventStorageMessage.java   |  2 +-
 .../cache/GridCacheEvictionRequest.java         |  2 +-
 .../cache/GridCacheEvictionResponse.java        |  2 +-
 .../processors/cache/GridCacheMessage.java      |  2 +-
 .../processors/cache/GridCacheValueBytes.java   |  2 +-
 ...idCacheOptimisticCheckPreparedTxRequest.java |  2 +-
 ...dCacheOptimisticCheckPreparedTxResponse.java |  2 +-
 .../distributed/GridCacheTtlUpdateRequest.java  |  2 +-
 .../distributed/GridDistributedBaseMessage.java |  2 +-
 .../distributed/GridDistributedLockRequest.java |  2 +-
 .../GridDistributedLockResponse.java            |  2 +-
 .../GridDistributedTxFinishRequest.java         |  2 +-
 .../GridDistributedTxFinishResponse.java        |  2 +-
 .../GridDistributedTxPrepareRequest.java        |  2 +-
 .../GridDistributedTxPrepareResponse.java       |  2 +-
 .../GridDistributedUnlockRequest.java           |  2 +-
 .../dht/GridDhtAffinityAssignmentRequest.java   |  2 +-
 .../dht/GridDhtAffinityAssignmentResponse.java  |  2 +-
 .../distributed/dht/GridDhtLockRequest.java     |  2 +-
 .../distributed/dht/GridDhtLockResponse.java    |  2 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |  2 +-
 .../dht/GridDhtTxFinishResponse.java            |  2 +-
 .../dht/GridDhtTxPrepareRequest.java            |  2 +-
 .../dht/GridDhtTxPrepareResponse.java           |  2 +-
 .../distributed/dht/GridDhtUnlockRequest.java   |  2 +-
 .../GridDhtAtomicDeferredUpdateResponse.java    |  2 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |  2 +-
 .../dht/atomic/GridDhtAtomicUpdateResponse.java |  2 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |  2 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |  2 +-
 .../dht/preloader/GridDhtForceKeysRequest.java  |  2 +-
 .../dht/preloader/GridDhtForceKeysResponse.java |  2 +-
 .../GridDhtPartitionDemandMessage.java          |  2 +-
 .../preloader/GridDhtPartitionExchangeId.java   |  2 +-
 .../GridDhtPartitionSupplyMessage.java          |  2 +-
 .../GridDhtPartitionsAbstractMessage.java       |  2 +-
 .../preloader/GridDhtPartitionsFullMessage.java |  2 +-
 .../GridDhtPartitionsSingleMessage.java         |  2 +-
 .../GridDhtPartitionsSingleRequest.java         |  2 +-
 .../distributed/near/GridNearGetRequest.java    |  2 +-
 .../distributed/near/GridNearGetResponse.java   |  2 +-
 .../distributed/near/GridNearLockRequest.java   |  2 +-
 .../distributed/near/GridNearLockResponse.java  |  2 +-
 .../near/GridNearTxFinishRequest.java           |  2 +-
 .../near/GridNearTxFinishResponse.java          |  2 +-
 .../near/GridNearTxPrepareRequest.java          |  2 +-
 .../near/GridNearTxPrepareResponse.java         |  2 +-
 .../distributed/near/GridNearUnlockRequest.java |  2 +-
 .../cache/query/GridCacheQueryRequest.java      |  2 +-
 .../cache/query/GridCacheQueryResponse.java     |  2 +-
 .../cache/version/GridCacheVersion.java         |  2 +-
 .../clock/GridClockDeltaSnapshotMessage.java    |  2 +-
 .../processors/clock/GridClockDeltaVersion.java |  2 +-
 .../continuous/GridContinuousMessage.java       |  2 +-
 .../dataload/GridDataLoadRequest.java           |  2 +-
 .../dataload/GridDataLoadResponse.java          |  2 +-
 .../processors/igfs/IgfsAckMessage.java         |  2 +-
 .../internal/processors/igfs/IgfsBlockKey.java  |  2 +-
 .../processors/igfs/IgfsBlocksMessage.java      |  2 +-
 .../igfs/IgfsCommunicationMessage.java          |  2 +-
 .../processors/igfs/IgfsDeleteMessage.java      |  2 +-
 .../processors/igfs/IgfsFileAffinityRange.java  |  2 +-
 .../igfs/IgfsFragmentizerRequest.java           |  2 +-
 .../igfs/IgfsFragmentizerResponse.java          |  2 +-
 .../processors/igfs/IgfsSyncMessage.java        |  2 +-
 .../handlers/task/GridTaskResultRequest.java    |  2 +-
 .../handlers/task/GridTaskResultResponse.java   |  2 +-
 .../streamer/GridStreamerCancelRequest.java     |  2 +-
 .../streamer/GridStreamerExecutionRequest.java  |  2 +-
 .../streamer/GridStreamerResponse.java          |  2 +-
 .../ignite/internal/util/GridByteArrayList.java |  2 +-
 .../ignite/internal/util/GridLongList.java      |  2 +-
 .../internal/util/nio/GridDirectParser.java     | 12 +----
 .../extensions/communication/MessageHeader.java | 49 --------------------
 .../extensions/communication/MessageReader.java |  7 +--
 .../extensions/communication/MessageWriter.java |  5 +-
 .../jobstealing/JobStealingRequest.java         |  2 +-
 94 files changed, 103 insertions(+), 162 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index c054ee6..07674ff 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@ -380,7 +380,7 @@ public class MessageCodeGenerator {
 
             indent++;
 
-            returnFalseIfFailed(code, "writer.writeHeader", "new MessageHeader(directType(), (byte)" + fieldCnt + ")");
+            returnFalseIfFailed(code, "writer.writeHeader", "directType()", "(byte)" + fieldCnt);
 
             code.add(EMPTY);
             code.add(builder().a("writer.onHeaderWritten();").toString());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/GridJobCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobCancelRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobCancelRequest.java
index 69d857d..6b864a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobCancelRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobCancelRequest.java
@@ -114,7 +114,7 @@ public class GridJobCancelRequest extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 78fc844..549cfad 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
@@ -416,7 +416,7 @@ public class GridJobExecuteRequest extends MessageAdapter implements GridTaskMes
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)21)))
+            if (!writer.writeHeader(directType(), (byte)21))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteResponse.java
index db7a642..773b30e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobExecuteResponse.java
@@ -209,7 +209,7 @@ public class GridJobExecuteResponse extends MessageAdapter implements GridTaskMe
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsRequest.java
index 9d86e4a..e019b12 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsRequest.java
@@ -88,7 +88,7 @@ public class GridJobSiblingsRequest extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)2)))
+            if (!writer.writeHeader(directType(), (byte)2))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
index 86e1c80..7b7469a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
@@ -81,7 +81,7 @@ public class GridJobSiblingsResponse extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)1)))
+            if (!writer.writeHeader(directType(), (byte)1))
                 return false;
 
             writer.onHeaderWritten();
@@ -103,6 +103,9 @@ public class GridJobSiblingsResponse extends MessageAdapter {
     @Override public boolean readFrom(ByteBuffer buf) {
         reader.setBuffer(buf);
 
+        if (!reader.beforeMessageRead())
+            return false;
+
         switch (readState) {
             case 0:
                 siblingsBytes = reader.readByteArray("siblingsBytes");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskCancelRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskCancelRequest.java
index 3045aed..cf5fdfc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskCancelRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskCancelRequest.java
@@ -65,7 +65,7 @@ public class GridTaskCancelRequest extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)1)))
+            if (!writer.writeHeader(directType(), (byte)1))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionRequest.java
index d04b841..5a59080 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionRequest.java
@@ -102,7 +102,7 @@ public class GridTaskSessionRequest extends MessageAdapter implements GridTaskMe
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 445a854..be8e38a 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
@@ -48,12 +48,8 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
-    @Override public MessageHeader readHeader() {
-        byte type = stream.readByte();
-
-        lastRead = stream.lastFinished();
-
-        return lastRead ? new MessageHeader(type, (byte)0) : null;
+    @Override public boolean beforeMessageRead() {
+        return true;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 1dac3d7..a2bac87 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
@@ -40,8 +40,8 @@ public class DirectMessageWriter implements MessageWriter {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean writeHeader(MessageHeader header) {
-        stream.writeByte(header.messageType());
+    @Override public boolean writeHeader(byte type, byte fieldCnt) {
+        stream.writeByte(type);
 
         return stream.lastFinished();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointRequest.java
index 1b9a4b0..76f97d1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointRequest.java
@@ -88,7 +88,7 @@ public class GridCheckpointRequest extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
index 1afdb88..1c7e598 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
@@ -183,7 +183,7 @@ public class GridIoMessage extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index ec74b7f..bf482fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -37,6 +37,7 @@ import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.processors.rest.handlers.task.*;
 import org.apache.ignite.internal.processors.streamer.*;
 import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.spi.collision.jobstealing.*;
@@ -64,6 +65,8 @@ public class GridIoMessageFactory implements MessageFactory {
 
     /** {@inheritDoc} */
     @Override public MessageAdapter create(byte type) {
+        U.debug("CREATE: " + type);
+
         MessageAdapter msg = null;
 
         switch (type) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 cbe2795..9da2d82 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
@@ -207,7 +207,7 @@ public class GridIoUserMessage extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 7226b1f..a565ecb 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
@@ -142,7 +142,7 @@ public class GridDeploymentInfoBean extends MessageAdapter implements GridDeploy
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)5)))
+            if (!writer.writeHeader(directType(), (byte)5))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 486dfe3..35fc630 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
@@ -160,7 +160,7 @@ public class GridDeploymentRequest extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)5)))
+            if (!writer.writeHeader(directType(), (byte)5))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
index 46676e2..b660cad 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
@@ -110,7 +110,7 @@ public class GridDeploymentResponse extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 a22e837..529f603 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
@@ -265,7 +265,7 @@ public class GridEventStorageMessage extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 7819804..8cd1fff 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)6)))
+            if (!writer.writeHeader(directType(), (byte)6))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 a0d7685..34e8414 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)6)))
+            if (!writer.writeHeader(directType(), (byte)6))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 145ca80..980a0f9 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 75455c9..33d3d31 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)2)))
+            if (!writer.writeHeader(directType(), (byte)2))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 cd37f8c..f85efc3 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)13)))
+            if (!writer.writeHeader(directType(), (byte)13))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 8959c0b..6bdfe17 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)11)))
+            if (!writer.writeHeader(directType(), (byte)11))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 59ee52d..91885d8 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 2f364c0..da8b049 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)8)))
+            if (!writer.writeHeader(directType(), (byte)8))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 9cce2cc..a64988b 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
@@ -353,7 +353,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)22)))
+            if (!writer.writeHeader(directType(), (byte)22))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 7bd7782..8245e63 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)11)))
+            if (!writer.writeHeader(directType(), (byte)11))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 3547dcb..4b4788d 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
@@ -253,7 +253,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)19)))
+            if (!writer.writeHeader(directType(), (byte)19))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 82b316e..1bac50c 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)5)))
+            if (!writer.writeHeader(directType(), (byte)5))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 30e42b1..0e63a2c 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
@@ -422,7 +422,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)23)))
+            if (!writer.writeHeader(directType(), (byte)23))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 3e4358d..798be80 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)10)))
+            if (!writer.writeHeader(directType(), (byte)10))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 674dae5..bb59f5a 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 afcdd67..10b357e 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)4)))
+            if (!writer.writeHeader(directType(), (byte)4))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 29992d8..68b87bd 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.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)5)))
+            if (!writer.writeHeader(directType(), (byte)5))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 2d6ac22..a93843f 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
@@ -344,7 +344,7 @@ public class GridDhtLockRequest<K, V> extends GridDistributedLockRequest<K, V> {
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)31)))
+            if (!writer.writeHeader(directType(), (byte)31))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 7f43d5d..43ab08a 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
@@ -206,7 +206,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)15)))
+            if (!writer.writeHeader(directType(), (byte)15))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 7ec88c1..f7376c0 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
@@ -231,7 +231,7 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)28)))
+            if (!writer.writeHeader(directType(), (byte)28))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
index 9e5d664..c0bc574 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
@@ -76,7 +76,7 @@ public class GridDhtTxFinishResponse<K, V> extends GridDistributedTxFinishRespon
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)6)))
+            if (!writer.writeHeader(directType(), (byte)6))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 54b4f32..c5bf7af 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
@@ -321,7 +321,7 @@ public class GridDhtTxPrepareRequest<K, V> extends GridDistributedTxPrepareReque
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)35)))
+            if (!writer.writeHeader(directType(), (byte)35))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 9154b64..8050afe 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
@@ -214,7 +214,7 @@ public class GridDhtTxPrepareResponse<K, V> extends GridDistributedTxPrepareResp
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)15)))
+            if (!writer.writeHeader(directType(), (byte)15))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 1958436..6d3312a 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
@@ -111,7 +111,7 @@ public class GridDhtUnlockRequest<K, V> extends GridDistributedUnlockRequest<K,
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)10)))
+            if (!writer.writeHeader(directType(), (byte)10))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 8bdceb2..44cd845 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
@@ -80,7 +80,7 @@ public class GridDhtAtomicDeferredUpdateResponse<K, V> extends GridCacheMessage<
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)4)))
+            if (!writer.writeHeader(directType(), (byte)4))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 74f5e29..3f51232 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
@@ -674,7 +674,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> imp
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)23)))
+            if (!writer.writeHeader(directType(), (byte)23))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 26397b2..1c1c6e1 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
@@ -185,7 +185,7 @@ public class GridDhtAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> im
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 c6636fe..e3167c9 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
@@ -538,7 +538,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K, V> im
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)22)))
+            if (!writer.writeHeader(directType(), (byte)22))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 d1e4afb..921de6a 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
@@ -425,7 +425,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K, V> i
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)14)))
+            if (!writer.writeHeader(directType(), (byte)14))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 90c794b..8095832 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
@@ -169,7 +169,7 @@ public class GridDhtForceKeysRequest<K, V> extends GridCacheMessage<K, V> implem
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 82f6389..ed2b740 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
@@ -172,7 +172,7 @@ public class GridDhtForceKeysResponse<K, V> extends GridCacheMessage<K, V> imple
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 6686ce2..c9e1f78 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
@@ -197,7 +197,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K, V>
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
index f3d50c9..ffdee7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
@@ -150,7 +150,7 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements Compar
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 d4b3f94..570567a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
@@ -280,7 +280,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K, V>
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
index 3555477..22bc27e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
@@ -82,7 +82,7 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends GridCacheMessage<K
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)5)))
+            if (!writer.writeHeader(directType(), (byte)5))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
index a63d680..c3c862a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
@@ -123,7 +123,7 @@ public class GridDhtPartitionsFullMessage<K, V> extends GridDhtPartitionsAbstrac
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)7)))
+            if (!writer.writeHeader(directType(), (byte)7))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
index 639272d..4fda700 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
@@ -102,7 +102,7 @@ public class GridDhtPartitionsSingleMessage<K, V> extends GridDhtPartitionsAbstr
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)6)))
+            if (!writer.writeHeader(directType(), (byte)6))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
index bbe669e..f7bbdff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleRequest.java
@@ -52,7 +52,7 @@ public class GridDhtPartitionsSingleRequest<K, V> extends GridDhtPartitionsAbstr
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)5)))
+            if (!writer.writeHeader(directType(), (byte)5))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 140800e..6cd98a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -246,7 +246,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)14)))
+            if (!writer.writeHeader(directType(), (byte)14))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 d927cf1..3c56357 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
@@ -207,7 +207,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K, V> implements
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)10)))
+            if (!writer.writeHeader(directType(), (byte)10))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 b331eda..bcb9155 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
@@ -329,7 +329,7 @@ public class GridNearLockRequest<K, V> extends GridDistributedLockRequest<K, V>
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)34)))
+            if (!writer.writeHeader(directType(), (byte)34))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/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 8677a86..f899521 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
@@ -188,7 +188,7 @@ public class GridNearLockResponse<K, V> extends GridDistributedLockResponse<K, V
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)16)))
+            if (!writer.writeHeader(directType(), (byte)16))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 5c75f43..521d26d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -160,7 +160,7 @@ public class GridNearTxFinishRequest<K, V> extends GridDistributedTxFinishReques
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)25)))
+            if (!writer.writeHeader(directType(), (byte)25))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
index 598d327..5baf552 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
@@ -121,7 +121,7 @@ public class GridNearTxFinishResponse<K, V> extends GridDistributedTxFinishRespo
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)8)))
+            if (!writer.writeHeader(directType(), (byte)8))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
index f4a3c06..05f6296 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
@@ -250,7 +250,7 @@ public class GridNearTxPrepareRequest<K, V> extends GridDistributedTxPrepareRequ
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)33)))
+            if (!writer.writeHeader(directType(), (byte)33))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index ee8de20..345a486 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@ -290,7 +290,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)18)))
+            if (!writer.writeHeader(directType(), (byte)18))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
index 956f41d..109c5b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
@@ -54,7 +54,7 @@ public class GridNearUnlockRequest<K, V> extends GridDistributedUnlockRequest<K,
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index ac8419d..41a2571 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -448,7 +448,7 @@ public class GridCacheQueryRequest<K, V> extends GridCacheMessage<K, V> implemen
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)22)))
+            if (!writer.writeHeader(directType(), (byte)22))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
index 07e0ced..dac1d25 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
@@ -209,7 +209,7 @@ public class GridCacheQueryResponse<K, V> extends GridCacheMessage<K, V> impleme
             return false;
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)9)))
+            if (!writer.writeHeader(directType(), (byte)9))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
index 5db5970..9614dcd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
@@ -257,7 +257,7 @@ public class GridCacheVersion extends MessageAdapter implements Comparable<GridC
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)4)))
+            if (!writer.writeHeader(directType(), (byte)4))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
index 5b3d022..8d88559 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
@@ -76,7 +76,7 @@ public class GridClockDeltaSnapshotMessage extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)2)))
+            if (!writer.writeHeader(directType(), (byte)2))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
index fb0ce71..e6096f4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
@@ -117,7 +117,7 @@ public class GridClockDeltaVersion extends MessageAdapter implements Comparable<
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)2)))
+            if (!writer.writeHeader(directType(), (byte)2))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
index 723f7ae..962d555 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
@@ -135,7 +135,7 @@ public class GridContinuousMessage extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)4)))
+            if (!writer.writeHeader(directType(), (byte)4))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadRequest.java
index 3ec2871..ba7a3d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadRequest.java
@@ -227,7 +227,7 @@ public class GridDataLoadRequest extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)13)))
+            if (!writer.writeHeader(directType(), (byte)13))
                 return false;
 
             writer.onHeaderWritten();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e2f2bc0a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadResponse.java
index 6091d2d..db418e3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadResponse.java
@@ -87,7 +87,7 @@ public class GridDataLoadResponse extends MessageAdapter {
         writer.setBuffer(buf);
 
         if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(new MessageHeader(directType(), (byte)3)))
+            if (!writer.writeHeader(directType(), (byte)3))
                 return false;
 
             writer.onHeaderWritten();


Mime
View raw message