ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [35/40] incubator-ignite git commit: gg-9791 - Communication fixes
Date Sat, 21 Feb 2015 06:53:23 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index eda4f5a..ad9f688 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -144,7 +144,7 @@ import static org.apache.ignite.events.EventType.*;
 @IgniteSpiMultipleInstancesSupport(true)
 @IgniteSpiConsistencyChecked(optional = false)
 public class TcpCommunicationSpi extends IgniteSpiAdapter
-    implements CommunicationSpi<MessageAdapter>, TcpCommunicationSpiMBean {
+    implements CommunicationSpi<Message>, TcpCommunicationSpiMBean {
     /** IPC error message. */
     public static final String OUT_OF_RESOURCES_TCP_MSG = "Failed to allocate shared memory segment " +
         "(switching to TCP, may be slower)."; // todo IGNITE-70 Add link to documentation
@@ -238,8 +238,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     public static final byte HANDSHAKE_MSG_TYPE = -3;
 
     /** Server listener. */
-    private final GridNioServerListener<MessageAdapter> srvLsnr =
-        new GridNioServerListenerAdapter<MessageAdapter>() {
+    private final GridNioServerListener<Message> srvLsnr =
+        new GridNioServerListenerAdapter<Message>() {
             @Override public void onSessionWriteTimeout(GridNioSession ses) {
                 LT.warn(log, null, "Communication SPI Session write timed out (consider increasing " +
                     "'socketWriteTimeout' " + "configuration property) [remoteAddr=" + ses.remoteAddress() +
@@ -291,14 +291,14 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                         }
                     }
 
-                    CommunicationListener<MessageAdapter> lsnr0 = lsnr;
+                    CommunicationListener<Message> lsnr0 = lsnr;
 
                     if (lsnr0 != null)
                         lsnr0.onDisconnected(id);
                 }
             }
 
-            @Override public void onMessage(GridNioSession ses, MessageAdapter msg) {
+            @Override public void onMessage(GridNioSession ses, Message msg) {
                 UUID sndId = ses.meta(NODE_ID_META);
 
                 if (sndId == null) {
@@ -678,7 +678,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     private double bufSizeRatio = IgniteSystemProperties.getDouble(IGNITE_COMMUNICATION_BUF_RESIZE_RATIO, 0.8);
 
     /** NIO server. */
-    private GridNioServer<MessageAdapter> nioSrvr;
+    private GridNioServer<Message> nioSrvr;
 
     /** Shared memory server. */
     private IpcSharedMemoryServerEndpoint shmemSrv;
@@ -717,7 +717,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     private final ConcurrentMap<UUID, GridCommunicationClient> clients = GridConcurrentFactory.newMap();
 
     /** SPI listener. */
-    private volatile CommunicationListener<MessageAdapter> lsnr;
+    private volatile CommunicationListener<Message> lsnr;
 
     /** Bound port. */
     private int boundTcpPort = -1;
@@ -1226,7 +1226,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public void setListener(CommunicationListener<MessageAdapter> lsnr) {
+    @Override public void setListener(CommunicationListener<Message> lsnr) {
         this.lsnr = lsnr;
     }
 
@@ -1460,7 +1460,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * @return Server instance.
      * @throws IgniteCheckedException Thrown if it's not possible to create server.
      */
-    private GridNioServer<MessageAdapter> resetNioServer() throws IgniteCheckedException {
+    private GridNioServer<Message> resetNioServer() throws IgniteCheckedException {
         if (boundTcpPort >= 0)
             throw new IgniteCheckedException("Tcp NIO server was already created on port " + boundTcpPort);
 
@@ -1472,7 +1472,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                 MessageFactory messageFactory = new MessageFactory() {
                     private MessageFactory impl;
 
-                    @Nullable @Override public MessageAdapter create(byte type) {
+                    @Nullable @Override public Message create(byte type) {
                         if (impl == null)
                             impl = getSpiContext().messageFactory();
 
@@ -1506,14 +1506,14 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
 
                 GridDirectParser parser = new GridDirectParser(messageFactory, messageFormatter);
 
-                IgnitePredicate<MessageAdapter> skipRecoveryPred = new IgnitePredicate<MessageAdapter>() {
-                    @Override public boolean apply(MessageAdapter msg) {
+                IgnitePredicate<Message> skipRecoveryPred = new IgnitePredicate<Message>() {
+                    @Override public boolean apply(Message msg) {
                         return msg instanceof RecoveryLastReceivedMessage;
                     }
                 };
 
-                GridNioServer<MessageAdapter> srvr =
-                    GridNioServer.<MessageAdapter>builder()
+                GridNioServer<Message> srvr =
+                    GridNioServer.<Message>builder()
                         .address(locHost)
                         .port(port)
                         .listener(srvLsnr)
@@ -1711,7 +1711,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public void sendMessage(ClusterNode node, MessageAdapter msg) throws IgniteSpiException {
+    @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
         assert node != null;
         assert msg != null;
 
@@ -2294,8 +2294,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * @param msg Communication message.
      * @param msgC Closure to call when message processing finished.
      */
-    protected void notifyListener(UUID sndId, MessageAdapter msg, IgniteRunnable msgC) {
-        CommunicationListener<MessageAdapter> lsnr = this.lsnr;
+    protected void notifyListener(UUID sndId, Message msg, IgniteRunnable msgC) {
+        CommunicationListener<Message> lsnr = this.lsnr;
 
         if (lsnr != null)
             // Notify listener of a new message.
@@ -2462,7 +2462,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                 GridDirectParser parser = new GridDirectParser(getSpiContext().messageFactory(),
                     getSpiContext().messageFormatter());
 
-                IpcToNioAdapter<MessageAdapter> adapter = new IpcToNioAdapter<>(
+                IpcToNioAdapter<Message> adapter = new IpcToNioAdapter<>(
                     metricsLsnr,
                     log,
                     endpoint,
@@ -2987,7 +2987,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * Handshake message.
      */
     @SuppressWarnings("PublicInnerClass")
-    public static class HandshakeMessage extends MessageAdapter {
+    public static class HandshakeMessage implements Message {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -3001,7 +3001,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
         private long connectCnt;
 
         /**
-         * Default constructor required by {@link MessageAdapter}.
+         * Default constructor required by {@link Message}.
          */
         public HandshakeMessage() {
             // No-op.
@@ -3100,7 +3100,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * Recovery acknowledgment message.
      */
     @SuppressWarnings("PublicInnerClass")
-    public static class RecoveryLastReceivedMessage extends MessageAdapter {
+    public static class RecoveryLastReceivedMessage implements Message {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -3108,7 +3108,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
         private long rcvCnt;
 
         /**
-         * Default constructor required by {@link MessageAdapter}.
+         * Default constructor required by {@link Message}.
          */
         public RecoveryLastReceivedMessage() {
             // No-op.
@@ -3170,7 +3170,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * Node ID message.
      */
     @SuppressWarnings("PublicInnerClass")
-    public static class NodeIdMessage extends MessageAdapter {
+    public static class NodeIdMessage implements Message {
         /** */
         private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
index f25823a..57c45b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
@@ -732,7 +732,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
         private CountDownLatch waitLatch = new CountDownLatch(1);
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             sendMessage0(node, msg);
         }
@@ -745,7 +745,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
          * @param msg Message to be sent.
          * @throws org.apache.ignite.spi.IgniteSpiException If failed.
          */
-        private void sendMessage0(ClusterNode node, MessageAdapter msg) throws IgniteSpiException {
+        private void sendMessage0(ClusterNode node, Message msg) throws IgniteSpiException {
             if (msg instanceof GridIoMessage) {
                 GridIoMessage msg0 = (GridIoMessage)msg;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
index 45e2bb7..c93ee2c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
@@ -50,8 +50,8 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest
     private int bufSize;
 
     static {
-        GridIoMessageFactory.registerCustom(DIRECT_TYPE, new CO<MessageAdapter>() {
-            @Override public MessageAdapter apply() {
+        GridIoMessageFactory.registerCustom(DIRECT_TYPE, new CO<Message>() {
+            @Override public Message apply() {
                 return new TestMessage();
             }
         });
@@ -142,7 +142,7 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest
     }
 
     /** */
-    private static class TestMessage extends MessageAdapter {
+    private static class TestMessage implements Message {
         /** {@inheritDoc} */
         @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
             writer.setBuffer(buf);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
index ba8082b..c11156a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.testframework.junits.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.mockito.*;
 
-import java.io.*;
 import java.nio.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -77,7 +76,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
     public void testSendIfOneOfNodesIsLocalAndTopicIsEnum() throws Exception {
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                new GridIoManager(ctx).send(F.asList(locNode, rmtNode), GridTopic.TOPIC_CACHE, new Message(),
+                new GridIoManager(ctx).send(F.asList(locNode, rmtNode), GridTopic.TOPIC_CACHE, new TestMessage(),
                     GridIoPolicy.P2P_POOL);
 
                 return null;
@@ -91,7 +90,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
     public void testSendIfOneOfNodesIsLocalAndTopicIsObject() throws Exception {
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                new GridIoManager(ctx).send(F.asList(locNode, rmtNode), new Object(), new Message(),
+                new GridIoManager(ctx).send(F.asList(locNode, rmtNode), new Object(), new TestMessage(),
                     GridIoPolicy.P2P_POOL);
 
                 return null;
@@ -183,8 +182,8 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void send(ClusterNode node, GridTopic topic, MessageAdapter msg,
-            GridIoPolicy plc) throws IgniteCheckedException {
+        @Override public void send(ClusterNode node, GridTopic topic, Message msg, GridIoPolicy plc)
+            throws IgniteCheckedException {
             // No-op.
         }
     }
@@ -218,7 +217,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
     }
 
     /** */
-    private static class Message extends MessageAdapter implements Serializable {
+    private static class TestMessage implements Message {
         /** {@inheritDoc} */
         @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
             return true;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
index 7f940a9..0a4b114 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
@@ -169,7 +169,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest {
         private AtomicInteger msgCnt = new AtomicInteger();
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             if (isDeploymentMessage((GridIoMessage)msg))
                 msgCnt.incrementAndGet();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
index 325a169..d5855b5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
@@ -194,7 +194,7 @@ public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest
         private Map<Class<?>, AtomicInteger> cntMap = new HashMap<>();
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             AtomicInteger cntr = cntMap.get(((GridIoMessage)msg).message().getClass());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
index 5588c93..87902c8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
@@ -185,7 +185,7 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract
         }
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             Object obj = ((GridIoMessage)msg).message();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
index 4e795e4..0fcae87 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.communication.tcp.*;
@@ -349,7 +348,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
      */
     private class TestTpcCommunicationSpi extends TcpCommunicationSpi {
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg) throws IgniteSpiException {
+        @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
             if (suspended.get()) {
                 assert bannedMessage.get() != null;
 
@@ -378,4 +377,4 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
             info("Grid stopped.");
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
index d7ebaf2..154b811 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
@@ -135,7 +135,7 @@ public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstract
         private AtomicInteger dhtLocks = new AtomicInteger();
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             countMsg((GridIoMessage)msg);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
index 7445d62..f569fa7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
@@ -293,7 +292,7 @@ public class GridCacheAtomicTimeoutSelfTest extends GridCommonAbstractTest {
         private boolean skipDhtResponse;
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             if (!skipMessage((GridIoMessage)msg))
                 super.sendMessage(node, msg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
index 378aa4d..b98cd94 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
@@ -239,7 +239,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends Gri
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
         cfg.setCommunicationSpi(new TcpCommunicationSpi() {
-            @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+            @Override public void sendMessage(ClusterNode node, Message msg)
                 throws IgniteSpiException {
                 if (!F.eq(ignoreMsgNodeId, node.id()) || !ignoredMessage((GridIoMessage)msg))
                     super.sendMessage(node, msg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
index 1fe79f2..0754a29 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
@@ -431,7 +431,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
         cfg.setCommunicationSpi(new TcpCommunicationSpi() {
-            @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+            @Override public void sendMessage(ClusterNode node, Message msg)
                 throws IgniteSpiException {
                 if (getSpiContext().localNode().id().equals(failingNodeId)) {
                     if (ignoredMessage((GridIoMessage)msg) && ignoreMsgNodeIds != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
index cec7d43..e58c16e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
@@ -141,7 +141,7 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest
         private Collection<GridDhtPartitionsSingleMessage> sentMsgs = new ConcurrentLinkedQueue<>();
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             recordMessage((GridIoMessage)msg);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 24060b1..173940d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -297,7 +297,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
      */
     private static class DelayCommunicationSpi extends TcpCommunicationSpi {
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode node, Message msg)
             throws IgniteSpiException {
             try {
                 if (delayMessage((GridIoMessage)msg))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
index 75ea88b..1c203ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
@@ -224,7 +224,7 @@ public class GridCacheReplicatedInvalidateSelfTest extends GridCommonAbstractTes
         }
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode destNode, MessageAdapter msg)
+        @Override public void sendMessage(ClusterNode destNode, Message msg)
             throws IgniteSpiException {
             Object msg0 = ((GridIoMessage)msg).message();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
index 94b8a87..14e89e4 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
@@ -123,7 +123,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
             new GridMessageListener() {
                 @Override public void onMessage(UUID nodeId, Object msg) {
                     try {
-                        rcv.send(sndNode, topic, (MessageAdapter)msg, PUBLIC_POOL);
+                        rcv.send(sndNode, topic, (Message)msg, PUBLIC_POOL);
                     }
                     catch (IgniteCheckedException e) {
                         error("Failed to send message.", e);
@@ -217,7 +217,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
             new GridMessageListener() {
                 @Override public void onMessage(UUID nodeId, Object msg) {
                     try {
-                        rcv.send(sndNode, topic, (MessageAdapter)msg, PUBLIC_POOL);
+                        rcv.send(sndNode, topic, (Message)msg, PUBLIC_POOL);
                     }
                     catch (IgniteCheckedException e) {
                         error("Failed to send message.", e);
@@ -317,7 +317,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
             new GridMessageListener() {
                 @Override public void onMessage(UUID nodeId, Object msg) {
                     try {
-                        rcv.send(sndNode, topic, (MessageAdapter)msg, PUBLIC_POOL);
+                        rcv.send(sndNode, topic, (Message)msg, PUBLIC_POOL);
                     }
                     catch (IgniteCheckedException e) {
                         error("Failed to send message.", e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTestMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTestMessage.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTestMessage.java
index 80944ab..22ee3c3 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTestMessage.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTestMessage.java
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  *
  */
-class GridTestMessage extends MessageAdapter implements Externalizable {
+class GridTestMessage implements Message, Externalizable {
     /** */
     private IgniteUuid id;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java
index 2b7dac3..0492dd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java
@@ -50,7 +50,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
     private static final Map<UUID, Set<UUID>> msgDestMap = new HashMap<>();
 
     /** */
-    protected static final Map<UUID, CommunicationSpi<MessageAdapter>> spis = new HashMap<>();
+    protected static final Map<UUID, CommunicationSpi<Message>> spis = new HashMap<>();
 
     /** */
     protected static final Collection<ClusterNode> nodes = new ArrayList<>();
@@ -62,8 +62,8 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
      *
      */
     static {
-        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<MessageAdapter>() {
-            @Override public MessageAdapter apply() {
+        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<Message>() {
+            @Override public Message apply() {
                 return new GridTestMessage();
             }
         });
@@ -71,7 +71,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
 
     /** */
     @SuppressWarnings({"deprecation"})
-    private class MessageListener implements CommunicationListener<MessageAdapter> {
+    private class MessageListener implements CommunicationListener<Message> {
         /** */
         private final UUID locNodeId;
 
@@ -85,7 +85,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
         }
 
         /** {@inheritDoc} */
-        @Override public void onMessage(UUID nodeId, MessageAdapter msg, IgniteRunnable msgC) {
+        @Override public void onMessage(UUID nodeId, Message msg, IgniteRunnable msgC) {
             info("Received message [locNodeId=" + locNodeId + ", nodeId=" + nodeId +
                 ", msg=" + msg + ']');
 
@@ -139,7 +139,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
 
         msgDestMap.clear();
 
-        for (Entry<UUID, CommunicationSpi<MessageAdapter>> entry : spis.entrySet()) {
+        for (Entry<UUID, CommunicationSpi<Message>> entry : spis.entrySet()) {
             for (ClusterNode node : nodes) {
                 synchronized (mux) {
                     if (!msgDestMap.containsKey(entry.getKey()))
@@ -181,10 +181,10 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
         msgDestMap.clear();
 
         // Send message from each SPI to all SPI's, including itself.
-        for (Entry<UUID, CommunicationSpi<MessageAdapter>> entry : spis.entrySet()) {
+        for (Entry<UUID, CommunicationSpi<Message>> entry : spis.entrySet()) {
             UUID sndId = entry.getKey();
 
-            CommunicationSpi<MessageAdapter> commSpi = entry.getValue();
+            CommunicationSpi<Message> commSpi = entry.getValue();
 
             for (ClusterNode node : nodes) {
                 synchronized (mux) {
@@ -223,7 +223,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
      * @param idx Node index.
      * @return Spi.
      */
-    protected abstract CommunicationSpi<MessageAdapter> getSpi(int idx);
+    protected abstract CommunicationSpi<Message> getSpi(int idx);
 
     /**
      * @return Spi count.
@@ -278,7 +278,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
         Map<ClusterNode, GridSpiTestContext> ctxs = new HashMap<>();
 
         for (int i = 0; i < getSpiCount(); i++) {
-            CommunicationSpi<MessageAdapter> spi = getSpi(i);
+            CommunicationSpi<Message> spi = getSpi(i);
 
             GridTestUtils.setFieldValue(spi, "gridName", "grid-" + i);
 
@@ -325,7 +325,7 @@ public abstract class GridAbstractCommunicationSelfTest<T extends CommunicationS
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
-        for (CommunicationSpi<MessageAdapter> spi : spis.values()) {
+        for (CommunicationSpi<Message> spi : spis.values()) {
             spi.onContextDestroyed();
 
             spi.setListener(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/GridTestMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridTestMessage.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridTestMessage.java
index dea2c79..78ec28e 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridTestMessage.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridTestMessage.java
@@ -26,7 +26,7 @@ import java.util.*;
 /**
  * Test message for communication SPI tests.
  */
-public class GridTestMessage extends MessageAdapter {
+public class GridTestMessage implements Message {
     /** */
     public static final byte DIRECT_TYPE = (byte)200;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
index 27c98c9..71bd8a5 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
@@ -259,7 +259,7 @@ public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest {
          * @param obj Message being  sent.
          * @param srcNodeId Sender node id.
          */
-        private void checkAwaitMessageType(MessageAdapter obj, UUID srcNodeId) {
+        private void checkAwaitMessageType(Message obj, UUID srcNodeId) {
             try {
                 GridIoMessage plainMsg = (GridIoMessage)obj;
 
@@ -277,7 +277,7 @@ public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override protected void notifyListener(UUID sndId, MessageAdapter msg,
+        @Override protected void notifyListener(UUID sndId, Message msg,
             IgniteRunnable msgC) {
             checkAwaitMessageType(msg, sndId);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
index 175a4c5..714eda3 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
@@ -54,7 +54,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
     private static final Collection<IgniteTestResources> spiRsrcs = new ArrayList<>();
 
     /** */
-    protected static final List<CommunicationSpi<MessageAdapter>> spis = new ArrayList<>();
+    protected static final List<CommunicationSpi<Message>> spis = new ArrayList<>();
 
     /** */
     protected static final List<ClusterNode> nodes = new ArrayList<>();
@@ -66,8 +66,8 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
      *
      */
     static {
-        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<MessageAdapter>() {
-            @Override public MessageAdapter apply() {
+        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<Message>() {
+            @Override public Message apply() {
                 return new GridTestMessage();
             }
         });
@@ -83,7 +83,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
     /**
      *
      */
-    private static class MessageListener implements CommunicationListener<MessageAdapter> {
+    private static class MessageListener implements CommunicationListener<Message> {
         /** */
         private final CountDownLatch latch;
 
@@ -101,7 +101,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
         }
 
         /** {@inheritDoc} */
-        @Override public void onMessage(UUID nodeId, MessageAdapter msg, IgniteRunnable msgC) {
+        @Override public void onMessage(UUID nodeId, Message msg, IgniteRunnable msgC) {
             msgC.run();
 
             assertTrue(msg instanceof GridTestMessage);
@@ -230,7 +230,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
 
                             Thread.currentThread().setName("Test thread [idx=" + idx0 + ", grid=" + (idx0 % 2) + ']');
 
-                            CommunicationSpi<MessageAdapter> spi = spis.get(idx0 % 2);
+                            CommunicationSpi<Message> spi = spis.get(idx0 % 2);
 
                             ClusterNode srcNode = nodes.get(idx0 % 2);
 
@@ -316,7 +316,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
         Map<ClusterNode, GridSpiTestContext> ctxs = new HashMap<>();
 
         for (int i = 0; i < SPI_CNT; i++) {
-            CommunicationSpi<MessageAdapter> spi = createSpi();
+            CommunicationSpi<Message> spi = createSpi();
 
             GridTestUtils.setFieldValue(spi, "gridName", "grid-" + i);
 
@@ -393,7 +393,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
      * @throws Exception If failed.
      */
     private void stopSpis() throws Exception {
-        for (CommunicationSpi<MessageAdapter> spi : spis) {
+        for (CommunicationSpi<Message> spi : spis) {
             spi.onContextDestroyed();
 
             spi.setListener(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
index 1c68264..daa1aad 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
@@ -79,7 +79,7 @@ public class GridTcpCommunicationSpiLanTest extends GridSpiAbstractTest<TcpCommu
      * Accumulating listener.
      */
     @SuppressWarnings({"deprecation"})
-    private class MessageListener implements CommunicationListener<MessageAdapter> {
+    private class MessageListener implements CommunicationListener<Message> {
         /** Node id of local node. */
         private final UUID locNodeId;
 
@@ -100,7 +100,7 @@ public class GridTcpCommunicationSpiLanTest extends GridSpiAbstractTest<TcpCommu
         }
 
         /** {@inheritDoc} */
-        @Override public void onMessage(UUID nodeId, MessageAdapter msg, IgniteRunnable msgC) {
+        @Override public void onMessage(UUID nodeId, Message msg, IgniteRunnable msgC) {
             msgC.run();
 
             if (msg instanceof GridTestMessage) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
index 159173e..cc1ca76 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
@@ -61,7 +61,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
     private static final Collection<IgniteTestResources> spiRsrcs = new ArrayList<>();
 
     /** SPIs */
-    private static final Map<UUID, CommunicationSpi<MessageAdapter>> spis =
+    private static final Map<UUID, CommunicationSpi<Message>> spis =
         new ConcurrentHashMap<>();
 
     /** Listeners. */
@@ -74,8 +74,8 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
     private static boolean reject;
 
     static {
-        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<MessageAdapter>() {
-            @Override public MessageAdapter apply() {
+        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<Message>() {
+            @Override public Message apply() {
                 return new GridTestMessage();
             }
         });
@@ -94,7 +94,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
      * Accumulating listener.
      */
     @SuppressWarnings({"deprecation"})
-    private static class MessageListener implements CommunicationListener<MessageAdapter> {
+    private static class MessageListener implements CommunicationListener<Message> {
         /** Node id of local node. */
         private final UUID locNodeId;
 
@@ -114,7 +114,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
         }
 
         /** {@inheritDoc} */
-        @Override public void onMessage(UUID nodeId, MessageAdapter msg, IgniteRunnable msgC) {
+        @Override public void onMessage(UUID nodeId, Message msg, IgniteRunnable msgC) {
             msgC.run();
 
             if (msg instanceof GridTestMessage) {
@@ -284,7 +284,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
 
                         try {
                             for (ClusterNode node : nodes) {
-                                MessageAdapter msg =
+                                Message msg =
                                     new GridTestMessage(from.id(), msgId.getAndIncrement(), 0);
 
                                 spis.get(from.id()).sendMessage(node, msg);
@@ -332,7 +332,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
         fut2.get();
 
         // Wait when all messages are acknowledged to do not break next tests' logic.
-        for (CommunicationSpi<MessageAdapter> spi : spis.values()) {
+        for (CommunicationSpi<Message> spi : spis.values()) {
             GridNioServer srv = U.field(spi, "nioSrvr");
 
             Collection<? extends GridNioSession> sessions = GridTestUtils.getFieldValue(srv, "sessions");
@@ -377,7 +377,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
 
                     ClusterNode to = nodes.get(1);
 
-                    CommunicationSpi<MessageAdapter> spi = spis.get(from.id());
+                    CommunicationSpi<Message> spi = spis.get(from.id());
 
                     while (cntr.getAndIncrement() < msgCnt) {
                         GridTestMessage msg = new GridTestMessage(from.id(), msgId.getAndIncrement(), 0);
@@ -415,7 +415,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
     /**
      * @return Spi.
      */
-    private CommunicationSpi<MessageAdapter> newCommunicationSpi() {
+    private CommunicationSpi<Message> newCommunicationSpi() {
         TcpCommunicationSpi spi = new TcpCommunicationSpi();
 
         if (!useShmem)
@@ -446,7 +446,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
         Map<ClusterNode, GridSpiTestContext> ctxs = new HashMap<>();
 
         for (int i = 0; i < getSpiCount(); i++) {
-            CommunicationSpi<MessageAdapter> spi = newCommunicationSpi();
+            CommunicationSpi<Message> spi = newCommunicationSpi();
 
             GridTestUtils.setFieldValue(spi, "gridName", "grid-" + i);
 
@@ -521,7 +521,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
-        for (CommunicationSpi<MessageAdapter> spi : spis.values()) {
+        for (CommunicationSpi<Message> spi : spis.values()) {
             spi.onContextDestroyed();
 
             spi.setListener(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
index 2ba9086..7b64988 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
@@ -57,8 +57,8 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
      *
      */
     static {
-        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<MessageAdapter>() {
-            @Override public MessageAdapter apply() {
+        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<Message>() {
+            @Override public Message apply() {
                 return new GridTestMessage();
             }
         });
@@ -73,7 +73,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
 
     /** */
     @SuppressWarnings({"deprecation"})
-    private class TestListener implements CommunicationListener<MessageAdapter> {
+    private class TestListener implements CommunicationListener<Message> {
         /** */
         private ConcurrentHashSet<Long> msgIds = new ConcurrentHashSet<>();
 
@@ -81,7 +81,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
         private AtomicInteger rcvCnt = new AtomicInteger();
 
         /** {@inheritDoc} */
-        @Override public void onMessage(UUID nodeId, MessageAdapter msg, IgniteRunnable msgC) {
+        @Override public void onMessage(UUID nodeId, Message msg, IgniteRunnable msgC) {
             info("Test listener received message: " + msg);
 
             assertTrue("Unexpected message: " + msg, msg instanceof GridTestMessage);
@@ -417,7 +417,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
      * @throws Exception If failed.
      */
     private void stopSpis() throws Exception {
-        for (CommunicationSpi<MessageAdapter> spi : spis) {
+        for (CommunicationSpi<Message> spi : spis) {
             spi.onContextDestroyed();
 
             spi.setListener(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
index 86b4e44..0c79ca5 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
@@ -66,8 +66,8 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
      *
      */
     static {
-        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<MessageAdapter>() {
-            @Override public MessageAdapter apply() {
+        GridIoMessageFactory.registerCustom(GridTestMessage.DIRECT_TYPE, new CO<Message>() {
+            @Override public Message apply() {
                 return new GridTestMessage();
             }
         });
@@ -82,7 +82,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
 
     /** */
     @SuppressWarnings({"deprecation"})
-    private class TestListener implements CommunicationListener<MessageAdapter> {
+    private class TestListener implements CommunicationListener<Message> {
         /** */
         private boolean block;
 
@@ -96,7 +96,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
         private AtomicInteger rcvCnt = new AtomicInteger();
 
         /** {@inheritDoc} */
-        @Override public void onMessage(UUID nodeId, MessageAdapter msg, IgniteRunnable msgC) {
+        @Override public void onMessage(UUID nodeId, Message msg, IgniteRunnable msgC) {
             // info("Test listener received message: " + msg);
 
             assertTrue("Unexpected message: " + msg, msg instanceof GridTestMessage);
@@ -705,7 +705,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
      * @throws Exception If failed.
      */
     private void stopSpis() throws Exception {
-        for (CommunicationSpi<MessageAdapter> spi : spis) {
+        for (CommunicationSpi<Message> spi : spis) {
             spi.onContextDestroyed();
 
             spi.setListener(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cac7508c/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index 66a43c2..7653573 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@ -164,7 +164,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
      */
     private static class CommunicationSpi extends TcpCommunicationSpi {
         /** {@inheritDoc} */
-        @Override protected void notifyListener(UUID sndId, MessageAdapter msg,
+        @Override protected void notifyListener(UUID sndId, Message msg,
             IgniteRunnable msgC) {
             try {
                 GridIoMessage ioMsg = (GridIoMessage)msg;


Mime
View raw message