ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [34/55] [abbrv] incubator-ignite git commit: IGNITE-61 - Direct marshalling
Date Sun, 08 Feb 2015 07:55:51 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
new file mode 100644
index 0000000..d3091e6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
@@ -0,0 +1,376 @@
+/*
+ * 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.internal.direct;
+
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.managers.checkpoint.*;
+import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.internal.managers.deployment.*;
+import org.apache.ignite.internal.managers.eventstorage.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.distributed.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
+import org.apache.ignite.internal.processors.cache.distributed.near.*;
+import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.processors.clock.*;
+import org.apache.ignite.internal.processors.continuous.*;
+import org.apache.ignite.internal.processors.dataload.*;
+import org.apache.ignite.internal.processors.rest.client.message.*;
+import org.apache.ignite.internal.processors.rest.handlers.task.*;
+import org.apache.ignite.internal.processors.rest.protocols.tcp.*;
+import org.apache.ignite.internal.processors.streamer.*;
+import org.apache.ignite.plugin.extensions.communication.*;
+import org.apache.ignite.spi.collision.jobstealing.*;
+import org.apache.ignite.spi.communication.tcp.*;
+import org.jdk8.backport.*;
+
+import java.util.*;
+
+/**
+ * Communication message factory.
+ */
+public class GridTcpCommunicationMessageFactory {
+    /** Common message producers. */
+    private static final GridTcpCommunicationMessageProducer[] COMMON = new GridTcpCommunicationMessageProducer[83];
+
+    /**
+     * Custom messages registry. Used for test purposes.
+     */
+    private static final Map<Byte, GridTcpCommunicationMessageProducer> CUSTOM = new ConcurrentHashMap8<>();
+
+    /** */
+    public static final int MAX_COMMON_TYPE = 82;
+
+    static {
+        registerCommon(new GridTcpCommunicationMessageProducer() {
+            @Override public MessageAdapter create(byte type) {
+                switch (type) {
+                    case 0:
+                        return new GridJobCancelRequest();
+
+                    case 1:
+                        return new GridJobExecuteRequest();
+
+                    case 2:
+                        return new GridJobExecuteResponse();
+
+                    case 3:
+                        return new GridJobSiblingsRequest();
+
+                    case 4:
+                        return new GridJobSiblingsResponse();
+
+                    case 5:
+                        return new GridTaskCancelRequest();
+
+                    case 6:
+                        return new GridTaskSessionRequest();
+
+                    case 7:
+                        return new GridCheckpointRequest();
+
+                    case 8:
+                        return new GridIoMessage();
+
+                    case 9:
+                        return new GridIoUserMessage();
+
+                    case 10:
+                        return new GridDeploymentInfoBean();
+
+                    case 11:
+                        return new GridDeploymentRequest();
+
+                    case 12:
+                        return new GridDeploymentResponse();
+
+                    case 13:
+                        return new GridEventStorageMessage();
+
+                    case 14:
+                        return new GridCacheEvictionRequest();
+
+                    case 15:
+                        return new GridCacheEvictionResponse();
+
+                    case 16:
+                        return new GridCacheOptimisticCheckPreparedTxRequest();
+
+                    case 17:
+                        return new GridCacheOptimisticCheckPreparedTxResponse();
+
+                    case 18:
+                        return new GridCachePessimisticCheckCommittedTxRequest();
+
+                    case 19:
+                        return new GridCachePessimisticCheckCommittedTxResponse();
+
+                    case 20:
+                        return new GridCacheTtlUpdateRequest();
+
+                    case 21:
+                        return new GridDistributedLockRequest();
+
+                    case 22:
+                        return new GridDistributedLockResponse();
+
+                    case 23:
+                        return new GridDistributedTxFinishRequest();
+
+                    case 24:
+                        return new GridDistributedTxFinishResponse();
+
+                    case 25:
+                        return new GridDistributedTxPrepareRequest();
+
+                    case 26:
+                        return new GridDistributedTxPrepareResponse();
+
+                    case 27:
+                        return new GridDistributedUnlockRequest();
+
+                    case 28:
+                        return new GridDhtAffinityAssignmentRequest();
+
+                    case 29:
+                        return new GridDhtAffinityAssignmentResponse();
+
+                    case 30:
+                        return new GridDhtLockRequest();
+
+                    case 31:
+                        return new GridDhtLockResponse();
+
+                    case 32:
+                        return new GridDhtTxFinishRequest();
+
+                    case 33:
+                        return new GridDhtTxFinishResponse();
+
+                    case 34:
+                        return new GridDhtTxPrepareRequest();
+
+                    case 35:
+                        return new GridDhtTxPrepareResponse();
+
+                    case 36:
+                        return new GridDhtUnlockRequest();
+
+                    case 37:
+                        return new GridDhtAtomicDeferredUpdateResponse();
+
+                    case 38:
+                        return new GridDhtAtomicUpdateRequest();
+
+                    case 39:
+                        return new GridDhtAtomicUpdateResponse();
+
+                    case 40:
+                        return new GridNearAtomicUpdateRequest();
+
+                    case 41:
+                        return new GridNearAtomicUpdateResponse();
+
+                    case 42:
+                        return new GridDhtForceKeysRequest();
+
+                    case 43:
+                        return new GridDhtForceKeysResponse();
+
+                    case 44:
+                        return new GridDhtPartitionDemandMessage();
+
+                    case 45:
+                        return new GridDhtPartitionSupplyMessage();
+
+                    case 46:
+                        return new GridDhtPartitionsFullMessage();
+
+                    case 47:
+                        return new GridDhtPartitionsSingleMessage();
+
+                    case 48:
+                        return new GridDhtPartitionsSingleRequest();
+
+                    case 49:
+                        return new GridNearGetRequest();
+
+                    case 50:
+                        return new GridNearGetResponse();
+
+                    case 51:
+                        return new GridNearLockRequest();
+
+                    case 52:
+                        return new GridNearLockResponse();
+
+                    case 53:
+                        return new GridNearTxFinishRequest();
+
+                    case 54:
+                        return new GridNearTxFinishResponse();
+
+                    case 55:
+                        return new GridNearTxPrepareRequest();
+
+                    case 56:
+                        return new GridNearTxPrepareResponse();
+
+                    case 57:
+                        return new GridNearUnlockRequest();
+
+                    case 58:
+                        return new GridCacheQueryRequest();
+
+                    case 59:
+                        return new GridCacheQueryResponse();
+
+                    case 60:
+                        return new GridClockDeltaSnapshotMessage();
+
+                    case 61:
+                        return new GridContinuousMessage();
+
+                    case 62:
+                        return new GridDataLoadRequest();
+
+                    case 63:
+                        return new GridDataLoadResponse();
+
+                    // 64-71: IgniteFS messages.
+
+                    case 72:
+                        return new GridClientHandshakeRequestWrapper();
+
+                    case 73:
+                        return new GridClientHandshakeResponseWrapper();
+
+                    case 74:
+                        return new GridClientMessageWrapper();
+
+                    case 75:
+                        return new GridClientPingPacketWrapper();
+
+                    case 76:
+                        return new GridTaskResultRequest();
+
+                    case 77:
+                        return new GridTaskResultResponse();
+
+                    case 78:
+                        return new GridMemcachedMessageWrapper();
+
+                    case 79:
+                        return new GridStreamerCancelRequest();
+
+                    case 80:
+                        return new GridStreamerExecutionRequest();
+
+                    case 81:
+                        return new GridStreamerResponse();
+
+                    case 82:
+                        return new JobStealingRequest();
+
+                    default:
+                        assert false : "Invalid message type.";
+
+                        return null;
+                }
+            }
+        },  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+           20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+           40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+           60, 61, 62, 63, /* 64-71: IgniteFS messages. */ 72, 73, 74, 75, 76, 77, 78, 79,
+           80, 81, 82);
+    }
+
+    /**
+     * @param type Message type.
+     * @return New message.
+     */
+    public static MessageAdapter create(byte type) {
+        if (type == TcpCommunicationSpi.NODE_ID_MSG_TYPE)
+            return new TcpCommunicationSpi.NodeIdMessage();
+        else if (type == TcpCommunicationSpi.RECOVERY_LAST_ID_MSG_TYPE)
+            return new TcpCommunicationSpi.RecoveryLastReceivedMessage();
+        else if (type == TcpCommunicationSpi.HANDSHAKE_MSG_TYPE)
+            return new TcpCommunicationSpi.HandshakeMessage();
+        else
+            return create0(type);
+    }
+
+    /**
+     * @param type Message type.
+     * @return New message.
+     */
+    private static MessageAdapter create0(byte type) {
+        if (type >= 0 && type < COMMON.length) {
+            GridTcpCommunicationMessageProducer producer = COMMON[type];
+
+            if (producer != null)
+                return producer.create(type);
+            else
+                throw new IllegalStateException("Common message type producer is not registered: " + type);
+        }
+        else {
+            GridTcpCommunicationMessageProducer c = CUSTOM.get(type);
+
+            if (c != null)
+                return c.create(type);
+            else
+                throw new IllegalStateException("Custom message type producer is not registered: " + type);
+        }
+    }
+
+    /**
+     * Register message producer for common message type.
+     *
+     * @param producer Producer.
+     * @param types Types applicable for this producer.
+     */
+    public static void registerCommon(GridTcpCommunicationMessageProducer producer, int... types) {
+        for (int type : types) {
+            assert type >= 0 && type < COMMON.length : "Common type being registered is out of common messages " +
+                "array length: " + type;
+
+            COMMON[type] = producer;
+        }
+    }
+
+    /**
+     * Registers factory for custom message. Used for test purposes.
+     *
+     * @param producer Message producer.
+     * @param type Message type.
+     */
+    public static void registerCustom(GridTcpCommunicationMessageProducer producer, byte type) {
+        assert producer != null;
+
+        CUSTOM.put(type, producer);
+    }
+
+    /**
+     * @return Common message producers.
+     */
+    public static GridTcpCommunicationMessageProducer[] commonProducers() {
+        return COMMON;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageProducer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageProducer.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageProducer.java
new file mode 100644
index 0000000..2932002
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageProducer.java
@@ -0,0 +1,33 @@
+/*
+ * 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.internal.direct;
+
+import org.apache.ignite.plugin.extensions.communication.*;
+
+/**
+ * Message producer. Each component have to register it's own message producer.
+ */
+public interface GridTcpCommunicationMessageProducer {
+    /**
+     * Create message.
+     *
+     * @param type Message type.
+     * @return Communication message.
+     */
+    public MessageAdapter create(byte type);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageState.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageState.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageState.java
new file mode 100644
index 0000000..ad9542a
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageState.java
@@ -0,0 +1,726 @@
+/*
+ * 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.internal.direct;
+
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
+import org.apache.ignite.internal.processors.cache.version.*;
+import org.apache.ignite.internal.processors.clock.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
+import org.jetbrains.annotations.*;
+import sun.misc.*;
+
+import java.nio.*;
+import java.util.*;
+
+import static org.apache.ignite.plugin.extensions.communication.MessageAdapter.*;
+
+/**
+ * Communication message state.
+ */
+@SuppressWarnings("PublicField")
+public class GridTcpCommunicationMessageState {
+    /** */
+    private static final Unsafe UNSAFE = GridUnsafe.unsafe();
+
+    /** */
+    private static final long BYTE_ARR_OFF = UNSAFE.arrayBaseOffset(byte[].class);
+
+    /** */
+    private final MessageWriter writer = new DirectMessageWriter();
+
+    /** */
+    private MessageReader reader;
+
+    /** */
+    public int idx;
+
+    /** */
+    public boolean typeWritten;
+
+    /** */
+    public Iterator<?> it;
+
+    /** */
+    public Object cur;
+
+    /** */
+    public boolean keyDone;
+
+    /** */
+    public int readSize = -1;
+
+    /** */
+    public int readItems;
+
+    /**
+     * @param writer Writer.
+     */
+    public final void setWriter(MessageWriter writer) {
+//        if (this.writer == null)
+//            this.writer = writer;
+    }
+
+    /**
+     * @param reader Reader.
+     */
+    public final void setReader(MessageReader reader) {
+        if (this.reader == null)
+            this.reader = reader;
+    }
+
+    /**
+     * @param buf Buffer.
+     */
+    public final void setBuffer(ByteBuffer buf) {
+        if (writer != null)
+            writer.setBuffer(buf);
+
+        if (reader != null)
+            reader.setBuffer(buf);
+    }
+
+    /**
+     * @param name Field name.
+     * @param b Byte value.
+     * @return Whether value was written.
+     */
+    public final boolean putByte(String name, byte b) {
+        return writer.writeByte(name, b);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Byte value.
+     */
+    public final byte getByte(String name) {
+        return reader.readByte(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param s Short value.
+     * @return Whether value was written.
+     */
+    public final boolean putShort(String name, short s) {
+        return writer.writeShort(name, s);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Short value.
+     */
+    public final short getShort(String name) {
+        return reader.readShort(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param i Integer value.
+     * @return Whether value was written.
+     */
+    public final boolean putInt(String name, int i) {
+        return writer.writeInt(name, i);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Integer value.
+     */
+    public final int getInt(String name) {
+        return reader.readInt(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param l Long value.
+     * @return Whether value was written.
+     */
+    public final boolean putLong(String name, long l) {
+        return writer.writeLong(name, l);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Long value.
+     */
+    public final long getLong(String name) {
+        return reader.readLong(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param f Float value.
+     * @return Whether value was written.
+     */
+    public final boolean putFloat(String name, float f) {
+        return writer.writeFloat(name, f);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Float value.
+     */
+    public final float getFloat(String name) {
+        return reader.readFloat(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param d Double value.
+     * @return Whether value was written.
+     */
+    public final boolean putDouble(String name, double d) {
+        return writer.writeDouble(name, d);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Double value.
+     */
+    public final double getDouble(String name) {
+        return reader.readDouble(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param c Char value.
+     * @return Whether value was written.
+     */
+    public final boolean putChar(String name, char c) {
+        return writer.writeChar(name, c);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Char value.
+     */
+    public final char getChar(String name) {
+        return reader.readChar(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param b Boolean value.
+     * @return Whether value was written.
+     */
+    public final boolean putBoolean(String name, boolean b) {
+        return writer.writeBoolean(name, b);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Boolean value.
+     */
+    public final boolean getBoolean(String name) {
+        return reader.readBoolean(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Byte array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putByteArray(String name, @Nullable byte[] arr) {
+        return writer.writeByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Byte array.
+     */
+    public final byte[] getByteArray(String name) {
+        return reader.readByteArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Short array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putShortArray(String name, short[] arr) {
+        return writer.writeShortArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Short array.
+     */
+    public final short[] getShortArray(String name) {
+        return reader.readShortArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Integer array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putIntArray(String name, int[] arr) {
+        return writer.writeIntArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Integer array.
+     */
+    public final int[] getIntArray(String name) {
+        return reader.readIntArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Long array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putLongArray(String name, long[] arr) {
+        return writer.writeLongArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Long array.
+     */
+    public final long[] getLongArray(String name) {
+        return reader.readLongArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Float array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putFloatArray(String name, float[] arr) {
+        return writer.writeFloatArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Float array.
+     */
+    public final float[] getFloatArray(String name) {
+        return reader.readFloatArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Double array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putDoubleArray(String name, double[] arr) {
+        return writer.writeDoubleArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Double array.
+     */
+    public final double[] getDoubleArray(String name) {
+        return reader.readDoubleArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Char array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putCharArray(String name, char[] arr) {
+        return writer.writeCharArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Char array.
+     */
+    public final char[] getCharArray(String name) {
+        return reader.readCharArray(name);
+    }
+
+    /**
+     * @param name Field name.
+     * @param arr Boolean array.
+     * @return Whether array was fully written.
+     */
+    public final boolean putBooleanArray(String name, boolean[] arr) {
+        return writer.writeBooleanArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return Boolean array.
+     */
+    public final boolean[] getBooleanArray(String name) {
+        return reader.readBooleanArray(name);
+    }
+
+
+    /**
+     * @param name Field name.
+     * @param uuid {@link UUID}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putUuid(String name, @Nullable UUID uuid) {
+        byte[] arr = null;
+
+        if (uuid != null) {
+            arr = new byte[16];
+
+            UNSAFE.putLong(arr, BYTE_ARR_OFF, uuid.getMostSignificantBits());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 8, uuid.getLeastSignificantBits());
+        }
+
+        return putByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link UUID}.
+     */
+    public final UUID getUuid(String name) {
+        byte[] arr = getByteArray(name);
+
+        if (arr == null)
+            return null;
+        else {
+            long most = UNSAFE.getLong(arr, BYTE_ARR_OFF);
+            long least = UNSAFE.getLong(arr, BYTE_ARR_OFF + 8);
+
+            return new UUID(most, least);
+        }
+    }
+
+    /**
+     * @param name Field name.
+     * @param uuid {@link IgniteUuid}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putGridUuid(String name, @Nullable IgniteUuid uuid) {
+        byte[] arr = null;
+
+        if (uuid != null) {
+            arr = new byte[24];
+
+            UNSAFE.putLong(arr, BYTE_ARR_OFF, uuid.globalId().getMostSignificantBits());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 8, uuid.globalId().getLeastSignificantBits());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 16, uuid.localId());
+        }
+
+        return putByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link IgniteUuid}.
+     */
+    public final IgniteUuid getGridUuid(String name) {
+        byte[] arr = getByteArray(name);
+
+        if (arr == null)
+            return null;
+        else {
+            long most = UNSAFE.getLong(arr, BYTE_ARR_OFF);
+            long least = UNSAFE.getLong(arr, BYTE_ARR_OFF + 8);
+            long loc = UNSAFE.getLong(arr, BYTE_ARR_OFF + 16);
+
+            return new IgniteUuid(new UUID(most, least), loc);
+        }
+    }
+
+    /**
+     * @param name Field name.
+     * @param ver {@link GridClockDeltaVersion}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putClockDeltaVersion(String name, @Nullable GridClockDeltaVersion ver) {
+        byte[] arr = null;
+
+        if (ver != null) {
+            arr = new byte[16];
+
+            UNSAFE.putLong(arr, BYTE_ARR_OFF, ver.version());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 8, ver.topologyVersion());
+        }
+
+        return putByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link GridClockDeltaVersion}.
+     */
+    public final GridClockDeltaVersion getClockDeltaVersion(String name) {
+        byte[] arr = getByteArray(name);
+
+        if (arr == null)
+            return null;
+        else {
+            long ver = UNSAFE.getLong(arr, BYTE_ARR_OFF);
+            long topVer = UNSAFE.getLong(arr, BYTE_ARR_OFF + 8);
+
+            return new GridClockDeltaVersion(ver, topVer);
+        }
+    }
+
+    /**
+     * @param name Field name.
+     * @param list {@link GridByteArrayList}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putByteArrayList(String name, @Nullable GridByteArrayList list) {
+        return putByteArray(name, list != null ? list.array() : null);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link GridByteArrayList}.
+     */
+    public final GridByteArrayList getByteArrayList(String name) {
+        byte[] arr = getByteArray(name);
+
+        return arr != null ? new GridByteArrayList(arr) : null;
+    }
+
+    /**
+     * @param name Field name.
+     * @param list {@link GridLongList}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putLongList(String name, @Nullable GridLongList list) {
+        return putLongArray(name, list != null ? list.array() : null);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link GridLongList}.
+     */
+    public final GridLongList getLongList(String name) {
+        long[] arr = getLongArray(name);
+
+        return arr != null ? new GridLongList(arr) : null;
+    }
+
+    /**
+     * @param name Field name.
+     * @param ver {@link org.apache.ignite.internal.processors.cache.version.GridCacheVersion}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putCacheVersion(String name, @Nullable GridCacheVersion ver) {
+        byte[] arr = null;
+
+        if (ver != null) {
+            arr = new byte[24];
+
+            UNSAFE.putInt(arr, BYTE_ARR_OFF, ver.topologyVersion());
+            UNSAFE.putInt(arr, BYTE_ARR_OFF + 4, ver.nodeOrderAndDrIdRaw());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 8, ver.globalTime());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 16, ver.order());
+        }
+
+        return putByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link GridCacheVersion}.
+     */
+    public final GridCacheVersion getCacheVersion(String name) {
+        byte[] arr = getByteArray(name);
+
+        if (arr == null)
+            return null;
+        else {
+            int topVerDrId = UNSAFE.getInt(arr, BYTE_ARR_OFF);
+            int nodeOrder = UNSAFE.getInt(arr, BYTE_ARR_OFF + 4);
+            long globalTime = UNSAFE.getLong(arr, BYTE_ARR_OFF + 8);
+            long order = UNSAFE.getLong(arr, BYTE_ARR_OFF + 16);
+
+            return new GridCacheVersion(topVerDrId, nodeOrder, globalTime, order);
+        }
+    }
+
+    /**
+     * @param name Field name.
+     * @param id {@link GridDhtPartitionExchangeId}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putDhtPartitionExchangeId(String name, @Nullable GridDhtPartitionExchangeId id) {
+        byte[] arr = null;
+
+        if (id != null) {
+            arr = new byte[28];
+
+            UNSAFE.putLong(arr, BYTE_ARR_OFF, id.nodeId().getMostSignificantBits());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 8, id.nodeId().getLeastSignificantBits());
+            UNSAFE.putInt(arr, BYTE_ARR_OFF + 16, id.event());
+            UNSAFE.putLong(arr, BYTE_ARR_OFF + 20, id.topologyVersion());
+        }
+
+        return putByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link GridDhtPartitionExchangeId}.
+     */
+    public final GridDhtPartitionExchangeId getDhtPartitionExchangeId(String name) {
+        byte[] arr = getByteArray(name);
+
+        if (arr == null)
+            return null;
+        else {
+            long most = UNSAFE.getLong(arr, BYTE_ARR_OFF);
+            long least = UNSAFE.getLong(arr, BYTE_ARR_OFF + 8);
+            int evt = UNSAFE.getInt(arr, BYTE_ARR_OFF + 16);
+            long topVer = UNSAFE.getLong(arr, BYTE_ARR_OFF + 20);
+
+            return new GridDhtPartitionExchangeId(new UUID(most, least), evt, topVer);
+        }
+    }
+
+    /**
+     * @param name Field name.
+     * @param bytes {@link GridCacheValueBytes}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putValueBytes(String name, @Nullable GridCacheValueBytes bytes) {
+        byte[] arr = null;
+
+        if (bytes != null) {
+            byte[] bytes0 = bytes.get();
+
+            if (bytes0 != null) {
+                int len = bytes0.length;
+
+                arr = new byte[len + 2];
+
+                UNSAFE.putBoolean(arr, BYTE_ARR_OFF, true);
+                UNSAFE.copyMemory(bytes0, BYTE_ARR_OFF, arr, BYTE_ARR_OFF + 1, len);
+                UNSAFE.putBoolean(arr, BYTE_ARR_OFF + 1 + len, bytes.isPlain());
+            }
+            else {
+                arr = new byte[1];
+
+                UNSAFE.putBoolean(arr, BYTE_ARR_OFF, false);
+            }
+        }
+
+        return putByteArray(name, arr);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link GridCacheValueBytes}.
+     */
+    public final GridCacheValueBytes getValueBytes(String name) {
+        byte[] arr = getByteArray(name);
+
+        if (arr == null)
+            return null;
+        else {
+            boolean notNull = UNSAFE.getBoolean(arr, BYTE_ARR_OFF);
+
+            if (notNull) {
+                int len = arr.length - 2;
+
+                assert len >= 0 : len;
+
+                byte[] bytesArr = new byte[len];
+
+                UNSAFE.copyMemory(arr, BYTE_ARR_OFF + 1, bytesArr, BYTE_ARR_OFF, len);
+
+                boolean isPlain = UNSAFE.getBoolean(arr, BYTE_ARR_OFF + 1 + len);
+
+                return new GridCacheValueBytes(bytesArr, isPlain);
+            }
+            else
+                return new GridCacheValueBytes();
+        }
+    }
+
+    /**
+     * @param name Field name.
+     * @param str {@link String}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putString(String name, @Nullable String str) {
+        return putByteArray(name, str != null ? str.getBytes() : null);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link String}.
+     */
+    public final String getString(String name) {
+        byte[] arr = getByteArray(name);
+
+        return arr != null ? new String(arr) : null;
+    }
+
+    /**
+     * @param name Field name.
+     * @param bits {@link BitSet}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putBitSet(String name, @Nullable BitSet bits) {
+        return putLongArray(name, bits != null ? bits.toLongArray() : null);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link BitSet}.
+     */
+    public final BitSet getBitSet(String name) {
+        long[] arr = getLongArray(name);
+
+        return arr != null ? BitSet.valueOf(arr) : null;
+    }
+
+    /**
+     * @param name Field name.
+     * @param e Enum.
+     * @return Whether value was fully written.
+     */
+    public final boolean putEnum(String name, @Nullable Enum<?> e) {
+        return putByte(name, e != null ? (byte)e.ordinal() : -1);
+    }
+
+    /**
+     * @param name Field name.
+     * @param msg {@link MessageAdapter}.
+     * @return Whether value was fully written.
+     */
+    public final boolean putMessage(String name, @Nullable MessageAdapter msg) {
+        if (msg != null)
+            msg.setWriter(writer);
+
+        return writer.writeMessage(name, msg);
+    }
+
+    /**
+     * @param name Field name.
+     * @return {@link MessageAdapter}.
+     */
+    public final MessageAdapter getMessage(String name) {
+        return reader.readMessage(name);
+    }
+
+    public final boolean lastRead() {
+        return reader.isLastRead();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpMessageFactory.java
new file mode 100644
index 0000000..5c66a04
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpMessageFactory.java
@@ -0,0 +1,31 @@
+/*
+ * 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.internal.direct;
+
+import org.apache.ignite.plugin.extensions.communication.*;
+
+/**
+ *
+ */
+public interface GridTcpMessageFactory {
+    /**
+     * @param type Message type.
+     * @return Message instance.
+     */
+    public MessageAdapter create(byte type);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 7143cfe..58b84b2 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
@@ -22,6 +22,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.direct.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.extensions.communication.*;
@@ -29,9 +30,7 @@ import org.apache.ignite.plugin.security.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
-import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.spi.swapspace.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -319,8 +318,8 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
                         A.notNull(topic, "topic");
 
                         try {
-                            if (msg instanceof GridTcpCommunicationMessageAdapter)
-                                ctx.io().send(node, topic, (GridTcpCommunicationMessageAdapter)msg, SYSTEM_POOL);
+                            if (msg instanceof MessageAdapter)
+                                ctx.io().send(node, topic, (MessageAdapter)msg, SYSTEM_POOL);
                             else
                                 ctx.io().sendUserMessage(asList(node), msg, topic, false, 0);
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 9bcd89b..fda129a 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
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.internal.managers.checkpoint;
 
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * This class defines checkpoint request.
  */
-public class GridCheckpointRequest extends GridTcpCommunicationMessageAdapter {
+public class GridCheckpointRequest extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -85,7 +85,7 @@ public class GridCheckpointRequest extends GridTcpCommunicationMessageAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCheckpointRequest _clone = new GridCheckpointRequest();
 
         clone0(_clone);
@@ -94,7 +94,7 @@ public class GridCheckpointRequest extends GridTcpCommunicationMessageAdapter {
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridCheckpointRequest _clone = (GridCheckpointRequest)_msg;
 
         _clone.sesId = sesId;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 70ab41d..6902617 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
@@ -21,12 +21,12 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.direct.*;
 import org.apache.ignite.internal.managers.*;
 import org.apache.ignite.internal.managers.deployment.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.timeout.*;
 import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -36,7 +36,6 @@ import org.apache.ignite.marshaller.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.communication.*;
-import org.gridgain.grid.util.direct.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
@@ -202,8 +201,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             producers = common;
 
         msgFactory = new GridTcpMessageFactory() {
-            @Override public GridTcpCommunicationMessageAdapter create(byte type) {
-                GridTcpCommunicationMessageAdapter msg;
+            @Override public MessageAdapter create(byte type) {
+                MessageAdapter msg;
 
                 if (type < 0 || type >= producers.length)
                     msg = GridTcpCommunicationMessageFactory.create(type);
@@ -275,7 +274,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         else {
             writerFactory = new MessageWriterFactory() {
                 @Override public MessageWriter writer() {
-                    return new GridTcpCommunicationMessageWriter();
+                    return new DirectMessageWriter();
                 }
             };
         }
@@ -287,7 +286,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         else {
             readerFactory = new MessageReaderFactory() {
                 @Override public MessageReader reader() {
-                    return new GridTcpCommunicationMessageReader(msgFactory);
+                    return new DirectMessageReader(msgFactory);
                 }
             };
         }
@@ -950,7 +949,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         ClusterNode node,
         Object topic,
         int topicOrd,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc,
         boolean ordered,
         long timeout,
@@ -1001,7 +1000,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, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc)
+    public void send(UUID nodeId, Object topic, MessageAdapter msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         ClusterNode node = ctx.discovery().node(nodeId);
 
@@ -1019,7 +1018,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, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc)
+    public void send(UUID nodeId, GridTopic topic, MessageAdapter msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         ClusterNode node = ctx.discovery().node(nodeId);
 
@@ -1036,7 +1035,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, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc)
+    public void send(ClusterNode node, Object topic, MessageAdapter msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         send(node, topic, -1, msg, plc, false, 0, false);
     }
@@ -1048,7 +1047,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, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc)
+    public void send(ClusterNode node, GridTopic topic, MessageAdapter msg, GridIoPolicy plc)
         throws IgniteCheckedException {
         send(node, topic, topic.ordinal(), msg, plc, false, 0, false);
     }
@@ -1065,7 +1064,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void sendOrderedMessage(
         ClusterNode node,
         Object topic,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc,
         long timeout,
         boolean skipOnTimeout
@@ -1087,7 +1086,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void sendOrderedMessage(
         UUID nodeId,
         Object topic,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc,
         long timeout,
         boolean skipOnTimeout
@@ -1114,7 +1113,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void sendOrderedMessage(
         Collection<? extends ClusterNode> nodes,
         Object topic,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc,
         long timeout,
         boolean skipOnTimeout
@@ -1135,7 +1134,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void send(
         Collection<? extends ClusterNode> nodes,
         Object topic,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc
     ) throws IgniteCheckedException {
         send(nodes, topic, -1, msg, plc, false, 0, false);
@@ -1151,7 +1150,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void send(
         Collection<? extends ClusterNode> nodes,
         GridTopic topic,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc
     ) throws IgniteCheckedException {
         send(nodes, topic, topic.ordinal(), msg, plc, false, 0, false);
@@ -1211,7 +1210,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             depClsName = cls0.getName();
         }
 
-        GridTcpCommunicationMessageAdapter ioMsg = new GridIoUserMessage(
+        MessageAdapter ioMsg = new GridIoUserMessage(
             msg,
             serMsg,
             depClsName,
@@ -1284,7 +1283,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         Collection<? extends ClusterNode> nodes,
         Object topic,
         int topicOrd,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         GridIoPolicy plc,
         boolean ordered,
         long timeout,
@@ -1306,7 +1305,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 boolean first = true;
 
                 for (ClusterNode node : nodes) {
-                    GridTcpCommunicationMessageAdapter msg0 = first ? msg : msg.clone();
+                    MessageAdapter msg0 = first ? msg : msg.clone();
 
                     first = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 bd41580..cf908e8 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
@@ -18,9 +18,9 @@
 package org.apache.ignite.internal.managers.communication;
 
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -28,7 +28,7 @@ import java.nio.*;
 /**
  * Wrapper for all grid messages.
  */
-public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
+public class GridIoMessage extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -56,7 +56,7 @@ public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
     private boolean skipOnTimeout;
 
     /** Message. */
-    private GridTcpCommunicationMessageAdapter msg;
+    private MessageAdapter msg;
 
     /**
      * No-op constructor to support {@link Externalizable} interface.
@@ -79,7 +79,7 @@ public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
         GridIoPolicy plc,
         Object topic,
         int topicOrd,
-        GridTcpCommunicationMessageAdapter msg,
+        MessageAdapter msg,
         boolean ordered,
         long timeout,
         boolean skipOnTimeout
@@ -180,7 +180,7 @@ public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridIoMessage _clone = new GridIoMessage();
 
         clone0(_clone);
@@ -190,7 +190,7 @@ public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings("RedundantCast")
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridIoMessage _clone = (GridIoMessage)_msg;
 
         _clone.plc = plc;
@@ -200,7 +200,7 @@ public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
         _clone.ordered = ordered;
         _clone.timeout = timeout;
         _clone.skipOnTimeout = skipOnTimeout;
-        _clone.msg = msg != null ? (GridTcpCommunicationMessageAdapter)msg.clone() : null;
+        _clone.msg = msg != null ? (MessageAdapter)msg.clone() : null;
     }
 
     /** {@inheritDoc} */
@@ -270,7 +270,7 @@ public class GridIoMessage extends GridTcpCommunicationMessageAdapter {
 
         switch (commState.idx) {
             case 0:
-                msg = (GridTcpCommunicationMessageAdapter)commState.getMessage("msg");
+                msg = (MessageAdapter)commState.getMessage("msg");
 
                 if (!commState.lastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 fa1ebfa..44039a3 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
@@ -20,10 +20,10 @@ package org.apache.ignite.internal.managers.communication;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.managers.deployment.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -33,7 +33,7 @@ import java.util.*;
 /**
  * User message wrapper.
  */
-public class GridIoUserMessage extends GridTcpCommunicationMessageAdapter {
+public class GridIoUserMessage extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -204,7 +204,7 @@ public class GridIoUserMessage extends GridTcpCommunicationMessageAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridIoUserMessage _clone = new GridIoUserMessage();
 
         clone0(_clone);
@@ -213,7 +213,7 @@ public class GridIoUserMessage extends GridTcpCommunicationMessageAdapter {
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridIoUserMessage _clone = (GridIoUserMessage)_msg;
 
         _clone.body = body;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 aa1b288..d9a7d9b 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
@@ -24,13 +24,13 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.util.*;
@@ -282,7 +282,7 @@ class GridDeploymentCommunication {
      * @param topic Response topic.
      * @param res Response.
      */
-    private void sendResponse(UUID nodeId, Object topic, GridTcpCommunicationMessageAdapter res) {
+    private void sendResponse(UUID nodeId, Object topic, MessageAdapter 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());
 
-        GridTcpCommunicationMessageAdapter req = new GridDeploymentRequest(null, null, rsrcName, true);
+        MessageAdapter req = new GridDeploymentRequest(null, null, rsrcName, true);
 
         if (!rmtNodes.isEmpty()) {
             ctx.io().send(

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 5d9a104..c0698d0 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
@@ -19,10 +19,10 @@ package org.apache.ignite.internal.managers.deployment;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -31,7 +31,7 @@ import java.util.*;
 /**
  * Deployment info bean.
  */
-public class GridDeploymentInfoBean extends GridTcpCommunicationMessageAdapter implements GridDeploymentInfo,
+public class GridDeploymentInfoBean extends MessageAdapter implements GridDeploymentInfo,
     Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
@@ -139,7 +139,7 @@ public class GridDeploymentInfoBean extends GridTcpCommunicationMessageAdapter i
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridDeploymentInfoBean _clone = new GridDeploymentInfoBean();
 
         clone0(_clone);
@@ -148,7 +148,7 @@ public class GridDeploymentInfoBean extends GridTcpCommunicationMessageAdapter i
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridDeploymentInfoBean _clone = (GridDeploymentInfoBean)_msg;
 
         _clone.clsLdrId = clsLdrId;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 2a8b6dd..86019b9 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
@@ -18,10 +18,10 @@
 package org.apache.ignite.internal.managers.deployment;
 
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -30,7 +30,7 @@ import java.util.*;
 /**
  * Deployment request.
  */
-public class GridDeploymentRequest extends GridTcpCommunicationMessageAdapter {
+public class GridDeploymentRequest extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -157,7 +157,7 @@ public class GridDeploymentRequest extends GridTcpCommunicationMessageAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridDeploymentRequest _clone = new GridDeploymentRequest();
 
         clone0(_clone);
@@ -166,7 +166,7 @@ public class GridDeploymentRequest extends GridTcpCommunicationMessageAdapter {
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridDeploymentRequest _clone = (GridDeploymentRequest)_msg;
 
         _clone.resTopic = resTopic;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 d281a4f..de50cc9 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
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.managers.deployment;
 
 import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -27,7 +27,7 @@ import java.nio.*;
 /**
  * Grid deployment response containing requested resource bytes.
  */
-public class GridDeploymentResponse extends GridTcpCommunicationMessageAdapter {
+public class GridDeploymentResponse extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -107,7 +107,7 @@ public class GridDeploymentResponse extends GridTcpCommunicationMessageAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridDeploymentResponse _clone = new GridDeploymentResponse();
 
         clone0(_clone);
@@ -116,7 +116,7 @@ public class GridDeploymentResponse extends GridTcpCommunicationMessageAdapter {
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridDeploymentResponse _clone = (GridDeploymentResponse)_msg;
 
         _clone.success = success;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 5b0c62f..1658b88 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
@@ -20,10 +20,10 @@ package org.apache.ignite.internal.managers.eventstorage;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.jetbrains.annotations.*;
 
 import java.nio.*;
@@ -32,7 +32,7 @@ import java.util.*;
 /**
  * Event storage message.
  */
-public class GridEventStorageMessage extends GridTcpCommunicationMessageAdapter {
+public class GridEventStorageMessage extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -262,7 +262,7 @@ public class GridEventStorageMessage extends GridTcpCommunicationMessageAdapter
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridEventStorageMessage _clone = new GridEventStorageMessage();
 
         clone0(_clone);
@@ -271,7 +271,7 @@ public class GridEventStorageMessage extends GridTcpCommunicationMessageAdapter
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridEventStorageMessage _clone = (GridEventStorageMessage)_msg;
 
         _clone.resTopic = resTopic;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
index 9059d75..bb63b86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
@@ -20,11 +20,11 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -141,7 +141,7 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCacheEvictionRequest _clone = new GridCacheEvictionRequest();
 
         clone0(_clone);
@@ -150,7 +150,7 @@ public class GridCacheEvictionRequest<K, V> extends GridCacheMessage<K, V> imple
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCacheEvictionRequest _clone = (GridCacheEvictionRequest)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
index 8bf52d7..8199020 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
@@ -19,9 +19,9 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -130,7 +130,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCacheEvictionResponse _clone = new GridCacheEvictionResponse();
 
         clone0(_clone);
@@ -139,7 +139,7 @@ public class GridCacheEvictionResponse<K, V> extends GridCacheMessage<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCacheEvictionResponse _clone = (GridCacheEvictionResponse)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 eb29297..78028b0 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
@@ -22,11 +22,11 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.managers.deployment.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.jetbrains.annotations.*;
 
 import java.nio.*;
@@ -36,7 +36,7 @@ import java.util.concurrent.atomic.*;
 /**
  * Parent of all cache messages.
  */
-public abstract class GridCacheMessage<K, V> extends GridTcpCommunicationMessageAdapter {
+public abstract class GridCacheMessage<K, V> extends MessageAdapter {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -644,7 +644,7 @@ public abstract class GridCacheMessage<K, V> extends GridTcpCommunicationMessage
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         GridCacheMessage _clone = (GridCacheMessage)_msg;
 
         _clone.msgId = msgId;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/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 4fc23a4..aba1c18 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
@@ -18,12 +18,15 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.jetbrains.annotations.*;
 
+import java.nio.*;
+
 /**
  * Wrapped value bytes of cache entry.
  */
-public class GridCacheValueBytes {
+public class GridCacheValueBytes extends MessageAdapter {
     /** Null instance. */
     private static final GridCacheValueBytes NULL = new GridCacheValueBytes();
 
@@ -114,6 +117,31 @@ public class GridCacheValueBytes {
     }
 
     /** {@inheritDoc} */
+    @Override public boolean writeTo(ByteBuffer buf) {
+        return false; // TODO: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean readFrom(ByteBuffer buf) {
+        return false; // TODO: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte directType() {
+        return 0; // TODO: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public MessageAdapter clone() {
+        return null; // TODO: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void clone0(MessageAdapter _msg) {
+        // TODO: implement.
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridCacheValueBytes.class, this, "len", bytes != null ? bytes.length : -1);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
index 5d2de37..e021408 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
@@ -19,9 +19,9 @@ package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -98,7 +98,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCacheOptimisticCheckPreparedTxRequest _clone = new GridCacheOptimisticCheckPreparedTxRequest();
 
         clone0(_clone);
@@ -107,7 +107,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCacheOptimisticCheckPreparedTxRequest _clone = (GridCacheOptimisticCheckPreparedTxRequest)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
index d3ae3f7..bba1efb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxResponse.java
@@ -18,9 +18,9 @@
 package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -86,7 +86,7 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCacheOptimisticCheckPreparedTxResponse _clone = new GridCacheOptimisticCheckPreparedTxResponse();
 
         clone0(_clone);
@@ -95,7 +95,7 @@ public class GridCacheOptimisticCheckPreparedTxResponse<K, V> extends GridDistri
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCacheOptimisticCheckPreparedTxResponse _clone = (GridCacheOptimisticCheckPreparedTxResponse)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
index 9fe4cfb..4eb5624 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
@@ -20,9 +20,9 @@ package org.apache.ignite.internal.processors.cache.distributed;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.io.*;
 import java.nio.*;
@@ -131,7 +131,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCachePessimisticCheckCommittedTxRequest _clone = new GridCachePessimisticCheckCommittedTxRequest();
 
         clone0(_clone);
@@ -140,7 +140,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCachePessimisticCheckCommittedTxRequest _clone = (GridCachePessimisticCheckCommittedTxRequest)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
index 41e28ca..68495f3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxResponse.java
@@ -21,9 +21,9 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -117,7 +117,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntCallSuperClone", "CloneCallsConstructors"})
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCachePessimisticCheckCommittedTxResponse _clone = new GridCachePessimisticCheckCommittedTxResponse();
 
         clone0(_clone);
@@ -126,7 +126,7 @@ public class GridCachePessimisticCheckCommittedTxResponse<K, V> extends GridDist
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCachePessimisticCheckCommittedTxResponse _clone = (GridCachePessimisticCheckCommittedTxResponse)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
index d860411..f8f9870 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
@@ -21,9 +21,9 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.nio.*;
 import java.util.*;
@@ -185,7 +185,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
 
     /** {@inheritDoc} */
     @SuppressWarnings("CloneDoesntCallSuperClone")
-    @Override public GridTcpCommunicationMessageAdapter clone() {
+    @Override public MessageAdapter clone() {
         GridCacheTtlUpdateRequest _clone = new GridCacheTtlUpdateRequest();
 
         clone0(_clone);
@@ -483,7 +483,7 @@ public class GridCacheTtlUpdateRequest<K, V> extends GridCacheMessage<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridCacheTtlUpdateRequest _clone = (GridCacheTtlUpdateRequest)_msg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/415902ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
index 812ed18..55e5250 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
@@ -21,9 +21,9 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -240,7 +240,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
     }
 
     /** {@inheritDoc} */
-    @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) {
+    @Override protected void clone0(MessageAdapter _msg) {
         super.clone0(_msg);
 
         GridDistributedBaseMessage _clone = (GridDistributedBaseMessage)_msg;


Mime
View raw message