ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [24/26] incubator-ignite git commit: gg-9791 - Communication fixes
Date Sat, 21 Feb 2015 01:46:37 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/cac7508c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cac7508c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cac7508c

Branch: refs/heads/sprint-2
Commit: cac7508c863521eb1d8dac7a294efc35d44d073c
Parents: ad02d6e
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Fri Feb 20 15:08:26 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Fri Feb 20 15:08:26 2015 -0800

----------------------------------------------------------------------
 .../ClientAbstractMultiNodeSelfTest.java        |  2 +-
 .../ignite/codegen/MessageCodeGenerator.java    | 26 ++++-----
 .../ignite/internal/GridJobCancelRequest.java   |  2 +-
 .../ignite/internal/GridJobExecuteRequest.java  |  2 +-
 .../ignite/internal/GridJobExecuteResponse.java |  2 +-
 .../ignite/internal/GridJobSiblingsRequest.java |  2 +-
 .../internal/GridJobSiblingsResponse.java       |  2 +-
 .../ignite/internal/GridTaskCancelRequest.java  |  2 +-
 .../ignite/internal/GridTaskSessionRequest.java |  2 +-
 .../internal/direct/DirectByteBufferStream.java | 10 ++--
 .../internal/direct/DirectMessageReader.java    |  2 +-
 .../internal/direct/DirectMessageWriter.java    |  2 +-
 .../internal/managers/GridManagerAdapter.java   |  4 +-
 .../checkpoint/GridCheckpointRequest.java       |  2 +-
 .../managers/communication/GridIoManager.java   | 24 ++++----
 .../managers/communication/GridIoMessage.java   |  6 +-
 .../communication/GridIoMessageFactory.java     | 10 ++--
 .../communication/GridIoUserMessage.java        |  2 +-
 .../deployment/GridDeploymentCommunication.java |  4 +-
 .../deployment/GridDeploymentInfoBean.java      |  3 +-
 .../deployment/GridDeploymentRequest.java       |  2 +-
 .../deployment/GridDeploymentResponse.java      |  2 +-
 .../eventstorage/GridEventStorageMessage.java   |  2 +-
 .../processors/cache/GridCacheMessage.java      |  2 +-
 .../processors/cache/GridCacheValueBytes.java   |  2 +-
 .../preloader/GridDhtPartitionExchangeId.java   |  3 +-
 .../cache/version/GridCacheVersion.java         |  3 +-
 .../clock/GridClockDeltaSnapshotMessage.java    |  2 +-
 .../processors/clock/GridClockDeltaVersion.java |  2 +-
 .../continuous/GridContinuousMessage.java       |  2 +-
 .../dataload/GridDataLoadRequest.java           |  2 +-
 .../dataload/GridDataLoadResponse.java          |  2 +-
 .../internal/processors/igfs/IgfsBlockKey.java  |  2 +-
 .../igfs/IgfsCommunicationMessage.java          |  2 +-
 .../processors/igfs/IgfsFileAffinityRange.java  |  2 +-
 .../handlers/task/GridTaskResultRequest.java    |  2 +-
 .../handlers/task/GridTaskResultResponse.java   |  2 +-
 .../streamer/GridStreamerCancelRequest.java     |  2 +-
 .../streamer/GridStreamerExecutionRequest.java  |  2 +-
 .../streamer/GridStreamerResponse.java          |  2 +-
 .../processors/streamer/IgniteStreamerImpl.java |  4 +-
 .../ignite/internal/util/GridByteArrayList.java |  2 +-
 .../ignite/internal/util/GridLongList.java      |  2 +-
 .../ignite/internal/util/IgniteUtils.java       |  4 +-
 .../internal/util/ipc/IpcToNioAdapter.java      |  4 +-
 .../util/nio/GridCommunicationClient.java       |  2 +-
 .../internal/util/nio/GridDirectParser.java     |  2 +-
 .../internal/util/nio/GridNioMessageReader.java |  2 +-
 .../internal/util/nio/GridNioMessageWriter.java |  4 +-
 .../ignite/internal/util/nio/GridNioServer.java | 28 +++++-----
 .../util/nio/GridShmemCommunicationClient.java  |  2 +-
 .../util/nio/GridTcpCommunicationClient.java    |  2 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  2 +-
 .../extensions/communication/Message.java       | 58 ++++++++++++++++++++
 .../communication/MessageAdapter.java           | 58 --------------------
 .../communication/MessageFactory.java           |  4 +-
 .../extensions/communication/MessageReader.java |  2 +-
 .../extensions/communication/MessageWriter.java |  2 +-
 .../jobstealing/JobStealingRequest.java         |  2 +-
 .../communication/tcp/TcpCommunicationSpi.java  | 46 ++++++++--------
 .../GridJobMasterLeaveAwareSelfTest.java        |  4 +-
 .../GridCommunicationSendMessageSelfTest.java   |  6 +-
 .../communication/GridIoManagerSelfTest.java    | 11 ++--
 .../GridDeploymentMessageCountSelfTest.java     |  2 +-
 .../GridCacheAtomicMessageCountSelfTest.java    |  2 +-
 ...ridCacheReplicatedSynchronousCommitTest.java |  2 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |  5 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |  2 +-
 .../GridCacheAtomicTimeoutSelfTest.java         |  3 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |  2 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |  2 +-
 .../GridCacheDhtPreloadMessageCountTest.java    |  2 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |  2 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |  2 +-
 .../communication/GridIoManagerBenchmark0.java  |  6 +-
 .../communication/GridTestMessage.java          |  2 +-
 .../GridAbstractCommunicationSelfTest.java      | 22 ++++----
 .../spi/communication/GridTestMessage.java      |  2 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java     |  4 +-
 ...mmunicationSpiConcurrentConnectSelfTest.java | 16 +++---
 .../tcp/GridTcpCommunicationSpiLanTest.java     |  4 +-
 ...cpCommunicationSpiMultithreadedSelfTest.java | 22 ++++----
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java | 10 ++--
 ...GridTcpCommunicationSpiRecoverySelfTest.java | 10 ++--
 .../tcp/GridOrderedMessageCancelSelfTest.java   |  2 +-
 85 files changed, 263 insertions(+), 269 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
index be98957..99453f5 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
@@ -733,7 +733,7 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
     @SuppressWarnings("unchecked")
     private static class TestCommunicationSpi extends TcpCommunicationSpi {
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             checkSyncFlags((GridIoMessage)msg);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 d442762..81e4410 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
@@ -45,7 +45,7 @@ public class MessageCodeGenerator {
     private static final String DFLT_SRC_DIR = U.getIgniteHome() + "/modules/core/src/main/java";
 
     /** */
-    private static final Class<?> BASE_CLS = MessageAdapter.class;
+    private static final Class<?> BASE_CLS = Message.class;
 
     /** */
     private static final String EMPTY = "";
@@ -98,7 +98,7 @@ public class MessageCodeGenerator {
         MessageCollectionItemType type = TYPES.get(cls);
 
         if (type == null) {
-            assert MessageAdapter.class.isAssignableFrom(cls) : cls;
+            assert Message.class.isAssignableFrom(cls) : cls;
 
             type = MessageCollectionItemType.MSG;
         }
@@ -180,9 +180,9 @@ public class MessageCodeGenerator {
      * @throws Exception In case of error.
      */
     public void generateAll(boolean write) throws Exception {
-        Collection<Class<? extends MessageAdapter>> classes = classes();
+        Collection<Class<? extends Message>> classes = classes();
 
-        for (Class<? extends MessageAdapter> cls : classes) {
+        for (Class<? extends Message> cls : classes) {
             boolean isAbstract = Modifier.isAbstract(cls.getModifiers());
 
             System.out.println("Processing class: " + cls.getName() + (isAbstract ? " (abstract)" : ""));
@@ -203,7 +203,7 @@ public class MessageCodeGenerator {
      * @throws Exception In case of error.
      */
     @SuppressWarnings("ConstantConditions")
-    public void generateAndWrite(Class<? extends MessageAdapter> cls) throws Exception {
+    public void generateAndWrite(Class<? extends Message> cls) throws Exception {
         assert cls != null;
 
         generate(cls);
@@ -297,7 +297,7 @@ public class MessageCodeGenerator {
      * @param cls Class.
      * @throws Exception In case of error.
      */
-    private void generate(Class<? extends MessageAdapter> cls) throws Exception {
+    private void generate(Class<? extends Message> cls) throws Exception {
         assert cls != null;
 
         write.clear();
@@ -761,11 +761,11 @@ public class MessageCodeGenerator {
      * @return Classes.
      * @throws Exception In case of error.
      */
-    private Collection<Class<? extends MessageAdapter>> classes() throws Exception {
-        Collection<Class<? extends MessageAdapter>> col = new TreeSet<>(
-            new Comparator<Class<? extends MessageAdapter>>() {
-                @Override public int compare(Class<? extends MessageAdapter> c1,
-                    Class<? extends MessageAdapter> c2) {
+    private Collection<Class<? extends Message>> classes() throws Exception {
+        Collection<Class<? extends Message>> col = new TreeSet<>(
+            new Comparator<Class<? extends Message>>() {
+                @Override public int compare(Class<? extends Message> c1,
+                    Class<? extends Message> c2) {
                     return c1.getName().compareTo(c2.getName());
                 }
             });
@@ -794,7 +794,7 @@ public class MessageCodeGenerator {
      */
     @SuppressWarnings("unchecked")
     private void processFile(File file, ClassLoader ldr, int prefixLen,
-        Collection<Class<? extends MessageAdapter>> col) throws Exception {
+        Collection<Class<? extends Message>> col) throws Exception {
         assert file != null;
         assert ldr != null;
         assert prefixLen > 0;
@@ -819,7 +819,7 @@ public class MessageCodeGenerator {
 
                 if (cls.getDeclaringClass() == null && cls.getEnclosingClass() == null &&
                     !BASE_CLS.equals(cls) && BASE_CLS.isAssignableFrom(cls))
-                    col.add((Class<? extends MessageAdapter>)cls);
+                    col.add((Class<? extends Message>)cls);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 2dc704b..005fff0 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
@@ -28,7 +28,7 @@ import java.nio.*;
 /**
  * Job cancellation request.
  */
-public class GridJobCancelRequest extends MessageAdapter {
+public class GridJobCancelRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 ae1fe12..f5b8824 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
@@ -32,7 +32,7 @@ import java.util.*;
 /**
  * Job execution request.
  */
-public class GridJobExecuteRequest extends MessageAdapter implements GridTaskMessage {
+public class GridJobExecuteRequest implements Message, GridTaskMessage {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 6bc2749..45c916a 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
@@ -31,7 +31,7 @@ import java.util.*;
 /**
  * Job execution response.
  */
-public class GridJobExecuteResponse extends MessageAdapter implements GridTaskMessage {
+public class GridJobExecuteResponse implements Message, GridTaskMessage {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 220b741..36fc1dd 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
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * Job siblings request.
  */
-public class GridJobSiblingsRequest extends MessageAdapter {
+public class GridJobSiblingsRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 533c231..c558f74 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
@@ -31,7 +31,7 @@ import java.util.*;
 /**
  * Job siblings response.
  */
-public class GridJobSiblingsResponse extends MessageAdapter {
+public class GridJobSiblingsResponse implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 dc7b574..a2a0e6c 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
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * Request for cancelling tasks.
  */
-public class GridTaskCancelRequest extends MessageAdapter {
+public class GridTaskCancelRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 3de1a4c..55546be 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
@@ -28,7 +28,7 @@ import java.util.*;
 /**
  * Task session request.
  */
-public class GridTaskSessionRequest extends MessageAdapter implements GridTaskMessage {
+public class GridTaskSessionRequest implements Message, GridTaskMessage {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 336f184..3b9adb7 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
@@ -237,7 +237,7 @@ public class DirectByteBufferStream {
     private boolean msgTypeDone;
 
     /** */
-    private MessageAdapter msg;
+    private Message msg;
 
     /** */
     private Iterator<?> it;
@@ -537,7 +537,7 @@ public class DirectByteBufferStream {
     /**
      * @param msg Message.
      */
-    public void writeMessage(MessageAdapter msg, MessageWriter writer) {
+    public void writeMessage(Message msg, MessageWriter writer) {
         if (msg != null) {
             if (buf.hasRemaining()) {
                 try {
@@ -908,7 +908,7 @@ public class DirectByteBufferStream {
      * @return Message.
      */
     @SuppressWarnings("unchecked")
-    public <T extends MessageAdapter> T readMessage() {
+    public <T extends Message> T readMessage() {
         if (!msgTypeDone) {
             if (!buf.hasRemaining()) {
                 lastFinished = false;
@@ -929,7 +929,7 @@ public class DirectByteBufferStream {
         lastFinished = msg == null || msg.readFrom(buf, reader);
 
         if (lastFinished) {
-            MessageAdapter msg0 = msg;
+            Message msg0 = msg;
 
             msgTypeDone = false;
             msg = null;
@@ -1338,7 +1338,7 @@ public class DirectByteBufferStream {
                     if (val != null)
                         writer.beforeInnerMessageWrite();
 
-                    writeMessage((MessageAdapter)val, writer);
+                    writeMessage((Message)val, writer);
                 }
                 finally {
                     if (val != null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 691af4a..669ace1 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,7 +236,7 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public <T extends MessageAdapter> T readMessage(String name) {
+    @Nullable @Override public <T extends Message> T readMessage(String name) {
         T msg = stream.readMessage();
 
         lastRead = stream.lastFinished();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 5ed5659..fa749d0 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
@@ -187,7 +187,7 @@ public class DirectMessageWriter implements MessageWriter {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean writeMessage(String name, @Nullable MessageAdapter msg) {
+    @Override public boolean writeMessage(String name, @Nullable Message msg) {
         stream.writeMessage(msg, this);
 
         return stream.lastFinished();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 283cd36..30ea854 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -316,8 +316,8 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
                         A.notNull(topic, "topic");
 
                         try {
-                            if (msg instanceof MessageAdapter)
-                                ctx.io().send(node, topic, (MessageAdapter)msg, SYSTEM_POOL);
+                            if (msg instanceof Message)
+                                ctx.io().send(node, topic, (Message)msg, SYSTEM_POOL);
                             else
                                 ctx.io().sendUserMessage(asList(node), msg, topic, false, 0);
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 83ac15b..8f97bf1 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
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * This class defines checkpoint request.
  */
-public class GridCheckpointRequest extends MessageAdapter {
+public class GridCheckpointRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index f794fb7..968e93a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -889,7 +889,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         ClusterNode node,
         Object topic,
         int topicOrd,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc,
         boolean ordered,
         long timeout,
@@ -938,7 +938,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Type of processing.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(UUID nodeId, Object topic, MessageAdapter msg, GridIoPolicy plc)
+    public void send(UUID nodeId, Object topic, Message msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         ClusterNode node = ctx.discovery().node(nodeId);
 
@@ -956,7 +956,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     @SuppressWarnings("TypeMayBeWeakened")
-    public void send(UUID nodeId, GridTopic topic, MessageAdapter msg, GridIoPolicy plc)
+    public void send(UUID nodeId, GridTopic topic, Message msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         ClusterNode node = ctx.discovery().node(nodeId);
 
@@ -973,7 +973,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Type of processing.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(ClusterNode node, Object topic, MessageAdapter msg, GridIoPolicy plc)
+    public void send(ClusterNode node, Object topic, Message msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         send(node, topic, -1, msg, plc, false, 0, false);
     }
@@ -985,7 +985,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param plc Type of processing.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(ClusterNode node, GridTopic topic, MessageAdapter msg, GridIoPolicy plc)
+    public void send(ClusterNode node, GridTopic topic, Message msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         send(node, topic, topic.ordinal(), msg, plc, false, 0, false);
     }
@@ -1002,7 +1002,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void sendOrderedMessage(
         ClusterNode node,
         Object topic,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc,
         long timeout,
         boolean skipOnTimeout
@@ -1024,7 +1024,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void sendOrderedMessage(
         UUID nodeId,
         Object topic,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc,
         long timeout,
         boolean skipOnTimeout
@@ -1051,7 +1051,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void sendOrderedMessage(
         Collection<? extends ClusterNode> nodes,
         Object topic,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc,
         long timeout,
         boolean skipOnTimeout
@@ -1072,7 +1072,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void send(
         Collection<? extends ClusterNode> nodes,
         Object topic,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc
     ) throws IgniteCheckedException {
         send(nodes, topic, -1, msg, plc, false, 0, false);
@@ -1088,7 +1088,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void send(
         Collection<? extends ClusterNode> nodes,
         GridTopic topic,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc
     ) throws IgniteCheckedException {
         send(nodes, topic, topic.ordinal(), msg, plc, false, 0, false);
@@ -1148,7 +1148,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             depClsName = cls0.getName();
         }
 
-        MessageAdapter ioMsg = new GridIoUserMessage(
+        Message ioMsg = new GridIoUserMessage(
             msg,
             serMsg,
             depClsName,
@@ -1221,7 +1221,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Collection<? extends ClusterNode> nodes,
         Object topic,
         int topicOrd,
-        MessageAdapter msg,
+        Message msg,
         GridIoPolicy plc,
         boolean ordered,
         long timeout,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 3cdfb31..5c1122b 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
@@ -28,7 +28,7 @@ import java.nio.*;
 /**
  * Wrapper for all grid messages.
  */
-public class GridIoMessage extends MessageAdapter {
+public class GridIoMessage implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -56,7 +56,7 @@ public class GridIoMessage extends MessageAdapter {
     private boolean skipOnTimeout;
 
     /** Message. */
-    private MessageAdapter msg;
+    private Message msg;
 
     /**
      * No-op constructor to support {@link Externalizable} interface.
@@ -79,7 +79,7 @@ public class GridIoMessage extends MessageAdapter {
         GridIoPolicy plc,
         Object topic,
         int topicOrd,
-        MessageAdapter msg,
+        Message msg,
         boolean ordered,
         long timeout,
         boolean skipOnTimeout

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 65cd774..6109d74 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
@@ -50,7 +50,7 @@ import java.util.*;
  */
 public class GridIoMessageFactory implements MessageFactory {
     /** Custom messages registry. Used for test purposes. */
-    private static final Map<Byte, IgniteOutClosure<MessageAdapter>> CUSTOM = new ConcurrentHashMap8<>();
+    private static final Map<Byte, IgniteOutClosure<Message>> CUSTOM = new ConcurrentHashMap8<>();
 
     /** Extensions. */
     private final MessageFactory[] ext;
@@ -63,8 +63,8 @@ public class GridIoMessageFactory implements MessageFactory {
     }
 
     /** {@inheritDoc} */
-    @Override public MessageAdapter create(byte type) {
-        MessageAdapter msg = null;
+    @Override public Message create(byte type) {
+        Message msg = null;
 
         switch (type) {
             case TcpCommunicationSpi.NODE_ID_MSG_TYPE:
@@ -503,7 +503,7 @@ public class GridIoMessageFactory implements MessageFactory {
                 }
 
                 if (msg == null) {
-                    IgniteOutClosure<MessageAdapter> c = CUSTOM.get(type);
+                    IgniteOutClosure<Message> c = CUSTOM.get(type);
 
                     if (c != null)
                         msg = c.apply();
@@ -522,7 +522,7 @@ public class GridIoMessageFactory implements MessageFactory {
      * @param type Message type.
      * @param c Message producer.
      */
-    public static void registerCustom(byte type, IgniteOutClosure<MessageAdapter> c) {
+    public static void registerCustom(byte type, IgniteOutClosure<Message> c) {
         assert c != null;
 
         CUSTOM.put(type, c);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 9051d6c..05b9181 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
@@ -33,7 +33,7 @@ import java.util.*;
 /**
  * User message wrapper.
  */
-public class GridIoUserMessage extends MessageAdapter {
+public class GridIoUserMessage implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
index d9a7d9b..443b221 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
@@ -282,7 +282,7 @@ class GridDeploymentCommunication {
      * @param topic Response topic.
      * @param res Response.
      */
-    private void sendResponse(UUID nodeId, Object topic, MessageAdapter res) {
+    private void sendResponse(UUID nodeId, Object topic, Message res) {
         ClusterNode node = ctx.discovery().node(nodeId);
 
         if (node != null) {
@@ -314,7 +314,7 @@ class GridDeploymentCommunication {
     void sendUndeployRequest(String rsrcName, Collection<ClusterNode> rmtNodes) throws IgniteCheckedException {
         assert !rmtNodes.contains(ctx.discovery().localNode());
 
-        MessageAdapter req = new GridDeploymentRequest(null, null, rsrcName, true);
+        Message req = new GridDeploymentRequest(null, null, rsrcName, true);
 
         if (!rmtNodes.isEmpty()) {
             ctx.io().send(

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 189ba1e..a62d4da 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
@@ -31,8 +31,7 @@ import java.util.*;
 /**
  * Deployment info bean.
  */
-public class GridDeploymentInfoBean extends MessageAdapter implements GridDeploymentInfo,
-    Externalizable {
+public class GridDeploymentInfoBean implements Message, GridDeploymentInfo, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 199b7d7..a6d80bb 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
@@ -30,7 +30,7 @@ import java.util.*;
 /**
  * Deployment request.
  */
-public class GridDeploymentRequest extends MessageAdapter {
+public class GridDeploymentRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 2101405..175e85f 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
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * Grid deployment response containing requested resource bytes.
  */
-public class GridDeploymentResponse extends MessageAdapter {
+public class GridDeploymentResponse implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 4b7c24c..6f18aa6 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
@@ -32,7 +32,7 @@ import java.util.*;
 /**
  * Event storage message.
  */
-public class GridEventStorageMessage extends MessageAdapter {
+public class GridEventStorageMessage implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 091a8d9..6b8689c 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
@@ -36,7 +36,7 @@ import java.util.concurrent.atomic.*;
 /**
  * Parent of all cache messages.
  */
-public abstract class GridCacheMessage<K, V> extends MessageAdapter {
+public abstract class GridCacheMessage<K, V> implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 c866452..7812c5b 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
@@ -26,7 +26,7 @@ import java.nio.*;
 /**
  * Wrapped value bytes of cache entry.
  */
-public class GridCacheValueBytes extends MessageAdapter {
+public class GridCacheValueBytes implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 9f55cc4..1823c49 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
@@ -30,8 +30,7 @@ import static org.apache.ignite.events.EventType.*;
 /**
  * Exchange ID.
  */
-public class GridDhtPartitionExchangeId extends MessageAdapter implements Comparable<GridDhtPartitionExchangeId>,
-    Externalizable {
+public class GridDhtPartitionExchangeId implements Message, Comparable<GridDhtPartitionExchangeId>, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 368aa10..5e20ba7 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
@@ -30,8 +30,7 @@ import java.util.*;
 /**
  * Grid unique version.
  */
-public class GridCacheVersion extends MessageAdapter implements Comparable<GridCacheVersion>, Externalizable,
-    OptimizedMarshallable {
+public class GridCacheVersion implements Message, Comparable<GridCacheVersion>, Externalizable, OptimizedMarshallable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 5e619ef..dc015b7 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
@@ -29,7 +29,7 @@ import java.util.*;
 /**
  * Message containing time delta map for all nodes.
  */
-public class GridClockDeltaSnapshotMessage extends MessageAdapter {
+public class GridClockDeltaSnapshotMessage implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 0c037d7..545f626 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
@@ -26,7 +26,7 @@ import java.nio.*;
 /**
  * Version for time delta snapshot.
  */
-public class GridClockDeltaVersion extends MessageAdapter implements Comparable<GridClockDeltaVersion>, Externalizable {
+public class GridClockDeltaVersion implements Message, Comparable<GridClockDeltaVersion>, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 0994a06..a207372 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
@@ -33,7 +33,7 @@ import static org.apache.ignite.internal.processors.continuous.GridContinuousMes
 /**
  * Continuous processor message.
  */
-public class GridContinuousMessage extends MessageAdapter {
+public class GridContinuousMessage implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 d1938bd..b3828ed 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
@@ -31,7 +31,7 @@ import java.util.*;
 /**
  *
  */
-public class GridDataLoadRequest extends MessageAdapter {
+public class GridDataLoadRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/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 4c0b52f..835e3bd 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
@@ -25,7 +25,7 @@ import java.nio.*;
 /**
  *
  */
-public class GridDataLoadResponse extends MessageAdapter {
+public class GridDataLoadResponse implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java
index 37e5881..b86eb29 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java
@@ -31,7 +31,7 @@ import java.nio.*;
  * File's binary data block key.
  */
 @GridInternal
-public final class IgfsBlockKey extends MessageAdapter implements Externalizable, Comparable<IgfsBlockKey> {
+public final class IgfsBlockKey implements Message, Externalizable, Comparable<IgfsBlockKey> {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java
index 53626d0..309daf1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * Base class for all IGFS communication messages sent between nodes.
  */
-public abstract class IgfsCommunicationMessage extends MessageAdapter {
+public abstract class IgfsCommunicationMessage implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
index 2b558fa..439f647 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
@@ -30,7 +30,7 @@ import java.util.*;
 /**
  * Affinity range.
  */
-public class IgfsFileAffinityRange extends MessageAdapter implements Externalizable {
+public class IgfsFileAffinityRange implements Message, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java
index 1da84c0..3802222 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * Task result request.
  */
-public class GridTaskResultRequest extends MessageAdapter {
+public class GridTaskResultRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java
index 4545beb..66421a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java
@@ -26,7 +26,7 @@ import java.nio.*;
 /**
  * Task result response.
  */
-public class GridTaskResultResponse extends MessageAdapter {
+public class GridTaskResultResponse implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerCancelRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerCancelRequest.java
index 0c96ce5..c7669b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerCancelRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerCancelRequest.java
@@ -26,7 +26,7 @@ import java.nio.*;
 /**
  * Streamer cancel request.
  */
-public class GridStreamerCancelRequest extends MessageAdapter {
+public class GridStreamerCancelRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerExecutionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerExecutionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerExecutionRequest.java
index 2f983d5..fc86c3b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerExecutionRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerExecutionRequest.java
@@ -31,7 +31,7 @@ import java.util.*;
 /**
  *
  */
-public class GridStreamerExecutionRequest extends MessageAdapter {
+public class GridStreamerExecutionRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerResponse.java
index 6c47179..36f8822 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamerResponse.java
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  *
  */
-public class GridStreamerResponse extends MessageAdapter {
+public class GridStreamerResponse implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/IgniteStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/IgniteStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/IgniteStreamerImpl.java
index 4bfb8c5..10fd3d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/IgniteStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/IgniteStreamerImpl.java
@@ -1014,7 +1014,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
      * @return Execution request.
      * @throws IgniteCheckedException If failed.
      */
-    private MessageAdapter createExecutionRequest(GridStreamerExecutionBatch batch)
+    private Message createExecutionRequest(GridStreamerExecutionBatch batch)
         throws IgniteCheckedException {
         boolean depEnabled = ctx.deploy().enabled();
 
@@ -1088,7 +1088,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
      * @param msg Message to send.
      * @throws IgniteCheckedException If failed.
      */
-    private void sendWithRetries(UUID dstNodeId, MessageAdapter msg) throws IgniteCheckedException {
+    private void sendWithRetries(UUID dstNodeId, Message msg) throws IgniteCheckedException {
         for (int i = 0; i < SEND_RETRY_COUNT; i++) {
             try {
                 ctx.io().send(dstNodeId, topic, msg, GridIoPolicy.SYSTEM_POOL);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
index 833bb7f..de5dd47 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
@@ -29,7 +29,7 @@ import java.util.*;
 /**
  * Re-sizable array implementation of the byte list (eliminating auto-boxing of primitive byte type).
  */
-public class GridByteArrayList extends MessageAdapter implements Externalizable {
+public class GridByteArrayList implements Message, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
index 64bb7ed..f056f37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
@@ -30,7 +30,7 @@ import java.util.*;
  * Minimal list API to work with primitive longs. This list exists
  * to avoid boxing/unboxing when using standard list from Java.
  */
-public class GridLongList extends MessageAdapter implements Externalizable {
+public class GridLongList implements Message, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 8bf43d4..ea73ca6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -9132,12 +9132,12 @@ public abstract class IgniteUtils {
      *
      * @param msg Message.
      * @param out Stream to write to.
-     * @param buf Byte buffer that will be passed to {@link MessageAdapter#writeTo(ByteBuffer, MessageWriter)} method.
+     * @param buf Byte buffer that will be passed to {@link Message#writeTo(ByteBuffer, MessageWriter)} method.
      * @param writer Message writer.
      * @return Number of written bytes.
      * @throws IOException In case of error.
      */
-    public static int writeMessageFully(MessageAdapter msg, OutputStream out, ByteBuffer buf,
+    public static int writeMessageFully(Message msg, OutputStream out, ByteBuffer buf,
         MessageWriter writer) throws IOException {
         assert msg != null;
         assert out != null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/IpcToNioAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/IpcToNioAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/IpcToNioAdapter.java
index 512411e..0a5d4fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/IpcToNioAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/IpcToNioAdapter.java
@@ -148,7 +148,7 @@ public class IpcToNioAdapter<T> {
      * @param msg Buffer to send.
      * @return Send result.
      */
-    private GridNioFuture<?> send(MessageAdapter msg) {
+    private GridNioFuture<?> send(Message msg) {
         assert writeBuf.hasArray();
 
         try {
@@ -193,7 +193,7 @@ public class IpcToNioAdapter<T> {
         @Override public GridNioFuture<?> onSessionWrite(GridNioSession ses, Object msg) {
             assert ses == IpcToNioAdapter.this.ses;
 
-            return send((MessageAdapter)msg);
+            return send((Message)msg);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridCommunicationClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridCommunicationClient.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridCommunicationClient.java
index 6084e09..31396fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridCommunicationClient.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridCommunicationClient.java
@@ -97,7 +97,7 @@ public interface GridCommunicationClient {
      * @throws IgniteCheckedException If failed.
      * @return {@code True} if should try to resend message.
      */
-    boolean sendMessage(@Nullable UUID nodeId, MessageAdapter msg) throws IgniteCheckedException;
+    boolean sendMessage(@Nullable UUID nodeId, Message msg) throws IgniteCheckedException;
 
     /**
      * @param timeout Timeout.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java
index 7b82d92..d632cac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java
@@ -55,7 +55,7 @@ public class GridDirectParser implements GridNioParser {
     /** {@inheritDoc} */
     @Nullable @Override public Object decode(GridNioSession ses, ByteBuffer buf)
         throws IOException, IgniteCheckedException {
-        MessageAdapter msg = ses.removeMeta(MSG_META_KEY);
+        Message msg = ses.removeMeta(MSG_META_KEY);
 
         MessageReader reader = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageReader.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageReader.java
index 9ae5bbd..0a503fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageReader.java
@@ -33,7 +33,7 @@ public interface GridNioMessageReader {
      * @param buf Buffer.
      * @return Whether message was fully read.
      */
-    public boolean read(@Nullable UUID nodeId, MessageAdapter msg, ByteBuffer buf);
+    public boolean read(@Nullable UUID nodeId, Message msg, ByteBuffer buf);
 
     /**
      * @return Optional message factory.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageWriter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageWriter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageWriter.java
index e517b3c..fa1ac36 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageWriter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioMessageWriter.java
@@ -34,7 +34,7 @@ public interface GridNioMessageWriter {
      * @param buf Buffer.
      * @return Whether message was fully written.
      */
-    public boolean write(@Nullable UUID nodeId, MessageAdapter msg, ByteBuffer buf);
+    public boolean write(@Nullable UUID nodeId, Message msg, ByteBuffer buf);
 
     /**
      * @param nodeId Node ID.
@@ -44,6 +44,6 @@ public interface GridNioMessageWriter {
      * @return Number of bytes written.
      * @throws IOException In case of error.
      */
-    public int writeFully(@Nullable UUID nodeId, MessageAdapter msg, OutputStream out,
+    public int writeFully(@Nullable UUID nodeId, Message msg, OutputStream out,
         ByteBuffer buf) throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index af9c9b1..c13eb77 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -143,7 +143,7 @@ public class GridNioServer<T> {
 
     /** */
     @GridToStringExclude
-    private IgnitePredicate<MessageAdapter> skipRecoveryPred;
+    private IgnitePredicate<Message> skipRecoveryPred;
 
     /** Static initializer ensures single-threaded execution of workaround. */
     static {
@@ -194,7 +194,7 @@ public class GridNioServer<T> {
         boolean daemon,
         GridNioMetricsListener metricsLsnr,
         MessageFormatter formatter,
-        IgnitePredicate<MessageAdapter> skipRecoveryPred,
+        IgnitePredicate<Message> skipRecoveryPred,
         GridNioFilter... filters
     ) throws IgniteCheckedException {
         A.notNull(addr, "addr");
@@ -261,7 +261,7 @@ public class GridNioServer<T> {
         this.metricsLsnr = metricsLsnr;
         this.formatter = formatter;
 
-        this.skipRecoveryPred = skipRecoveryPred != null ? skipRecoveryPred : F.<MessageAdapter>alwaysFalse();
+        this.skipRecoveryPred = skipRecoveryPred != null ? skipRecoveryPred : F.<Message>alwaysFalse();
     }
 
     /**
@@ -354,7 +354,7 @@ public class GridNioServer<T> {
      * @param msg Message.
      * @return Future for operation.
      */
-    GridNioFuture<?> send(GridNioSession ses, MessageAdapter msg) {
+    GridNioFuture<?> send(GridNioSession ses, Message msg) {
         assert ses instanceof GridSelectorNioSessionImpl;
 
         GridSelectorNioSessionImpl impl = (GridSelectorNioSessionImpl)ses;
@@ -394,7 +394,7 @@ public class GridNioServer<T> {
      * @param msg Message.
      * @return Future.
      */
-    public GridNioFuture<?> sendSystem(GridNioSession ses, MessageAdapter msg) {
+    public GridNioFuture<?> sendSystem(GridNioSession ses, Message msg) {
         return sendSystem(ses, msg, null);
     }
 
@@ -407,7 +407,7 @@ public class GridNioServer<T> {
      * @return Future.
      */
     public GridNioFuture<?> sendSystem(GridNioSession ses,
-        MessageAdapter msg,
+        Message msg,
         @Nullable IgniteInClosure<? super GridNioFuture<?>> lsnr) {
         assert ses instanceof GridSelectorNioSessionImpl;
 
@@ -890,7 +890,7 @@ public class GridNioServer<T> {
                         }
                     }
 
-                    MessageAdapter msg;
+                    Message msg;
                     boolean finished = false;
 
                     if (req != null) {
@@ -1038,7 +1038,7 @@ public class GridNioServer<T> {
                     }
                 }
 
-                MessageAdapter msg;
+                Message msg;
                 boolean finished = false;
 
                 if (req != null) {
@@ -1783,7 +1783,7 @@ public class GridNioServer<T> {
         private ByteBuffer msg;
 
         /** Direct message. */
-        private MessageAdapter commMsg;
+        private Message commMsg;
 
         /** */
         private boolean accepted;
@@ -1863,7 +1863,7 @@ public class GridNioServer<T> {
          * @param skipRecovery Skip recovery flag.
          */
         NioOperationFuture(GridSelectorNioSessionImpl ses, NioOperation op,
-            MessageAdapter commMsg, boolean skipRecovery) {
+            Message commMsg, boolean skipRecovery) {
             assert ses != null;
             assert op != null;
             assert op != NioOperation.REGISTER;
@@ -1892,7 +1892,7 @@ public class GridNioServer<T> {
         /**
          * @return Direct message.
          */
-        private MessageAdapter directMessage() {
+        private Message directMessage() {
             return commMsg;
         }
 
@@ -2001,7 +2001,7 @@ public class GridNioServer<T> {
                     return null;
                 }
                 else
-                    return send(ses, (MessageAdapter)msg);
+                    return send(ses, (Message)msg);
             }
             else
                 return send(ses, (ByteBuffer)msg);
@@ -2104,7 +2104,7 @@ public class GridNioServer<T> {
         private MessageFormatter formatter;
 
         /** Skip recovery predicate. */
-        private IgnitePredicate<MessageAdapter> skipRecoveryPred;
+        private IgnitePredicate<Message> skipRecoveryPred;
 
         /**
          * Finishes building the instance.
@@ -2338,7 +2338,7 @@ public class GridNioServer<T> {
          * @param skipRecoveryPred Skip recovery predicate.
          * @return This for chaining.
          */
-        public Builder<T> skipRecoveryPredicate(IgnitePredicate<MessageAdapter> skipRecoveryPred) {
+        public Builder<T> skipRecoveryPredicate(IgnitePredicate<Message> skipRecoveryPred) {
             this.skipRecoveryPred = skipRecoveryPred;
 
             return this;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridShmemCommunicationClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridShmemCommunicationClient.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridShmemCommunicationClient.java
index d017dbd..b0a6df3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridShmemCommunicationClient.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridShmemCommunicationClient.java
@@ -108,7 +108,7 @@ public class GridShmemCommunicationClient extends GridAbstractCommunicationClien
     }
 
     /** {@inheritDoc} */
-    @Override public synchronized boolean sendMessage(@Nullable UUID nodeId, MessageAdapter msg)
+    @Override public synchronized boolean sendMessage(@Nullable UUID nodeId, Message msg)
         throws IgniteCheckedException {
         if (closed())
             throw new IgniteCheckedException("Communication client was closed: " + this);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpCommunicationClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpCommunicationClient.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpCommunicationClient.java
index f8c1dd5..72c20f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpCommunicationClient.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpCommunicationClient.java
@@ -189,7 +189,7 @@ public class GridTcpCommunicationClient extends GridAbstractCommunicationClient
     }
 
     /** {@inheritDoc} */
-    @Override public boolean sendMessage(@Nullable UUID nodeId, MessageAdapter msg)
+    @Override public boolean sendMessage(@Nullable UUID nodeId, Message msg)
         throws IgniteCheckedException {
         if (closed())
             throw new IgniteCheckedException("Client was closed: " + this);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java
index 46d0646..d6006cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridTcpNioCommunicationClient.java
@@ -103,7 +103,7 @@ public class GridTcpNioCommunicationClient extends GridAbstractCommunicationClie
     }
 
     /** {@inheritDoc} */
-    @Override public boolean sendMessage(@Nullable UUID nodeId, MessageAdapter msg)
+    @Override public boolean sendMessage(@Nullable UUID nodeId, Message msg)
         throws IgniteCheckedException {
         // Node ID is never provided in asynchronous send mode.
         assert nodeId == null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java
new file mode 100644
index 0000000..7755858
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.plugin.extensions.communication;
+
+import java.io.*;
+import java.nio.*;
+
+/**
+ * Base class for all communication messages.
+ */
+public interface Message extends Serializable {
+    /**
+     * Writes this message to provided byte buffer.
+     *
+     * @param buf Byte buffer.
+     * @param writer Writer.
+     * @return Whether message was fully written.
+     */
+    public boolean writeTo(ByteBuffer buf, MessageWriter writer);
+
+    /**
+     * Reads this message from provided byte buffer.
+     *
+     * @param buf Byte buffer.
+     * @param reader Reader.
+     * @return Whether message was fully read.
+     */
+    public boolean readFrom(ByteBuffer buf, MessageReader reader);
+
+    /**
+     * Gets message type.
+     *
+     * @return Message type.
+     */
+    public byte directType();
+
+    /**
+     * Gets fields count.
+     *
+     * @return Fields count.
+     */
+    public byte fieldsCount();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
deleted file mode 100644
index d3d3f5e..0000000
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.plugin.extensions.communication;
-
-import java.io.*;
-import java.nio.*;
-
-/**
- * Base class for all communication messages.
- */
-public abstract class MessageAdapter implements Serializable {
-    /**
-     * Writes this message to provided byte buffer.
-     *
-     * @param buf Byte buffer.
-     * @param writer Writer.
-     * @return Whether message was fully written.
-     */
-    public abstract boolean writeTo(ByteBuffer buf, MessageWriter writer);
-
-    /**
-     * Reads this message from provided byte buffer.
-     *
-     * @param buf Byte buffer.
-     * @param reader Reader.
-     * @return Whether message was fully read.
-     */
-    public abstract boolean readFrom(ByteBuffer buf, MessageReader reader);
-
-    /**
-     * Gets message type.
-     *
-     * @return Message type.
-     */
-    public abstract byte directType();
-
-    /**
-     * Gets fields count.
-     *
-     * @return Fields count.
-     */
-    public abstract byte fieldsCount();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFactory.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFactory.java
index f1aceda..4e0ea8a 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFactory.java
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.*;
  * <p>
  * A plugin can provide his own message factory as an extension
  * if it uses any custom messages (all message must extend
- * {@link MessageAdapter} class).
+ * {@link Message} class).
  */
 public interface MessageFactory extends Extension {
     /**
@@ -37,5 +37,5 @@ public interface MessageFactory extends Extension {
      * @param type Message type.
      * @return Message instance.
      */
-    @Nullable public MessageAdapter create(byte type);
+    @Nullable public Message create(byte type);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
index 8eeb7b2..833e851 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
@@ -203,7 +203,7 @@ public interface MessageReader {
      * @param name Field name.
      * @return Message.
      */
-    public <T extends MessageAdapter> T readMessage(String name);
+    public <T extends Message> T readMessage(String name);
 
     /**
      * Reads array of objects.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageWriter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageWriter.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageWriter.java
index 3251102..19da9db 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageWriter.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageWriter.java
@@ -230,7 +230,7 @@ public interface MessageWriter {
      * @param val Message.
      * @return Whether value was fully written.
      */
-    public boolean writeMessage(String name, MessageAdapter val);
+    public boolean writeMessage(String name, Message val);
 
     /**
      * Writes array of objects.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java
index 487b58f..9d9c222 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java
@@ -26,7 +26,7 @@ import java.nio.*;
 /**
  * Job stealing request.
  */
-public class JobStealingRequest extends MessageAdapter {
+public class JobStealingRequest implements Message {
     /** */
     private static final long serialVersionUID = 0L;
 


Mime
View raw message