You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/11/24 10:18:12 UTC

[01/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-1282' into ignite-1282

Repository: ignite
Updated Branches:
  refs/heads/master a144b844a -> c88ab6ffe


Merge remote-tracking branch 'origin/ignite-1282' into ignite-1282


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

Branch: refs/heads/master
Commit: 0d56b41ca0beee7929a2bd02293b84f42f34b8eb
Parents: 462f833 c505f48
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Nov 20 13:01:58 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Nov 20 13:01:58 2015 +0300

----------------------------------------------------------------------
 .../config/binary/example-ignite-binary.xml     |   2 +-
 .../java/org/apache/ignite/IgniteBinary.java    |   9 +-
 .../java/org/apache/ignite/IgniteCache.java     |   3 +-
 .../apache/ignite/binary/BinaryIdMapper.java    |   4 +-
 .../org/apache/ignite/binary/BinaryObject.java  |   5 +-
 .../apache/ignite/binary/BinarySerializer.java  |   4 +-
 .../ignite/binary/BinaryTypeConfiguration.java  |  47 +--
 .../configuration/BinaryConfiguration.java      | 139 +++++++
 .../configuration/IgniteConfiguration.java      |  29 +-
 .../apache/ignite/internal/IgniteKernal.java    |   7 +-
 .../internal/portable/BinaryObjectImpl.java     |  11 +-
 .../portable/PortableClassDescriptor.java       |  16 +-
 .../internal/portable/PortableContext.java      |  85 ++--
 .../processors/cache/GridCacheProcessor.java    |   4 +-
 .../CacheObjectBinaryProcessorImpl.java         |  17 +-
 .../cache/store/CacheOsStoreManager.java        |   4 +-
 .../cpp/PlatformCppConfigurationClosure.java    |  30 +-
 .../PlatformDotNetConfigurationClosure.java     |  34 +-
 .../marshaller/portable/BinaryMarshaller.java   | 146 +++++++
 .../marshaller/portable/PortableMarshaller.java | 299 --------------
 .../resources/META-INF/classnames.properties    |  31 +-
 .../portable/BinaryFieldsAbstractSelfTest.java  |  33 +-
 .../portable/BinaryFieldsHeapSelfTest.java      |   4 +-
 .../portable/BinaryFieldsOffheapSelfTest.java   |   4 +-
 .../BinaryFooterOffsetsAbstractSelfTest.java    |  27 +-
 .../BinaryFooterOffsetsHeapSelfTest.java        |   4 +-
 .../BinaryFooterOffsetsOffheapSelfTest.java     |   4 +-
 .../portable/BinaryMarshallerSelfTest.java      | 402 +++++++------------
 .../BinaryObjectBuilderAdditionalSelfTest.java  |  13 +-
 .../portable/BinaryObjectBuilderSelfTest.java   |  43 +-
 .../GridPortableAffinityKeySelfTest.java        |  13 +-
 ...idPortableMarshallerCtxDisabledSelfTest.java |  10 +-
 .../portable/GridPortableMetaDataSelfTest.java  |  13 +-
 .../portable/GridPortableWildcardsSelfTest.java | 243 ++++++-----
 .../BinaryFieldsHeapNonCompactSelfTest.java     |   4 -
 ...IgniteCacheAbstractExecutionContextTest.java |   4 +-
 .../IgniteCacheTxExecutionContextTest.java      |   2 -
 ...naryObjectsAbstractDataStreamerSelfTest.java |  10 +-
 ...aryObjectsAbstractMultiThreadedSelfTest.java |  10 +-
 .../GridCacheBinaryObjectsAbstractSelfTest.java |   4 +-
 ...ntNodeBinaryObjectMetadataMultinodeTest.java |   4 +-
 ...CacheClientNodeBinaryObjectMetadataTest.java |  19 +-
 .../GridCachePortableStoreAbstractSelfTest.java |  11 +-
 ...ridPortableCacheEntryMemorySizeSelfTest.java |  10 +-
 ...leDuplicateIndexObjectsAbstractSelfTest.java |  11 +-
 .../DataStreamProcessorPortableSelfTest.java    |   4 +-
 .../GridDataStreamerImplSelfTest.java           |   4 +-
 ...ridCacheAffinityRoutingPortableSelfTest.java |  13 +-
 .../GridCacheMemoryModePortableSelfTest.java    |   4 +-
 ...acheOffHeapTieredAtomicPortableSelfTest.java |   9 +-
 ...eapTieredEvictionAtomicPortableSelfTest.java |   9 +-
 ...heOffHeapTieredEvictionPortableSelfTest.java |   9 +-
 .../GridCacheOffHeapTieredPortableSelfTest.java |   9 +-
 ...sNearPartitionedByteArrayValuesSelfTest.java |   4 +-
 ...sPartitionedOnlyByteArrayValuesSelfTest.java |   4 +-
 .../IgnitePortableCacheFullApiTestSuite.java    |   4 +-
 .../IgnitePortableCacheTestSuite.java           |   4 +-
 .../IgnitePortableObjectsTestSuite.java         |   2 +-
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |   6 +-
 .../IgnitePortableCacheQueryTestSuite.java      |   4 +-
 .../Config/Compute/compute-grid1.xml            |  46 ++-
 .../Config/marshaller-explicit.xml              |   8 +-
 62 files changed, 925 insertions(+), 1046 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0d56b41c/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
----------------------------------------------------------------------


[41/50] [abbrv] ignite git commit: IGNITE-1972: Optimized "unmarshal" path (i.e. when we do not need to deserialize the object) by a factor of x3.

Posted by sb...@apache.org.
IGNITE-1972: Optimized "unmarshal" path (i.e. when we do not need to deserialize the object) by a factor of x3.


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

Branch: refs/heads/master
Commit: c6b2fa56ff232d92a0f6770ef8b66b871be90905
Parents: 19d2dd0
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Nov 23 16:31:18 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 23 16:31:18 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryObjectImpl.java     |   32 +-
 .../portable/BinaryObjectOffheapImpl.java       |   27 +-
 .../internal/portable/BinaryReaderExImpl.java   | 1015 ++----------------
 .../portable/BinaryReaderHandlesHolder.java     |   46 +
 .../portable/BinaryReaderHandlesHolderImpl.java |   44 +
 .../portable/GridPortableMarshaller.java        |   23 +-
 .../portable/PortableClassDescriptor.java       |    8 +-
 .../ignite/internal/portable/PortableUtils.java |  861 ++++++++++++++-
 .../portable/builder/PortableBuilderReader.java |   21 +-
 .../platform/PlatformContextImpl.java           |    4 +-
 10 files changed, 1099 insertions(+), 982 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
index 65272b0..7db4b4a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
@@ -18,6 +18,9 @@
 package org.apache.ignite.internal.portable;
 
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.binary.BinaryObject;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.IgniteCodeGeneratingFail;
 import org.apache.ignite.internal.portable.streams.PortableHeapInputStream;
@@ -26,12 +29,8 @@ import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.portable.CacheObjectBinaryProcessorImpl;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryType;
-import org.apache.ignite.binary.BinaryObject;
 import org.jetbrains.annotations.Nullable;
 
 import java.io.Externalizable;
@@ -254,13 +253,13 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override public <F> F field(String fieldName) throws BinaryObjectException {
-        return (F)newReader().unmarshalField(fieldName);
+        return (F) reader(null).unmarshalField(fieldName);
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override public <F> F field(int fieldId) throws BinaryObjectException {
-        return (F)newReader().unmarshalField(fieldId);
+        return (F) reader(null).unmarshalField(fieldId);
     }
 
     /** {@inheritDoc} */
@@ -394,10 +393,7 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
                 break;
 
             default:
-                BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, fieldPos),
-                    null, new BinaryReaderHandles());
-
-                val = reader.unmarshal();
+                val = PortableUtils.unmarshal(PortableHeapInputStream.create(arr, fieldPos), ctx, null);
 
                 break;
         }
@@ -408,14 +404,12 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override protected <F> F field(BinaryReaderHandles rCtx, String fieldName) {
-        BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, start), null, rCtx);
-
-        return (F)reader.unmarshalField(fieldName);
+        return (F)reader(rCtx).unmarshalField(fieldName);
     }
 
     /** {@inheritDoc} */
     @Override public boolean hasField(String fieldName) {
-        return newReader().findFieldByName(fieldName);
+        return reader(null).findFieldByName(fieldName);
     }
 
     /** {@inheritDoc} */
@@ -427,7 +421,6 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
             obj0 = deserializeValue(null);
 
         return (T)obj0;
-
     }
 
     /** {@inheritDoc} */
@@ -447,7 +440,7 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
 
     /** {@inheritDoc} */
     @Override protected PortableSchema createSchema() {
-        return newReader().getOrCreateSchema();
+        return reader(null).getOrCreateSchema();
     }
 
     /** {@inheritDoc} */
@@ -556,7 +549,7 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
      */
     private Object deserializeValue(@Nullable CacheObjectContext coCtx) {
         // TODO: IGNITE-1272 - Deserialize with proper class loader.
-        BinaryReaderExImpl reader = newReader();
+        BinaryReaderExImpl reader = reader(null);
 
         Object obj0 = reader.deserialize();
 
@@ -573,9 +566,10 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
     /**
      * Create new reader for this object.
      *
+     * @param rCtx Reader context.
      * @return Reader.
      */
-    private BinaryReaderExImpl newReader() {
-        return new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, start), null, new BinaryReaderHandles());
+    private BinaryReaderExImpl reader(@Nullable BinaryReaderHandles rCtx) {
+        return new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, start), null, rCtx);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
index 1db3470..8b8e0e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
@@ -129,7 +129,7 @@ public class BinaryObjectOffheapImpl extends BinaryObjectEx implements Externali
 
     /** {@inheritDoc} */
     @Override protected PortableSchema createSchema() {
-        return newReader().getOrCreateSchema();
+        return reader(null).getOrCreateSchema();
     }
 
     /** {@inheritDoc} */
@@ -163,13 +163,13 @@ public class BinaryObjectOffheapImpl extends BinaryObjectEx implements Externali
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override public <F> F field(String fieldName) throws BinaryObjectException {
-        return (F)newReader().unmarshalField(fieldName);
+        return (F) reader(null).unmarshalField(fieldName);
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override public <F> F field(int fieldId) throws BinaryObjectException {
-        return (F)newReader().unmarshalField(fieldId);
+        return (F) reader(null).unmarshalField(fieldId);
     }
 
     /** {@inheritDoc} */
@@ -308,9 +308,7 @@ public class BinaryObjectOffheapImpl extends BinaryObjectEx implements Externali
 
                 stream.position(fieldPos);
 
-                BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, stream, null, new BinaryReaderHandles());
-
-                val = reader.unmarshal();
+                val = PortableUtils.unmarshal(stream, ctx, null);
 
                 break;
         }
@@ -321,18 +319,12 @@ public class BinaryObjectOffheapImpl extends BinaryObjectEx implements Externali
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override protected <F> F field(BinaryReaderHandles rCtx, String fieldName) {
-        PortableOffheapInputStream stream = new PortableOffheapInputStream(ptr, size, false);
-
-        stream.position(start);
-
-        BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, stream, null, rCtx);
-
-        return (F)reader.unmarshalField(fieldName);
+        return (F)reader(rCtx).unmarshalField(fieldName);
     }
 
     /** {@inheritDoc} */
     @Override public boolean hasField(String fieldName) {
-        return newReader().findFieldByName(fieldName);
+        return reader(null).findFieldByName(fieldName);
     }
 
     /** {@inheritDoc} */
@@ -418,19 +410,20 @@ public class BinaryObjectOffheapImpl extends BinaryObjectEx implements Externali
      */
     private Object deserializeValue() {
         // TODO: IGNITE-1272 - Deserialize with proper class loader.
-        return newReader().deserialize();
+        return reader(null).deserialize();
     }
 
     /**
      * Create new reader for this object.
      *
+     * @param rCtx Reader context.
      * @return Reader.
      */
-    private BinaryReaderExImpl newReader() {
+    private BinaryReaderExImpl reader(@Nullable BinaryReaderHandles rCtx) {
         PortableOffheapInputStream stream = new PortableOffheapInputStream(ptr, size, false);
 
         stream.position(start);
 
-        return new BinaryReaderExImpl(ctx, stream, null, new BinaryReaderHandles());
+        return new BinaryReaderExImpl(ctx, stream, null, rCtx);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
index a2e18b4..4809c3c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.portable;
 
-import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.binary.BinaryIdMapper;
 import org.apache.ignite.binary.BinaryInvalidTypeException;
 import org.apache.ignite.binary.BinaryObject;
@@ -25,36 +24,20 @@ import org.apache.ignite.binary.BinaryObjectException;
 import org.apache.ignite.binary.BinaryRawReader;
 import org.apache.ignite.binary.BinaryReader;
 import org.apache.ignite.internal.portable.streams.PortableInputStream;
-import org.apache.ignite.internal.util.lang.GridMapEntry;
 import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-import java.io.ByteArrayInputStream;
 import java.io.EOFException;
 import java.io.IOException;
 import java.io.ObjectInput;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
-import java.math.BigInteger;
 import java.sql.Timestamp;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
-import java.util.LinkedList;
 import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
-import java.util.TreeSet;
 import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentSkipListSet;
 
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.ARR_LIST;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.BOOLEAN;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.BOOLEAN_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.BYTE;
@@ -63,8 +46,6 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.CHAR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.CHAR_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.CLASS;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.COL;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.CONC_HASH_MAP;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.CONC_SKIP_LIST_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.DATE;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.DATE_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.DECIMAL;
@@ -77,35 +58,24 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.ENUM_AR
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.FLOAT;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.FLOAT_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.HANDLE;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.HASH_MAP;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.HASH_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.INT;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.INT_ARR;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_HASH_MAP;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_HASH_SET;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_LIST;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.LONG;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.LONG_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.MAP;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.MAP_ENTRY;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.NULL;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJ;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJECT_TYPE_ID;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJ_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.OPTM_MARSH;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.PORTABLE_OBJ;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.PROPERTIES_MAP;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.SHORT;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.SHORT_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.STRING;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.STRING_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.TIMESTAMP;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.TIMESTAMP_ARR;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.TREE_MAP;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.TREE_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.UNREGISTERED_TYPE_ID;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.USER_COL;
-import static org.apache.ignite.internal.portable.GridPortableMarshaller.USER_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.UUID;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.UUID_ARR;
 
@@ -113,7 +83,7 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.UUID_AR
  * Portable reader implementation.
  */
 @SuppressWarnings("unchecked")
-public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, ObjectInput {
+public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, BinaryReaderHandlesHolder, ObjectInput {
     /** Portable context. */
     private final PortableContext ctx;
 
@@ -124,7 +94,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     private final ClassLoader ldr;
 
     /** Reader context which is constantly passed between objects. */
-    private final BinaryReaderHandles rCtx;
+    private BinaryReaderHandles hnds;
 
     /** */
     private final int start;
@@ -177,14 +147,26 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @param ctx Context.
      * @param in Input stream.
      * @param ldr Class loader.
-     * @param rCtx Context.
      */
-    public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr, BinaryReaderHandles rCtx) {
+    public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr) {
+        this(ctx, in, ldr, null);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param ctx Context.
+     * @param in Input stream.
+     * @param ldr Class loader.
+     * @param hnds Context.
+     */
+    public BinaryReaderExImpl(PortableContext ctx, PortableInputStream in, ClassLoader ldr,
+        @Nullable BinaryReaderHandles hnds) {
         // Initialize base members.
         this.ctx = ctx;
         this.in = in;
         this.ldr = ldr;
-        this.rCtx = rCtx;
+        this.hnds = hnds;
 
         start = in.position();
 
@@ -240,7 +222,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 int off = in.position();
 
                 // Registers class by type ID, at least locally if the cache is not ready yet.
-                typeId = ctx.descriptorForClass(doReadClass(typeId0)).typeId();
+                typeId = ctx.descriptorForClass(PortableUtils.doReadClass(in, ctx, ldr, typeId0)).typeId();
 
                 int clsNameLen = in.position() - off;
 
@@ -256,9 +238,9 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             schema = PortableUtils.hasSchema(flags) ? getOrCreateSchema() : null;
         }
         else {
+            dataStart = 0;
             typeId = 0;
             rawOff = 0;
-            dataStart = 0;
             footerStart = 0;
             footerLen = 0;
             idMapper = null;
@@ -273,10 +255,10 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
-     * @return Handles.
+     * @return Input stream.
      */
-    public BinaryReaderHandles handles() {
-        return rCtx;
+    public PortableInputStream in() {
+        return in;
     }
 
     /**
@@ -287,14 +269,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
-     * @return Unmarshalled value.
-     * @throws BinaryObjectException In case of error.
-     */
-    @Nullable Object unmarshal() throws BinaryObjectException {
-        return unmarshal(false);
-    }
-
-    /**
      * @param offset Offset in the array.
      * @return Unmarshalled value.
      * @throws BinaryObjectException In case of error.
@@ -302,7 +276,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     public Object unmarshal(int offset) throws BinaryObjectException {
         streamPosition(offset);
 
-        return in.position() >= 0 ? unmarshal() : null;
+        return in.position() >= 0 ? PortableUtils.unmarshal(in, ctx, ldr, this) : null;
     }
 
     /**
@@ -311,7 +285,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @throws BinaryObjectException In case of error.
      */
     @Nullable Object unmarshalField(String fieldName) throws BinaryObjectException {
-        return findFieldByName(fieldName) ? unmarshal() : null;
+        return findFieldByName(fieldName) ? PortableUtils.unmarshal(in, ctx, ldr, this) : null;
     }
 
     /**
@@ -320,7 +294,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @throws BinaryObjectException In case of error.
      */
     @Nullable Object unmarshalField(int fieldId) throws BinaryObjectException {
-        return findFieldById(fieldId) ? unmarshal() : null;
+        return findFieldById(fieldId) ? PortableUtils.unmarshal(in, ctx, ldr, this) : null;
     }
 
     /**
@@ -333,7 +307,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             Flag flag = checkFlag(MAP_ENTRY);
 
             if (flag == Flag.NORMAL)
-                return doReadMapEntry(true);
+                return PortableUtils.doReadMapEntry(in, ctx, ldr, this, true);
             else if (flag == Flag.HANDLE)
                 return readHandleField();
         }
@@ -351,7 +325,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             if (checkFlag(PORTABLE_OBJ) == Flag.NULL)
                 return null;
 
-            return new BinaryObjectImpl(ctx, doReadByteArray(), in.readInt());
+            return new BinaryObjectImpl(ctx, PortableUtils.doReadByteArray(in), in.readInt());
         }
         else
             return null;
@@ -367,7 +341,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             if (checkFlag(CLASS) == Flag.NULL)
                 return null;
 
-            return doReadClass();
+            return PortableUtils.doReadClass(in, ctx, ldr);
         }
 
         return null;
@@ -376,16 +350,26 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     /**
      * @param obj Object.
      */
-    void setHandler(Object obj) {
-        setHandler(obj, start);
+    void setHandle(Object obj) {
+        setHandle(obj, start);
     }
 
-    /**
-     * @param obj Object.
-     * @param pos Position.
-     */
-    void setHandler(Object obj, int pos) {
-        rCtx.put(pos, obj);
+    /** {@inheritDoc} */
+    @Override public void setHandle(Object obj, int pos) {
+        handles().put(pos, obj);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Object getHandle(int pos) {
+        return hnds != null ? hnds.get(pos) : null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public BinaryReaderHandles handles() {
+        if (hnds == null)
+            hnds = new BinaryReaderHandles();
+
+        return hnds;
     }
 
     /**
@@ -395,16 +379,16 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @return Field.
      */
     private <T> T readHandleField() {
-        int handlePos = positionForHandle() - in.readInt();
+        int handlePos = PortableUtils.positionForHandle(in) - in.readInt();
 
-        Object obj = rCtx.get(handlePos);
+        Object obj = getHandle(handlePos);
 
         if (obj == null) {
             int retPos = in.position();
 
             streamPosition(handlePos);
 
-            obj = doReadObject();
+            obj = PortableUtils.doReadObject(in, ctx, ldr, this);
 
             streamPosition(retPos);
         }
@@ -457,7 +441,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public byte[] readByteArray() throws BinaryObjectException {
         switch (checkFlag(BYTE_ARR)) {
             case NORMAL:
-                return doReadByteArray();
+                return PortableUtils.doReadByteArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -513,7 +497,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public boolean[] readBooleanArray() throws BinaryObjectException {
         switch (checkFlag(BOOLEAN_ARR)) {
             case NORMAL:
-                return doReadBooleanArray();
+                return PortableUtils.doReadBooleanArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -569,7 +553,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public short[] readShortArray() throws BinaryObjectException {
         switch (checkFlag(SHORT_ARR)) {
             case NORMAL:
-                return doReadShortArray();
+                return PortableUtils.doReadShortArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -625,7 +609,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public char[] readCharArray() throws BinaryObjectException {
         switch (checkFlag(CHAR_ARR)) {
             case NORMAL:
-                return doReadCharArray();
+                return PortableUtils.doReadCharArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -681,7 +665,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public int[] readIntArray() throws BinaryObjectException {
         switch (checkFlag(INT_ARR)) {
             case NORMAL:
-                return doReadIntArray();
+                return PortableUtils.doReadIntArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -737,7 +721,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public long[] readLongArray() throws BinaryObjectException {
         switch (checkFlag(LONG_ARR)) {
             case NORMAL:
-                return doReadLongArray();
+                return PortableUtils.doReadLongArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -793,7 +777,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public float[] readFloatArray() throws BinaryObjectException {
         switch (checkFlag(FLOAT_ARR)) {
             case NORMAL:
-                return doReadFloatArray();
+                return PortableUtils.doReadFloatArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -849,7 +833,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public double[] readDoubleArray() throws BinaryObjectException {
         switch (checkFlag(DOUBLE_ARR)) {
             case NORMAL:
-                return doReadDoubleArray();
+                return PortableUtils.doReadDoubleArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -875,7 +859,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override @Nullable public BigDecimal readDecimal() throws BinaryObjectException {
-        return checkFlagNoHandles(DECIMAL) == Flag.NORMAL ? doReadDecimal() : null;
+        return checkFlagNoHandles(DECIMAL) == Flag.NORMAL ? PortableUtils.doReadDecimal(in) : null;
     }
 
     /** {@inheritDoc} */
@@ -896,7 +880,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Override @Nullable public BigDecimal[] readDecimalArray() throws BinaryObjectException {
         switch (checkFlag(DECIMAL_ARR)) {
             case NORMAL:
-                return doReadDecimalArray();
+                return PortableUtils.doReadDecimalArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -922,7 +906,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override @Nullable public String readString() throws BinaryObjectException {
-        return checkFlagNoHandles(STRING) == Flag.NORMAL ? doReadString() : null;
+        return checkFlagNoHandles(STRING) == Flag.NORMAL ? PortableUtils.doReadString(in) : null;
     }
 
     /** {@inheritDoc} */
@@ -943,7 +927,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Override @Nullable public String[] readStringArray() throws BinaryObjectException {
         switch (checkFlag(STRING_ARR)) {
             case NORMAL:
-                return doReadStringArray();
+                return PortableUtils.doReadStringArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -969,7 +953,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override @Nullable public UUID readUuid() throws BinaryObjectException {
-        return checkFlagNoHandles(UUID) == Flag.NORMAL ? doReadUuid() : null;
+        return checkFlagNoHandles(UUID) == Flag.NORMAL ? PortableUtils.doReadUuid(in) : null;
     }
 
     /** {@inheritDoc} */
@@ -990,7 +974,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Override @Nullable public UUID[] readUuidArray() throws BinaryObjectException {
         switch (checkFlag(UUID_ARR)) {
             case NORMAL:
-                return doReadUuidArray();
+                return PortableUtils.doReadUuidArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -1016,7 +1000,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override @Nullable public Date readDate() throws BinaryObjectException {
-        return checkFlagNoHandles(DATE) == Flag.NORMAL ? doReadDate() : null;
+        return checkFlagNoHandles(DATE) == Flag.NORMAL ? PortableUtils.doReadDate(in) : null;
     }
 
     /** {@inheritDoc} */
@@ -1037,7 +1021,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Override @Nullable public Date[] readDateArray() throws BinaryObjectException {
         switch (checkFlag(DATE_ARR)) {
             case NORMAL:
-                return doReadDateArray();
+                return PortableUtils.doReadDateArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -1063,7 +1047,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override @Nullable public Timestamp readTimestamp() throws BinaryObjectException {
-        return checkFlagNoHandles(TIMESTAMP) == Flag.NORMAL ? doReadTimestamp() : null;
+        return checkFlagNoHandles(TIMESTAMP) == Flag.NORMAL ? PortableUtils.doReadTimestamp(in) : null;
     }
 
     /** {@inheritDoc} */
@@ -1084,7 +1068,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Override @Nullable public Timestamp[] readTimestampArray() throws BinaryObjectException {
         switch (checkFlag(TIMESTAMP_ARR)) {
             case NORMAL:
-                return doReadTimestampArray();
+                return PortableUtils.doReadTimestampArray(in);
 
             case HANDLE:
                 return readHandleField();
@@ -1097,7 +1081,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Nullable @Override public <T> T readObject(String fieldName) throws BinaryObjectException {
-        return findFieldByName(fieldName) ? (T)doReadObject() : null;
+        return findFieldByName(fieldName) ? (T)PortableUtils.doReadObject(in, ctx, ldr, this) : null;
     }
 
     /**
@@ -1106,17 +1090,17 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @throws BinaryObjectException In case of error.
      */
     @Nullable Object readObject(int fieldId) throws BinaryObjectException {
-        return findFieldById(fieldId) ? doReadObject() : null;
+        return findFieldById(fieldId) ? PortableUtils.doReadObject(in, ctx, ldr, this) : null;
     }
 
     /** {@inheritDoc} */
     @Override public Object readObject() throws BinaryObjectException {
-        return doReadObject();
+        return PortableUtils.doReadObject(in, ctx, ldr, this);
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public Object readObjectDetached() throws BinaryObjectException {
-        return unmarshal(true);
+        return PortableUtils.unmarshal(in, ctx, ldr, this, true);
     }
 
     /** {@inheritDoc} */
@@ -1137,7 +1121,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Nullable @Override public Object[] readObjectArray() throws BinaryObjectException {
         switch (checkFlag(OBJ_ARR)) {
             case NORMAL:
-                return doReadObjectArray(true);
+                return PortableUtils.doReadObjectArray(in, ctx, ldr, this, true);
 
             case HANDLE:
                 return readHandleField();
@@ -1177,12 +1161,12 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     private Enum<?> readEnum0(@Nullable Class<?> cls) throws BinaryObjectException {
         if (checkFlagNoHandles(ENUM) == Flag.NORMAL) {
             // Read class even if we know it in advance to set correct stream position.
-            Class<?> cls0 = doReadClass();
+            Class<?> cls0 = PortableUtils.doReadClass(in, ctx, ldr);
 
             if (cls == null)
                 cls = cls0;
 
-            return doReadEnum(cls);
+            return PortableUtils.doReadEnum(in, cls);
         }
         else
             return null;
@@ -1220,12 +1204,12 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
         switch (checkFlag(ENUM_ARR)) {
             case NORMAL:
                 // Read class even if we know it in advance to set correct stream position.
-                Class<?> cls0 = doReadClass();
+                Class<?> cls0 = PortableUtils.doReadClass(in, ctx, ldr);
 
                 if (cls == null)
                     cls = cls0;
 
-                return doReadEnumArray(cls);
+                return PortableUtils.doReadEnumArray(in, ctx, ldr, cls);
 
             case HANDLE:
                 return readHandleField();
@@ -1279,7 +1263,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
         throws BinaryObjectException {
         switch (checkFlag(COL)) {
             case NORMAL:
-                return (Collection)doReadCollection(true, cls);
+                return (Collection)PortableUtils.doReadCollection(in, ctx, ldr, this, true, cls);
 
             case HANDLE:
                 return readHandleField();
@@ -1331,7 +1315,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     private Map readMap0(@Nullable Class<? extends Map> cls) throws BinaryObjectException {
         switch (checkFlag(MAP)) {
             case NORMAL:
-                return (Map)doReadMap(true, cls);
+                return (Map)PortableUtils.doReadMap(in, ctx, ldr, this, true, cls);
 
             case HANDLE:
                 return readHandleField();
@@ -1358,7 +1342,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
         else if (flag == HANDLE)
             return Flag.HANDLE;
 
-        int pos = positionForHandle();
+        int pos = PortableUtils.positionForHandle(in);
 
         throw new BinaryObjectException("Unexpected flag value [pos=" + pos + ", expected=" + expFlag +
             ", actual=" + flag + ']');
@@ -1379,7 +1363,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
         else if (flag == NULL)
             return Flag.NULL;
 
-        int pos = positionForHandle();
+        int pos = PortableUtils.positionForHandle(in);
 
         throw new BinaryObjectException("Unexpected flag value [pos=" + pos + ", expected=" + expFlag +
             ", actual=" + flag + ']');
@@ -1399,252 +1383,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
-     * @return Unmarshalled value.
-     * @throws BinaryObjectException In case of error.
-     */
-    @Nullable private Object unmarshal(boolean detach) throws BinaryObjectException {
-        int start = in.position();
-
-        byte flag = in.readByte();
-
-        switch (flag) {
-            case NULL:
-                return null;
-
-            case HANDLE: {
-                int handlePos = start - in.readInt();
-
-                Object obj = rCtx.get(handlePos);
-
-                if (obj == null) {
-                    int retPos = in.position();
-
-                    streamPosition(handlePos);
-
-                    obj = unmarshal();
-
-                    streamPosition(retPos);
-                }
-
-                return obj;
-            }
-
-            case OBJ: {
-                PortableUtils.checkProtocolVersion(in.readByte());
-
-                int len = PortableUtils.length(in, start);
-
-                BinaryObjectEx po;
-
-                if (detach) {
-                    // In detach mode we simply copy object's content.
-                    streamPosition(start);
-
-                    po = new BinaryObjectImpl(ctx, in.readByteArray(len), 0);
-                }
-                else {
-                    if (in.offheapPointer() == 0)
-                        po = new BinaryObjectImpl(ctx, in.array(), start);
-                    else
-                        po = new BinaryObjectOffheapImpl(ctx, in.offheapPointer(), start,
-                            in.remaining() + in.position());
-
-                    streamPosition(start + po.length());
-                }
-
-                rCtx.put(start, po);
-
-                return po;
-            }
-
-            case BYTE:
-                return in.readByte();
-
-            case SHORT:
-                return in.readShort();
-
-            case INT:
-                return in.readInt();
-
-            case LONG:
-                return in.readLong();
-
-            case FLOAT:
-                return in.readFloat();
-
-            case DOUBLE:
-                return in.readDouble();
-
-            case CHAR:
-                return in.readChar();
-
-            case BOOLEAN:
-                return in.readBoolean();
-
-            case DECIMAL:
-                return doReadDecimal();
-
-            case STRING:
-                return doReadString();
-
-            case UUID:
-                return doReadUuid();
-
-            case DATE:
-                return doReadDate();
-
-            case TIMESTAMP:
-                return doReadTimestamp();
-
-            case BYTE_ARR:
-                return doReadByteArray();
-
-            case SHORT_ARR:
-                return doReadShortArray();
-
-            case INT_ARR:
-                return doReadIntArray();
-
-            case LONG_ARR:
-                return doReadLongArray();
-
-            case FLOAT_ARR:
-                return doReadFloatArray();
-
-            case DOUBLE_ARR:
-                return doReadDoubleArray();
-
-            case CHAR_ARR:
-                return doReadCharArray();
-
-            case BOOLEAN_ARR:
-                return doReadBooleanArray();
-
-            case DECIMAL_ARR:
-                return doReadDecimalArray();
-
-            case STRING_ARR:
-                return doReadStringArray();
-
-            case UUID_ARR:
-                return doReadUuidArray();
-
-            case DATE_ARR:
-                return doReadDateArray();
-
-            case TIMESTAMP_ARR:
-                return doReadTimestampArray();
-
-            case OBJ_ARR:
-                return doReadObjectArray(false);
-
-            case COL:
-                return doReadCollection(false, null);
-
-            case MAP:
-                return doReadMap(false, null);
-
-            case MAP_ENTRY:
-                return doReadMapEntry(false);
-
-            case PORTABLE_OBJ:
-                return doReadPortableObject();
-
-            case ENUM:
-                return doReadEnum(doReadClass());
-
-            case ENUM_ARR:
-                return doReadEnumArray(doReadClass());
-
-            case CLASS:
-                return doReadClass();
-
-            case OPTM_MARSH:
-                return doReadOptimized();
-
-            default:
-                throw new BinaryObjectException("Invalid flag value: " + flag);
-        }
-    }
-
-    /**
-     * @return Value.
-     */
-    private BigDecimal doReadDecimal() {
-        int scale = in.readInt();
-        byte[] mag = doReadByteArray();
-
-        BigInteger intVal = new BigInteger(mag);
-
-        if (scale < 0) {
-            scale &= 0x7FFFFFFF;
-
-            intVal = intVal.negate();
-        }
-
-        return new BigDecimal(intVal, scale);
-    }
-
-    /**
-     * @return Value.
-     */
-    private String doReadString() {
-        if (!in.hasArray())
-            return new String(doReadByteArray(), UTF_8);
-
-        int strLen = in.readInt();
-
-        int pos = in.position();
-
-        // String will copy necessary array part for us.
-        String res = new String(in.array(), pos, strLen, UTF_8);
-
-        streamPosition(pos + strLen);
-
-        return res;
-    }
-
-    /**
-     * @return Value.
-     */
-    private UUID doReadUuid() {
-        return new UUID(in.readLong(), in.readLong());
-    }
-
-    /**
-     * @return Value.
-     */
-    private Date doReadDate() {
-        long time = in.readLong();
-
-        return new Date(time);
-    }
-
-    /**
-     * @return Value.
-     */
-    private Timestamp doReadTimestamp() {
-        long time = in.readLong();
-        int nanos = in.readInt();
-
-        Timestamp ts = new Timestamp(time);
-
-        ts.setNanos(ts.getNanos() + nanos);
-
-        return ts;
-    }
-
-    /**
-     * @return Object.
-     * @throws BinaryObjectException In case of error.
-     */
-    @Nullable private Object doReadObject() throws BinaryObjectException {
-        BinaryReaderExImpl reader = new BinaryReaderExImpl(ctx, in, ldr, rCtx);
-
-        return reader.deserialize();
-    }
-
-    /**
      * @return Deserialized object.
      * @throws BinaryObjectException If failed.
      */
@@ -1662,14 +1400,14 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             case HANDLE:
                 int handlePos = start - in.readInt();
 
-                obj = rCtx.get(handlePos);
+                obj = getHandle(handlePos);
 
                 if (obj == null) {
                     int retPos = in.position();
 
                     streamPosition(handlePos);
 
-                    obj = doReadObject();
+                    obj = PortableUtils.doReadObject(in, ctx, ldr, this);
 
                     streamPosition(retPos);
                 }
@@ -1731,117 +1469,117 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 break;
 
             case DECIMAL:
-                obj = doReadDecimal();
+                obj = PortableUtils.doReadDecimal(in);
 
                 break;
 
             case STRING:
-                obj = doReadString();
+                obj = PortableUtils.doReadString(in);
 
                 break;
 
             case UUID:
-                obj = doReadUuid();
+                obj = PortableUtils.doReadUuid(in);
 
                 break;
 
             case DATE:
-                obj = doReadDate();
+                obj = PortableUtils.doReadDate(in);
 
                 break;
 
             case TIMESTAMP:
-                obj = doReadTimestamp();
+                obj = PortableUtils.doReadTimestamp(in);
 
                 break;
 
             case BYTE_ARR:
-                obj = doReadByteArray();
+                obj = PortableUtils.doReadByteArray(in);
 
                 break;
 
             case SHORT_ARR:
-                obj = doReadShortArray();
+                obj = PortableUtils.doReadShortArray(in);
 
                 break;
 
             case INT_ARR:
-                obj = doReadIntArray();
+                obj = PortableUtils.doReadIntArray(in);
 
                 break;
 
             case LONG_ARR:
-                obj = doReadLongArray();
+                obj = PortableUtils.doReadLongArray(in);
 
                 break;
 
             case FLOAT_ARR:
-                obj = doReadFloatArray();
+                obj = PortableUtils.doReadFloatArray(in);
 
                 break;
 
             case DOUBLE_ARR:
-                obj = doReadDoubleArray();
+                obj = PortableUtils.doReadDoubleArray(in);
 
                 break;
 
             case CHAR_ARR:
-                obj = doReadCharArray();
+                obj = PortableUtils.doReadCharArray(in);
 
                 break;
 
             case BOOLEAN_ARR:
-                obj = doReadBooleanArray();
+                obj = PortableUtils.doReadBooleanArray(in);
 
                 break;
 
             case DECIMAL_ARR:
-                obj = doReadDecimalArray();
+                obj = PortableUtils.doReadDecimalArray(in);
 
                 break;
 
             case STRING_ARR:
-                obj = doReadStringArray();
+                obj = PortableUtils.doReadStringArray(in);
 
                 break;
 
             case UUID_ARR:
-                obj = doReadUuidArray();
+                obj = PortableUtils.doReadUuidArray(in);
 
                 break;
 
             case DATE_ARR:
-                obj = doReadDateArray();
+                obj = PortableUtils.doReadDateArray(in);
 
                 break;
 
             case TIMESTAMP_ARR:
-                obj = doReadTimestampArray();
+                obj = PortableUtils.doReadTimestampArray(in);
 
                 break;
 
             case OBJ_ARR:
-                obj = doReadObjectArray(true);
+                obj = PortableUtils.doReadObjectArray(in, ctx, ldr, this, true);
 
                 break;
 
             case COL:
-                obj = doReadCollection(true, null);
+                obj = PortableUtils.doReadCollection(in, ctx, ldr, this, true, null);
 
                 break;
 
             case MAP:
-                obj = doReadMap(true, null);
+                obj = PortableUtils.doReadMap(in, ctx, ldr, this, true, null);
 
                 break;
 
             case MAP_ENTRY:
-                obj = doReadMapEntry(true);
+                obj = PortableUtils.doReadMapEntry(in, ctx, ldr, this, true);
 
                 break;
 
             case PORTABLE_OBJ:
-                obj = doReadPortableObject();
+                obj = PortableUtils.doReadPortableObject(in, ctx);
 
                 ((BinaryObjectImpl)obj).context(ctx);
 
@@ -1851,22 +1589,22 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 break;
 
             case ENUM:
-                obj = doReadEnum(doReadClass());
+                obj = PortableUtils.doReadEnum(in, PortableUtils.doReadClass(in, ctx, ldr));
 
                 break;
 
             case ENUM_ARR:
-                obj = doReadEnumArray(doReadClass());
+                obj = PortableUtils.doReadEnumArray(in, ctx, ldr, PortableUtils.doReadClass(in, ctx, ldr));
 
                 break;
 
             case CLASS:
-                obj = doReadClass();
+                obj = PortableUtils.doReadClass(in, ctx, ldr);
 
                 break;
 
             case OPTM_MARSH:
-                obj = doReadOptimized();
+                obj = PortableUtils.doReadOptimized(in, ctx);
 
                 break;
 
@@ -1878,541 +1616,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
-     * Read object serialized using optimized marshaller.
-     *
-     * @return Result.
-     */
-    private Object doReadOptimized() {
-        int len = in.readInt();
-
-        ByteArrayInputStream input = new ByteArrayInputStream(in.array(), in.position(), len);
-
-        try {
-            return ctx.optimizedMarsh().unmarshal(input, null);
-        }
-        catch (IgniteCheckedException e) {
-            throw new BinaryObjectException("Failed to unmarshal object with optimized marshaller", e);
-        }
-        finally {
-            streamPosition(in.position() + len);
-        }
-    }
-
-    /**
-     * @return Value.
-     */
-    private byte[] doReadByteArray() {
-        int len = in.readInt();
-
-        return in.readByteArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private short[] doReadShortArray() {
-        int len = in.readInt();
-
-        return in.readShortArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private int[] doReadIntArray() {
-        int len = in.readInt();
-
-        return in.readIntArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private long[] doReadLongArray() {
-        int len = in.readInt();
-
-        return in.readLongArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private float[] doReadFloatArray() {
-        int len = in.readInt();
-
-        return in.readFloatArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private double[] doReadDoubleArray() {
-        int len = in.readInt();
-
-        return in.readDoubleArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private char[] doReadCharArray() {
-        int len = in.readInt();
-
-        return in.readCharArray(len);
-    }
-
-    /**
-     * @return Value.
-     */
-    private boolean[] doReadBooleanArray() {
-        int len = in.readInt();
-
-        return in.readBooleanArray(len);
-    }
-
-    /**
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private BigDecimal[] doReadDecimalArray() throws BinaryObjectException {
-        int len = in.readInt();
-
-        BigDecimal[] arr = new BigDecimal[len];
-
-        for (int i = 0; i < len; i++) {
-            byte flag = in.readByte();
-
-            if (flag == NULL)
-                arr[i] = null;
-            else {
-                if (flag != DECIMAL)
-                    throw new BinaryObjectException("Invalid flag value: " + flag);
-
-                arr[i] = doReadDecimal();
-            }
-        }
-
-        return arr;
-    }
-
-    /**
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private String[] doReadStringArray() throws BinaryObjectException {
-        int len = in.readInt();
-
-        String[] arr = new String[len];
-
-        for (int i = 0; i < len; i++) {
-            byte flag = in.readByte();
-
-            if (flag == NULL)
-                arr[i] = null;
-            else {
-                if (flag != STRING)
-                    throw new BinaryObjectException("Invalid flag value: " + flag);
-
-                arr[i] = doReadString();
-            }
-        }
-
-        return arr;
-    }
-    
-    /**
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private UUID[] doReadUuidArray() throws BinaryObjectException {
-        int len = in.readInt();
-
-        UUID[] arr = new UUID[len];
-
-        for (int i = 0; i < len; i++) {
-            byte flag = in.readByte();
-
-            if (flag == NULL)
-                arr[i] = null;
-            else {
-                if (flag != UUID)
-                    throw new BinaryObjectException("Invalid flag value: " + flag);
-
-                arr[i] = doReadUuid();
-            }
-        }
-
-        return arr;
-    }
-
-    /**
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private Date[] doReadDateArray() throws BinaryObjectException {
-        int len = in.readInt();
-
-        Date[] arr = new Date[len];
-
-        for (int i = 0; i < len; i++) {
-            byte flag = in.readByte();
-
-            if (flag == NULL)
-                arr[i] = null;
-            else {
-                if (flag != DATE)
-                    throw new BinaryObjectException("Invalid flag value: " + flag);
-
-                arr[i] = doReadDate();
-            }
-        }
-
-        return arr;
-    }
-
-    /**
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private Timestamp[] doReadTimestampArray() throws BinaryObjectException {
-        int len = in.readInt();
-
-        Timestamp[] arr = new Timestamp[len];
-
-        for (int i = 0; i < len; i++) {
-            byte flag = in.readByte();
-
-            if (flag == NULL)
-                arr[i] = null;
-            else {
-                if (flag != TIMESTAMP)
-                    throw new BinaryObjectException("Invalid flag value: " + flag);
-
-                arr[i] = doReadTimestamp();
-            }
-        }
-
-        return arr;
-    }
-
-    /**
-     * @param deep Deep flag.
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private Object[] doReadObjectArray(boolean deep) throws BinaryObjectException {
-        int hPos = positionForHandle();
-
-        Class compType = doReadClass();
-
-        int len = in.readInt();
-
-        Object[] arr = deep ? (Object[])Array.newInstance(compType, len) : new Object[len];
-
-        setHandler(arr, hPos);
-
-        for (int i = 0; i < len; i++)
-            arr[i] = deep ? doReadObject() : unmarshal();
-
-        return arr;
-    }
-
-    /**
-     * @param deep Deep flag.
-     * @param cls Collection class.
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    @SuppressWarnings("unchecked")
-    private Collection<?> doReadCollection(boolean deep, @Nullable Class<? extends Collection> cls)
-        throws BinaryObjectException {
-        int hPos = positionForHandle();
-
-        int size = in.readInt();
-
-        assert size >= 0;
-
-        byte colType = in.readByte();
-
-        Collection<Object> col;
-
-        if (cls != null) {
-            try {
-                Constructor<? extends Collection> cons = cls.getConstructor();
-
-                col = cons.newInstance();
-            }
-            catch (NoSuchMethodException ignored) {
-                throw new BinaryObjectException("Collection class doesn't have public default constructor: " +
-                    cls.getName());
-            }
-            catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
-                throw new BinaryObjectException("Failed to instantiate collection: " + cls.getName(), e);
-            }
-        }
-        else {
-            switch (colType) {
-                case ARR_LIST:
-                    col = new ArrayList<>(size);
-
-                    break;
-
-                case LINKED_LIST:
-                    col = new LinkedList<>();
-
-                    break;
-
-                case HASH_SET:
-                    col = U.newHashSet(size);
-
-                    break;
-
-                case LINKED_HASH_SET:
-                    col = U.newLinkedHashSet(size);
-
-                    break;
-
-                case TREE_SET:
-                    col = new TreeSet<>();
-
-                    break;
-
-                case CONC_SKIP_LIST_SET:
-                    col = new ConcurrentSkipListSet<>();
-
-                    break;
-
-                case USER_SET:
-                    col = U.newHashSet(size);
-
-                    break;
-
-                case USER_COL:
-                    col = new ArrayList<>(size);
-
-                    break;
-
-                default:
-                    throw new BinaryObjectException("Invalid collection type: " + colType);
-            }
-        }
-
-        setHandler(col, hPos);
-
-        for (int i = 0; i < size; i++)
-            col.add(deep ? doReadObject() : unmarshal());
-
-        return col;
-    }
-
-    /**
-     * @param deep Deep flag.
-     * @param cls Map class.
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    @SuppressWarnings("unchecked")
-    private Map<?, ?> doReadMap(boolean deep, @Nullable Class<? extends Map> cls)
-        throws BinaryObjectException {
-        int hPos = positionForHandle();
-
-        int size = in.readInt();
-
-        assert size >= 0;
-
-        byte mapType = in.readByte();
-
-        Map<Object, Object> map;
-
-        if (cls != null) {
-            try {
-                Constructor<? extends Map> cons = cls.getConstructor();
-
-                map = cons.newInstance();
-            }
-            catch (NoSuchMethodException ignored) {
-                throw new BinaryObjectException("Map class doesn't have public default constructor: " +
-                    cls.getName());
-            }
-            catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
-                throw new BinaryObjectException("Failed to instantiate map: " + cls.getName(), e);
-            }
-        }
-        else {
-            switch (mapType) {
-                case HASH_MAP:
-                    map = U.newHashMap(size);
-
-                    break;
-
-                case LINKED_HASH_MAP:
-                    map = U.newLinkedHashMap(size);
-
-                    break;
-
-                case TREE_MAP:
-                    map = new TreeMap<>();
-
-                    break;
-
-                case CONC_HASH_MAP:
-                    map = new ConcurrentHashMap<>(size);
-
-                    break;
-
-                case USER_COL:
-                    map = U.newHashMap(size);
-
-                    break;
-
-                case PROPERTIES_MAP:
-                    map = new Properties();
-
-                    break;
-
-                default:
-                    throw new BinaryObjectException("Invalid map type: " + mapType);
-            }
-        }
-
-        setHandler(map, hPos);
-
-        for (int i = 0; i < size; i++)
-            map.put(deep ? doReadObject() : unmarshal(), deep ? doReadObject() : unmarshal());
-
-        return map;
-    }
-
-    /**
-     * @param deep Deep flag.
-     * @return Value.
-     * @throws BinaryObjectException In case of error.
-     */
-    private Map.Entry<?, ?> doReadMapEntry(boolean deep) throws BinaryObjectException {
-        int hPos = positionForHandle();
-
-        Object val1 = deep ? doReadObject() : unmarshal();
-        Object val2 = deep ? doReadObject() : unmarshal();
-
-        GridMapEntry entry = new GridMapEntry<>(val1, val2);
-
-        setHandler(entry, hPos);
-
-        return entry;
-    }
-
-    /**
-     * @return Value.
-     */
-    private BinaryObject doReadPortableObject() {
-        if (in.offheapPointer() > 0) {
-            int len = in.readInt();
-
-            int pos = in.position();
-
-            streamPosition(in.position() + len);
-
-            int start = in.readInt();
-
-            return new BinaryObjectOffheapImpl(ctx, in.offheapPointer() + pos, start, len);
-        }
-        else {
-            byte[] arr = doReadByteArray();
-            int start = in.readInt();
-
-            return new BinaryObjectImpl(ctx, arr, start);
-        }
-    }
-
-    /**
-     * Having target class in place we simply read ordinal and create final representation.
-     *
-     * @param cls Enum class.
-     * @return Value.
-     */
-    private Enum<?> doReadEnum(Class<?> cls) throws BinaryObjectException {
-        assert cls != null;
-
-        if (!cls.isEnum())
-            throw new BinaryObjectException("Class does not represent enum type: " + cls.getName());
-
-        int ord = in.readInt();
-
-        return BinaryEnumCache.get(cls, ord);
-    }
-
-    /**
-     * @param cls Enum class.
-     * @return Value.
-     */
-    private Object[] doReadEnumArray(Class<?> cls) throws BinaryObjectException {
-        int len = in.readInt();
-
-        Object[] arr = (Object[])Array.newInstance(cls, len);
-
-        for (int i = 0; i < len; i++) {
-            byte flag = in.readByte();
-
-            if (flag == NULL)
-                arr[i] = null;
-            else
-                arr[i] = doReadEnum(doReadClass());
-        }
-
-        return arr;
-    }
-
-    /**
-     * @return Value.
-     */
-    private Class doReadClass() throws BinaryObjectException {
-        return doReadClass(in.readInt());
-    }
-
-    /**
-     * @param typeId Type id.
-     * @return Value.
-     */
-    private Class doReadClass(int typeId) throws BinaryObjectException {
-        Class cls;
-
-        if (typeId == OBJECT_TYPE_ID)
-            return Object.class;
-
-        if (typeId != UNREGISTERED_TYPE_ID)
-            cls = ctx.descriptorForTypeId(true, typeId, ldr).describedClass();
-        else {
-            byte flag = in.readByte();
-
-            if (flag != STRING)
-                throw new BinaryObjectException("No class definition for typeId: " + typeId);
-
-            String clsName = doReadString();
-
-            try {
-                cls = U.forName(clsName, ldr);
-            }
-            catch (ClassNotFoundException e) {
-                throw new BinaryInvalidTypeException("Failed to load the class: " + clsName, e);
-            }
-
-            // forces registering of class by type id, at least locally
-            ctx.descriptorForClass(cls);
-        }
-
-        return cls;
-    }
-
-    /**
-     * Get position to be used for handle. We assume here that the hdr byte was read, hence subtract -1.  
-     *
-     * @return Position for handle.
-     */
-    int positionForHandle() {
-        return in.position() - 1;
-    }
-    
-    /**
      * @param name Field name.
      * @return Field offset.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolder.java
new file mode 100644
index 0000000..09a896c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolder.java
@@ -0,0 +1,46 @@
+/*
+ * 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.portable;
+
+/**
+ * Holder for handles.
+ */
+public interface BinaryReaderHandlesHolder {
+    /**
+     * Set handle.
+     *
+     * @param obj Object.
+     * @param pos Position.
+     */
+    public void setHandle(Object obj, int pos);
+
+    /**
+     * Get handle.
+     *
+     * @param pos Position.
+     * @return Handle.
+     */
+    public Object getHandle(int pos);
+
+    /**
+     * Get all handles.
+     *
+     * @return Handles.
+     */
+    public BinaryReaderHandles handles();
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolderImpl.java
new file mode 100644
index 0000000..1d40136
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderHandlesHolderImpl.java
@@ -0,0 +1,44 @@
+/*
+ * 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.portable;
+
+/**
+ * Simple holder for handles.
+ */
+public class BinaryReaderHandlesHolderImpl implements BinaryReaderHandlesHolder  {
+    /** Handles. */
+    private BinaryReaderHandles hnds;
+
+    /** {@inheritDoc} */
+    @Override public void setHandle(Object obj, int pos) {
+        handles().put(pos, obj);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Object getHandle(int pos) {
+        return hnds != null ? hnds.get(pos) : null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public BinaryReaderHandles handles() {
+        if (hnds == null)
+            hnds = new BinaryReaderHandles();
+
+        return hnds;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/GridPortableMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/GridPortableMarshaller.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/GridPortableMarshaller.java
index 9c61ef2..af1ed68 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/GridPortableMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/GridPortableMarshaller.java
@@ -255,10 +255,7 @@ public class GridPortableMarshaller {
     @Nullable public <T> T unmarshal(byte[] bytes, @Nullable ClassLoader clsLdr) throws BinaryObjectException {
         assert bytes != null;
 
-        BinaryReaderExImpl reader =
-            new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(bytes, 0), clsLdr, new BinaryReaderHandles());
-
-        return (T)reader.unmarshal();
+        return (T)PortableUtils.unmarshal(PortableHeapInputStream.create(bytes, 0), ctx, clsLdr);
     }
 
     /**
@@ -268,7 +265,7 @@ public class GridPortableMarshaller {
      */
     @SuppressWarnings("unchecked")
     @Nullable public <T> T unmarshal(PortableInputStream in) throws BinaryObjectException {
-        return (T)reader(in).unmarshal();
+        return (T)PortableUtils.unmarshal(in, ctx, null);
     }
 
     /**
@@ -285,10 +282,7 @@ public class GridPortableMarshaller {
         if (arr[0] == NULL)
             return null;
 
-        BinaryReaderExImpl reader =
-            new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, 0), ldr, new BinaryReaderHandles());
-
-        return (T)reader.deserialize();
+        return (T)new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, 0), ldr).deserialize();
     }
 
     /**
@@ -302,17 +296,6 @@ public class GridPortableMarshaller {
     }
 
     /**
-     * Gets reader for the given input stream.
-     *
-     * @param in Input stream.
-     * @return Reader.
-     */
-    public BinaryReaderExImpl reader(PortableInputStream in) {
-        // TODO: IGNITE-1272 - Is class loader needed here?
-        return new BinaryReaderExImpl(ctx, in, null, new BinaryReaderHandles());
-    }
-
-    /**
      * @return Context.
      */
     public PortableContext context() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
index 974f891..78d4bc5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
@@ -646,7 +646,7 @@ public class PortableClassDescriptor {
             case PORTABLE:
                 res = newInstance();
 
-                reader.setHandler(res);
+                reader.setHandle(res);
 
                 if (serializer != null)
                     serializer.readBinary(res, reader);
@@ -658,7 +658,7 @@ public class PortableClassDescriptor {
             case EXTERNALIZABLE:
                 res = newInstance();
 
-                reader.setHandler(res);
+                reader.setHandle(res);
 
                 try {
                     ((Externalizable)res).readExternal(reader);
@@ -673,7 +673,7 @@ public class PortableClassDescriptor {
             case OBJECT:
                 res = newInstance();
 
-                reader.setHandler(res);
+                reader.setHandle(res);
 
                 for (BinaryFieldAccessor info : fields)
                     info.read(res, reader);
@@ -690,7 +690,7 @@ public class PortableClassDescriptor {
             try {
                 res = readResolveMtd.invoke(res);
 
-                reader.setHandler(res);
+                reader.setHandle(res);
             }
             catch (IllegalAccessException e) {
                 throw new RuntimeException(e);


[06/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-1282' into ignite-1282

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1282' into ignite-1282


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

Branch: refs/heads/master
Commit: 911ca9dc876955fa219022e514dda5885d1e0d47
Parents: 3430586 6d4ecfd
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Nov 20 14:19:32 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Nov 20 14:19:32 2015 +0300

----------------------------------------------------------------------
 modules/camel/README.txt                        |   34 +
 modules/camel/licenses/apache-2.0.txt           |  202 ++
 modules/camel/pom.xml                           |  102 +
 .../ignite/stream/camel/CamelStreamer.java      |  237 ++
 .../stream/camel/IgniteCamelStreamerTest.java   |  420 ++++
 .../camel/IgniteCamelStreamerTestSuite.java     |   48 +
 .../src/test/resources/camel.test.properties    |   18 +
 .../ignite/codegen/MessageCodeGenerator.java    |    1 +
 .../java/org/apache/ignite/IgniteCache.java     |    3 +-
 .../java/org/apache/ignite/IgniteCompute.java   |    3 +-
 .../org/apache/ignite/compute/ComputeJob.java   |    2 +-
 .../internal/GridEventConsumeHandler.java       |   22 +-
 .../internal/GridMessageListenHandler.java      |   18 +
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../apache/ignite/internal/IgniteKernal.java    |    9 +-
 .../communication/GridIoMessageFactory.java     |   26 +-
 .../discovery/GridDiscoveryManager.java         |    2 +-
 .../processors/cache/GridCacheAdapter.java      |  151 +-
 .../processors/cache/GridCacheAtomicFuture.java |    6 +
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../processors/cache/GridCacheEntryEx.java      |   12 +-
 .../processors/cache/GridCacheFuture.java       |   13 -
 .../processors/cache/GridCacheGateway.java      |    1 -
 .../processors/cache/GridCacheIoManager.java    |   50 +-
 .../processors/cache/GridCacheMapEntry.java     |  158 +-
 .../processors/cache/GridCacheMessage.java      |   20 +-
 .../processors/cache/GridCacheMvcc.java         |    7 -
 .../processors/cache/GridCacheMvccFuture.java   |    7 +
 .../processors/cache/GridCacheMvccManager.java  |  150 +-
 .../GridCachePartitionExchangeManager.java      |   59 +-
 .../cache/GridCacheSharedContext.java           |   38 +-
 .../cache/GridCacheUpdateAtomicResult.java      |   15 +-
 .../cache/GridCacheUpdateTxResult.java          |   24 +-
 .../processors/cache/IgniteCacheProxy.java      |    3 +
 .../distributed/GridCacheTxRecoveryFuture.java  |   54 +-
 .../distributed/GridDistributedBaseMessage.java |   56 -
 .../distributed/GridDistributedLockRequest.java |    6 -
 .../GridDistributedLockResponse.java            |   32 +-
 .../distributed/GridDistributedTxMapping.java   |   78 -
 .../GridDistributedTxPrepareRequest.java        |   66 +-
 .../GridDistributedTxRemoteAdapter.java         |  158 +-
 .../dht/CacheDistributedGetFutureAdapter.java   |   27 +-
 .../cache/distributed/dht/CacheGetFuture.java   |   32 +
 .../dht/GridClientPartitionTopology.java        |   38 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |  141 ++
 .../distributed/dht/GridDhtLocalPartition.java  |   35 +
 .../distributed/dht/GridDhtLockFuture.java      |   79 +-
 .../distributed/dht/GridDhtLockRequest.java     |    2 +-
 .../dht/GridDhtPartitionTopology.java           |   26 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  112 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |   14 +-
 .../distributed/dht/GridDhtTxFinishFuture.java  |   38 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |  112 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   28 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   89 +-
 .../cache/distributed/dht/GridDhtTxMapping.java |  134 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  136 +-
 .../dht/GridDhtTxPrepareRequest.java            |   54 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   29 +-
 .../dht/GridPartitionedGetFuture.java           |   69 +-
 .../dht/GridPartitionedSingleGetFuture.java     |  699 ++++++
 .../dht/atomic/GridDhtAtomicCache.java          |  206 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  159 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |  121 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |    5 -
 .../dht/colocated/GridDhtColocatedCache.java    |  162 +-
 .../colocated/GridDhtColocatedLockFuture.java   |   81 +-
 .../GridDhtPartitionsExchangeFuture.java        |   35 +-
 .../preloader/GridDhtPartitionsFullMessage.java |   64 +-
 .../GridDhtPartitionsSingleMessage.java         |   56 +-
 .../distributed/near/CacheVersionedValue.java   |    2 +-
 .../distributed/near/GridNearAtomicCache.java   |   10 +-
 .../distributed/near/GridNearCacheAdapter.java  |    4 +-
 .../distributed/near/GridNearGetFuture.java     |   49 +-
 .../distributed/near/GridNearGetRequest.java    |    1 -
 .../distributed/near/GridNearGetResponse.java   |    2 -
 .../distributed/near/GridNearLockFuture.java    |   72 +-
 .../distributed/near/GridNearLockRequest.java   |    4 +-
 ...arOptimisticSerializableTxPrepareFuture.java |  124 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |  170 +-
 ...ridNearOptimisticTxPrepareFutureAdapter.java |   72 +-
 .../GridNearPessimisticTxPrepareFuture.java     |   59 +-
 .../near/GridNearSingleGetRequest.java          |  396 ++++
 .../near/GridNearSingleGetResponse.java         |  321 +++
 .../near/GridNearTransactionalCache.java        |   10 +-
 .../near/GridNearTxFinishFuture.java            |  103 +-
 .../cache/distributed/near/GridNearTxLocal.java |  273 ++-
 .../near/GridNearTxPrepareFutureAdapter.java    |   20 +-
 .../near/GridNearTxPrepareRequest.java          |   61 +-
 .../distributed/near/GridNearTxRemote.java      |   33 +-
 .../distributed/near/IgniteTxMappings.java      |   75 +
 .../distributed/near/IgniteTxMappingsImpl.java  |   92 +
 .../near/IgniteTxMappingsSingleImpl.java        |  101 +
 .../processors/cache/local/GridLocalCache.java  |    4 +-
 .../cache/local/GridLocalLockFuture.java        |    5 -
 .../CacheContinuousQueryBatchAck.java           |  163 ++
 .../continuous/CacheContinuousQueryEntry.java   |  196 +-
 .../continuous/CacheContinuousQueryHandler.java |  811 ++++++-
 .../CacheContinuousQueryListener.java           |   35 +
 .../continuous/CacheContinuousQueryManager.java |  151 +-
 .../cache/transactions/IgniteInternalTx.java    |   13 +-
 .../cache/transactions/IgniteTxAdapter.java     |   68 +-
 .../cache/transactions/IgniteTxEntry.java       |   29 +-
 .../cache/transactions/IgniteTxHandler.java     |   38 +-
 .../IgniteTxImplicitSingleStateImpl.java        |  266 +++
 .../transactions/IgniteTxLocalAdapter.java      | 1441 ++++++-----
 .../cache/transactions/IgniteTxLocalEx.java     |   30 +-
 .../cache/transactions/IgniteTxLocalState.java  |   44 +
 .../transactions/IgniteTxLocalStateAdapter.java |   41 +
 .../cache/transactions/IgniteTxManager.java     |   21 +-
 .../cache/transactions/IgniteTxMap.java         |    3 +-
 .../cache/transactions/IgniteTxRemoteEx.java    |   18 +-
 .../IgniteTxRemoteSingleStateImpl.java          |  108 +
 .../cache/transactions/IgniteTxRemoteState.java |   34 +
 .../IgniteTxRemoteStateAdapter.java             |  115 +
 .../transactions/IgniteTxRemoteStateImpl.java   |  124 +
 .../cache/transactions/IgniteTxState.java       |  177 ++
 .../cache/transactions/IgniteTxStateImpl.java   |  414 ++++
 .../clock/GridClockSyncProcessor.java           |   28 +-
 .../continuous/GridContinuousBatch.java         |   44 +
 .../continuous/GridContinuousBatchAdapter.java  |   46 +
 .../continuous/GridContinuousHandler.java       |   22 +
 .../continuous/GridContinuousProcessor.java     |  221 +-
 .../StartRoutineAckDiscoveryMessage.java        |   14 +-
 .../StartRoutineDiscoveryMessage.java           |   21 +-
 .../internal/util/UUIDCollectionMessage.java    |  114 +
 .../util/future/GridCompoundFuture.java         |   15 +-
 .../ignite/internal/util/lang/GridFunc.java     |    8 +-
 .../ignite/internal/util/nio/GridNioServer.java |   13 +-
 .../ignite/marshaller/MarshallerExclusions.java |    4 +-
 .../org/apache/ignite/mxbean/IgniteMXBean.java  |    8 +-
 .../org/apache/ignite/stream/StreamAdapter.java |   18 +-
 .../IgniteClientReconnectCacheTest.java         |   11 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   75 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |   15 -
 .../cache/GridCachePartitionedGetSelfTest.java  |    3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   10 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |   27 +-
 .../IgniteCacheP2pUnmarshallingErrorTest.java   |  184 +-
 .../CacheGetFutureHangsSelfTest.java            |    6 +
 .../GridCacheAbstractNodeRestartSelfTest.java   |    2 +
 .../IgniteCacheSingleGetMessageTest.java        |  357 +++
 .../GridCacheReplicatedMetricsSelfTest.java     |    9 -
 .../IgniteCacheTxStoreSessionTest.java          |    2 +-
 ...ContinuousQueryFailoverAbstractSelfTest.java | 2235 ++++++++++++++++++
 ...ryFailoverAtomicNearEnabledSelfSelfTest.java |   46 +
 ...FailoverAtomicPrimaryWriteOrderSelfTest.java |   44 +
 ...usQueryFailoverAtomicReplicatedSelfTest.java |   40 +
 ...inuousQueryFailoverTxReplicatedSelfTest.java |   32 +
 .../CacheContinuousQueryFailoverTxSelfTest.java |   39 +
 ...ridCacheContinuousQueryAbstractSelfTest.java |  153 +-
 .../GridCacheContinuousQueryTxSelfTest.java     |   49 +
 ...CacheContinuousQueryClientReconnectTest.java |  187 ++
 .../IgniteCacheContinuousQueryClientTest.java   |  157 +-
 ...cheContinuousQueryClientTxReconnectTest.java |   32 +
 .../p2p/GridP2PSameClassLoaderSelfTest.java     |   16 +-
 .../testframework/junits/GridAbstractTest.java  |    2 +-
 .../junits/common/GridCommonAbstractTest.java   |    3 +
 .../testsuites/IgniteCacheTestSuite3.java       |    2 +
 .../testsuites/IgniteCacheTestSuite4.java       |    3 +
 .../ignite/util/mbeans/GridMBeanSelfTest.java   |   33 +-
 modules/flume/README.txt                        |   72 +
 modules/flume/licenses/apache-2.0.txt           |  202 ++
 modules/flume/pom.xml                           |   77 +
 .../ignite/stream/flume/EventTransformer.java   |   36 +
 .../apache/ignite/stream/flume/IgniteSink.java  |  186 ++
 .../stream/flume/IgniteSinkConstants.java       |   35 +
 .../ignite/stream/flume/IgniteSinkTest.java     |  142 ++
 .../stream/flume/IgniteSinkTestSuite.java       |   37 +
 .../stream/flume/TestEventTransformer.java      |   66 +
 .../flume/src/test/resources/example-ignite.xml |   71 +
 .../IgniteCacheQuerySelfTestSuite.java          |   16 +-
 .../GridSpringResourceInjectionSelfTest.java    |  143 ++
 .../processors/resource/spring-resource.xml     |   27 +
 .../testsuites/IgniteResourceSelfTestSuite.java |    2 +
 modules/twitter/README.txt                      |   32 +
 modules/twitter/licenses/apache-2.0.txt         |  202 ++
 modules/twitter/pom.xml                         |  122 +
 .../ignite/stream/twitter/OAuthSettings.java    |   86 +
 .../ignite/stream/twitter/TwitterStreamer.java  |  295 +++
 .../twitter/IgniteTwitterStreamerTest.java      |  234 ++
 .../twitter/IgniteTwitterStreamerTestSuite.java |   32 +
 .../stream/twitter/TwitterStreamerImpl.java     |   79 +
 .../config/benchmark-multicast.properties       |    6 +-
 .../benchmark-query-put-separated.properties    |   87 +
 .../yardstick/cache/CacheEntryEventProbe.java   |  156 ++
 .../cache/IgniteSqlQueryPutBenchmark.java       |   31 +-
 .../IgniteSqlQueryPutSeparatedBenchmark.java    |   84 +
 parent/pom.xml                                  |    1 +
 pom.xml                                         |    3 +
 190 files changed, 15622 insertions(+), 2791 deletions(-)
----------------------------------------------------------------------



[28/50] [abbrv] ignite git commit: Merge branch ignite-1.5-tx-futs-opts into ignite-1.5

Posted by sb...@apache.org.
Merge branch ignite-1.5-tx-futs-opts into ignite-1.5


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

Branch: refs/heads/master
Commit: 07f5a62ec8e496a9a43e802f3f7bf5efc1dc2f9a
Parents: 15877a8 388c857
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Nov 23 09:44:43 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Nov 23 09:44:43 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtGetFuture.java |  24 +-
 .../distributed/dht/GridDhtLockFuture.java      |  77 +-
 .../colocated/GridDhtColocatedLockFuture.java   | 595 ++++++++-------
 .../distributed/near/GridNearLockFuture.java    | 739 ++++++++++---------
 .../distributed/near/GridNearLockMapping.java   |   6 +-
 5 files changed, 751 insertions(+), 690 deletions(-)
----------------------------------------------------------------------



[48/50] [abbrv] ignite git commit: IGNITE-1858: .NET: Updated project settings to support VS2010-VS2015.

Posted by sb...@apache.org.
IGNITE-1858: .NET: Updated project settings to support VS2010-VS2015.


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

Branch: refs/heads/master
Commit: 11369331955070758162fbbd3904552eef390049
Parents: 512fe6b
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Tue Nov 24 11:57:39 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 24 11:57:39 2015 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj | 3 +++
 .../Apache.Ignite.Core.Tests.TestDll.csproj                  | 2 ++
 .../Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj | 2 ++
 .../dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj      | 2 ++
 .../dotnet/Apache.Ignite.Core/Impl/Events/Events.cs          | 8 +++++---
 modules/platforms/dotnet/Apache.Ignite.sln                   | 6 ++----
 modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj  | 2 ++
 .../Apache.Ignite.Examples/Apache.Ignite.Examples.csproj     | 2 ++
 .../Apache.Ignite.ExamplesDll.csproj                         | 2 ++
 9 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
index 14b6466..f4c7894 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
@@ -19,10 +19,12 @@
     <PlatformTarget>x86</PlatformTarget>
     <OutputPath>bin\x86\Debug\</OutputPath>
     <DefineConstants>DEBUG</DefineConstants>
+    <LangVersion>4</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     <PlatformTarget>x86</PlatformTarget>
     <OutputPath>bin\x86\Release\</OutputPath>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <PlatformTarget>x64</PlatformTarget>
@@ -32,6 +34,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     <PlatformTarget>x64</PlatformTarget>
     <OutputPath>bin\x64\Release\</OutputPath>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
index c333bda..ebc8043 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
@@ -19,6 +19,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     <PlatformTarget>x86</PlatformTarget>
     <OutputPath>bin\x86\Release\</OutputPath>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <PlatformTarget>x64</PlatformTarget>
@@ -27,6 +28,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     <PlatformTarget>x64</PlatformTarget>
     <OutputPath>bin\x64\Release\</OutputPath>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index a5bb7a8..72c0210 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -25,6 +25,7 @@
     <PlatformTarget>x64</PlatformTarget>
     <OutputPath>bin\x64\Release\</OutputPath>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <PlatformTarget>x86</PlatformTarget>
@@ -36,6 +37,7 @@
     <PlatformTarget>x86</PlatformTarget>
     <OutputPath>bin\x86\Release\</OutputPath>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index d7db33e..ae10159 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -22,6 +22,7 @@
     <PlatformTarget>x64</PlatformTarget>
     <OutputPath>bin\x64\Release\</OutputPath>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <PlatformTarget>x86</PlatformTarget>
@@ -33,6 +34,7 @@
     <PlatformTarget>x86</PlatformTarget>
     <OutputPath>bin\x86\Release\</OutputPath>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
index 098102a..783ba94 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
@@ -134,8 +134,9 @@ namespace Apache.Ignite.Core.Impl.Events
         {
             AsyncInstance.RemoteQuery(filter, timeout, types);
 
-            return GetFuture((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, futId, futTyp,
-                (int) Op.RemoteQuery), convertFunc: ReadEvents<T>).Task;
+            // ReSharper disable once RedundantTypeArgumentsOfMethod (won't compile in VS2010)
+            return GetFuture<ICollection<T>>((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, 
+                futId, futTyp, (int) Op.RemoteQuery), convertFunc: ReadEvents<T>).Task;
         }
 
         /** <inheritDoc /> */
@@ -251,7 +252,8 @@ namespace Apache.Ignite.Core.Impl.Events
             {
                 AsyncInstance.WaitForLocal0(filter, ref hnd, types);
 
-                var fut = GetFuture((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, futId,
+                // ReSharper disable once RedundantTypeArgumentsOfMethod (won't compile in VS2010)
+                var fut = GetFuture<T>((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, futId,
                     futTyp, (int) Op.WaitForLocal), convertFunc: reader => (T) EventReader.Read<IEvent>(reader));
 
                 if (filter != null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln b/modules/platforms/dotnet/Apache.Ignite.sln
index 6b29e9d..929af73 100644
--- a/modules/platforms/dotnet/Apache.Ignite.sln
+++ b/modules/platforms/dotnet/Apache.Ignite.sln
@@ -1,8 +1,6 @@
 
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core", "Apache.Ignite.Core\Apache.Ignite.Core.csproj", "{4CD2F726-7E2B-46C4-A5BA-057BB82EECB6}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core.Tests", "Apache.Ignite.Core.Tests\Apache.Ignite.Core.Tests.csproj", "{6A62F66C-DA5B-4FBB-8CE7-A95F740FDC7A}"

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj b/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
index a58a660..fa7d6cf 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
@@ -19,6 +19,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     <PlatformTarget>x64</PlatformTarget>
     <OutputPath>bin\x64\Release\</OutputPath>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <PlatformTarget>x86</PlatformTarget>
@@ -27,6 +28,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     <PlatformTarget>x86</PlatformTarget>
     <OutputPath>bin\x86\Release\</OutputPath>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
index e28ab75..a693930 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
@@ -21,6 +21,7 @@
     <OutputPath>bin\x64\Release\</OutputPath>
     <DebugType>full</DebugType>
     <DebugSymbols>true</DebugSymbols>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <StartupObject>Apache.Ignite.Examples.Compute.TaskExample</StartupObject>
@@ -35,6 +36,7 @@
     <OutputPath>bin\x86\Release\</OutputPath>
     <PlatformTarget>x86</PlatformTarget>
     <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
index 60e1ec7..59d2866 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
@@ -21,6 +21,7 @@
     <OutputPath>bin\x64\Release\</OutputPath>
     <DebugType>full</DebugType>
     <DebugSymbols>true</DebugSymbols>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <DebugSymbols>true</DebugSymbols>
@@ -32,6 +33,7 @@
     <OutputPath>bin\x86\Release\</OutputPath>
     <PlatformTarget>x86</PlatformTarget>
     <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Optimize>true</Optimize>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>


[18/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1282

Posted by sb...@apache.org.
Merge branch ignite-1.5 into ignite-1282


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

Branch: refs/heads/master
Commit: 3d8c4c0f0cf7eda1544969dcc5663a9da0d6f9d2
Parents: ae5fb3e 457ca6f
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Sat Nov 21 12:25:43 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Sat Nov 21 12:25:43 2015 +0300

----------------------------------------------------------------------
 .../datastructures/IgniteSemaphoreExample.java  |  168 ++
 .../ignite/examples/CacheExamplesSelfTest.java  |   10 +-
 .../stream/camel/IgniteCamelStreamerTest.java   |   16 +-
 .../camel/IgniteCamelStreamerTestSuite.java     |    1 -
 .../src/main/java/org/apache/ignite/Ignite.java |   17 +
 .../java/org/apache/ignite/IgniteSemaphore.java |  312 ++++
 .../apache/ignite/events/DiscoveryEvent.java    |    6 +-
 .../apache/ignite/internal/IgniteKernal.java    |   21 +
 .../internal/MarshallerContextAdapter.java      |    4 +-
 .../internal/direct/DirectByteBufferStream.java | 1499 -----------------
 .../internal/direct/DirectMessageReader.java    |  144 +-
 .../internal/direct/DirectMessageWriter.java    |   65 +-
 .../direct/DirectMessageWriterState.java        |  123 --
 .../direct/state/DirectMessageState.java        |   98 ++
 .../direct/state/DirectMessageStateItem.java    |   28 +
 .../direct/stream/DirectByteBufferStream.java   |  316 ++++
 .../stream/v1/DirectByteBufferStreamImplV1.java | 1360 +++++++++++++++
 .../stream/v2/DirectByteBufferStreamImplV2.java | 1583 ++++++++++++++++++
 .../managers/communication/GridIoManager.java   |   64 +-
 .../GridCachePartitionExchangeManager.java      |   34 +-
 .../processors/cache/GridCacheUtils.java        |   39 +-
 .../CacheDataStructuresManager.java             |    2 +-
 .../GridFutureRemapTimeoutObject.java           |   72 -
 .../dht/GridClientPartitionTopology.java        |   38 +-
 .../distributed/dht/GridDhtLockFuture.java      |    1 -
 .../dht/GridDhtPartitionTopology.java           |   12 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   45 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |    1 -
 .../dht/GridPartitionedGetFuture.java           |   30 +-
 .../colocated/GridDhtColocatedLockFuture.java   |    1 -
 .../dht/preloader/GridDhtPartitionFullMap.java  |   41 +-
 .../dht/preloader/GridDhtPartitionMap.java      |  148 +-
 .../dht/preloader/GridDhtPartitionMap2.java     |  306 ++++
 .../GridDhtPartitionsExchangeFuture.java        |   24 +-
 .../GridDhtPartitionsSingleMessage.java         |    6 +-
 .../distributed/near/GridNearCacheAdapter.java  |    1 -
 .../distributed/near/GridNearGetFuture.java     |   30 +-
 .../distributed/near/GridNearLockFuture.java    |    2 -
 ...arOptimisticSerializableTxPrepareFuture.java |    3 -
 .../near/GridNearOptimisticTxPrepareFuture.java |    1 -
 .../near/GridNearTxFinishFuture.java            |    4 -
 .../distributed/near/GridNearTxRemote.java      |    1 -
 .../processors/cache/local/GridLocalCache.java  |    1 -
 .../cache/local/GridLocalLockFuture.java        |    2 -
 .../cache/transactions/IgniteInternalTx.java    |    1 -
 .../cache/transactions/IgniteTxAdapter.java     |    1 -
 .../IgniteTxImplicitSingleStateImpl.java        |   29 +-
 .../cache/transactions/IgniteTxManager.java     |    1 -
 .../IgniteTxRemoteSingleStateImpl.java          |   19 +-
 .../cache/transactions/IgniteTxStateImpl.java   |    1 -
 .../datastructures/DataStructuresProcessor.java |  240 ++-
 .../GridAtomicCacheQueueImpl.java               |  126 +-
 .../GridCacheAtomicReferenceImpl.java           |   10 +-
 .../GridCacheCountDownLatchImpl.java            |   15 +-
 .../datastructures/GridCacheQueueAdapter.java   |   32 +-
 .../datastructures/GridCacheSemaphoreEx.java    |   47 +
 .../datastructures/GridCacheSemaphoreImpl.java  |  763 +++++++++
 .../datastructures/GridCacheSemaphoreState.java |  144 ++
 .../GridTransactionalCacheQueueImpl.java        |  193 +--
 .../ignite/internal/util/IgniteUtils.java       |   31 +
 .../internal/util/ipc/IpcToNioAdapter.java      |   14 +-
 .../util/nio/GridCommunicationClient.java       |    4 +-
 .../internal/util/nio/GridDirectParser.java     |   37 +-
 .../util/nio/GridNioMessageReaderFactory.java   |   37 +
 .../util/nio/GridNioMessageWriterFactory.java   |   35 +
 .../ignite/internal/util/nio/GridNioServer.java |   47 +-
 .../util/nio/GridShmemCommunicationClient.java  |   12 +-
 .../ignite/internal/visor/cache/VisorCache.java |    6 +-
 .../communication/MessageFormatter.java         |   15 +-
 .../extensions/communication/MessageReader.java |   26 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |    6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   80 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |    2 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   36 +
 .../org/apache/ignite/stream/StreamAdapter.java |    1 -
 .../apache/ignite/stream/StreamTransformer.java |    9 +-
 .../resources/META-INF/classnames.properties    |    1 +
 .../IgniteClientReconnectAtomicsTest.java       |   44 +-
 ...eAbstractDataStructuresFailoverSelfTest.java | 1065 +++++++-----
 .../IgniteClientDataStructuresAbstractTest.java |   59 +-
 .../IgniteDataStructureUniqueNameTest.java      |   14 +-
 .../IgniteSemaphoreAbstractSelfTest.java        |  411 +++++
 .../local/IgniteLocalSemaphoreSelfTest.java     |   98 ++
 ...rtitionedDataStructuresFailoverSelfTest.java |    7 +-
 ...edOffheapDataStructuresFailoverSelfTest.java |   12 +-
 .../IgnitePartitionedSemaphoreSelfTest.java     |   33 +
 ...eplicatedDataStructuresFailoverSelfTest.java |    7 +-
 .../IgniteReplicatedSemaphoreSelfTest.java      |   33 +
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |   12 +-
 .../dht/GridCacheDhtPreloadSelfTest.java        |    4 +-
 .../distributed/dht/GridCacheDhtTestUtils.java  |    8 +-
 ...gniteAtomicLongChangingTopologySelfTest.java |    2 +
 ...cingDelayedPartitionMapExchangeSelfTest.java |  178 ++
 .../cache/GridCacheDataStructuresLoadTest.java  |  283 ++--
 ...GridTcpCommunicationSpiRecoverySelfTest.java |    4 +-
 ...lientDiscoverySpiFailureTimeoutSelfTest.java |    4 +-
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   90 +-
 .../testframework/GridSpiTestContext.java       |   12 +-
 .../testframework/junits/GridAbstractTest.java  |    6 +-
 .../ignite/testframework/junits/IgniteMock.java |   10 +
 .../junits/multijvm/IgniteProcessProxy.java     |    7 +
 .../testsuites/IgniteCacheTestSuite3.java       |    2 +
 .../h2/twostep/GridReduceQueryExecutor.java     |    4 +-
 .../org/apache/ignite/IgniteSpringBean.java     |   12 +
 .../spring/IgniteTransactionHolder.java         |   97 ++
 .../spring/SpringTransactionManager.java        |  522 ++++++
 .../transactions/spring/package-info.java       |   22 +
 .../test/java/config/spring-transactions.xml    |   36 +
 .../testsuites/IgniteSpringTestSuite.java       |    5 +-
 .../GridSpringTransactionManagerSelfTest.java   |  165 ++
 .../spring/GridSpringTransactionService.java    |   68 +
 .../cache/WaitMapExchangeFinishCallable.java    |    4 +-
 .../IgniteFailoverAbstractBenchmark.java        |    4 +-
 parent/pom.xml                                  |    4 +-
 114 files changed, 9013 insertions(+), 3036 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --cc modules/core/src/main/resources/META-INF/classnames.properties
index 94deec2,065a72b..96be534
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@@ -645,10 -629,10 +645,11 @@@ org.apache.ignite.internal.processors.c
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap
 +org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$1
 +org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$SupplyContextPhase
+ org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage
 -org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyPool$1
 -org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyPool$DemandMessage
 +org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture$1
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture$2

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d8c4c0f/parent/pom.xml
----------------------------------------------------------------------


[19/50] [abbrv] ignite git commit: Fixing tests.

Posted by sb...@apache.org.
Fixing tests.


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

Branch: refs/heads/master
Commit: 802d48b5e8d3664db6be36f32c5e4c39d8eee966
Parents: 3d8c4c0
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Sat Nov 21 15:01:20 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Sat Nov 21 15:01:20 2015 +0300

----------------------------------------------------------------------
 .../resources/META-INF/classnames.properties    |  62 +++++++----
 .../CacheVersionedEntryAbstractTest.java        |   2 +-
 .../continuous/GridEventConsumeSelfTest.java    | 111 ++++++++++---------
 3 files changed, 101 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/802d48b5/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 96be534..8ac3278 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -259,6 +259,8 @@ org.apache.ignite.internal.cluster.IgniteKillTask
 org.apache.ignite.internal.cluster.IgniteKillTask$IgniteKillJob
 org.apache.ignite.internal.compute.ComputeTaskCancelledCheckedException
 org.apache.ignite.internal.compute.ComputeTaskTimeoutCheckedException
+org.apache.ignite.internal.direct.DirectMessageReader$1
+org.apache.ignite.internal.direct.DirectMessageWriter$1
 org.apache.ignite.internal.events.DiscoveryCustomEvent
 org.apache.ignite.internal.executor.GridExecutorService
 org.apache.ignite.internal.executor.GridExecutorService$1
@@ -297,9 +299,10 @@ org.apache.ignite.internal.portable.BinaryObjectEx
 org.apache.ignite.internal.portable.BinaryObjectImpl
 org.apache.ignite.internal.portable.BinaryObjectOffheapImpl
 org.apache.ignite.internal.portable.BinaryReaderExImpl$Flag
-org.apache.ignite.internal.portable.PortableClassDescriptor$Mode
+org.apache.ignite.internal.portable.BinaryWriteMode
 org.apache.ignite.internal.portable.PortableContext
 org.apache.ignite.internal.portable.PortableSchema
+org.apache.ignite.internal.portable.PortableSchema$Confirmation
 org.apache.ignite.internal.portable.builder.PortableLazyMap$1$1$1
 org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion
 org.apache.ignite.internal.processors.affinity.GridAffinityAssignment
@@ -355,8 +358,7 @@ org.apache.ignite.internal.processors.cache.GridCacheAdapter$67
 org.apache.ignite.internal.processors.cache.GridCacheAdapter$67$1
 org.apache.ignite.internal.processors.cache.GridCacheAdapter$68
 org.apache.ignite.internal.processors.cache.GridCacheAdapter$69
-org.apache.ignite.internal.processors.cache.GridCacheAdapter$7
-org.apache.ignite.internal.processors.cache.GridCacheAdapter$70
+org.apache.ignite.internal.processors.cache.GridCacheAdapter$8
 org.apache.ignite.internal.processors.cache.GridCacheAdapter$9
 org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture$1
 org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture$1$1
@@ -526,6 +528,8 @@ org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishR
 org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishResponse
 org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping
 org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest
+org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest$1
+org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest$2
 org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse
 org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter
 org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest
@@ -537,6 +541,7 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$2
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$5
+org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$6
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$PartitionEntryIterator
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry$1
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry$2
@@ -547,7 +552,6 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtInvalidPartit
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture$2
-org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockRequest
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockResponse
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState
@@ -555,6 +559,8 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionsRes
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$1
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$10
+org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$10$1
+org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$11
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$2
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$4
@@ -563,9 +569,7 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactional
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$7
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$8
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$9
-org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter$9$1
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishFuture$1
-org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishFuture$2
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishRequest
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishResponse
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocal
@@ -578,7 +582,6 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFutu
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture$2
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture$4
-org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture$5
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareResponse
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxRemote
@@ -586,11 +589,13 @@ org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtUnlockRequest
 org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtUnreservedPartitionException
 org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$2
-org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$MiniFuture$2
 org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$MiniFuture$3
 org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture$MiniFuture$3$1
+org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture$1
+org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture$2
+org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture$3
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$10
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$11
@@ -604,6 +609,9 @@ org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomic
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$19
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$2
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$20
+org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$21
+org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$22
+org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$23
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$3
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4
 org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5
@@ -624,14 +632,15 @@ org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomi
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$2
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$3
-org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$5
-org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$6
+org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$4
+org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$5$1
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$7
+org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$8
+org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache$9
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture$2
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture$3
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture$4
-org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture$5
 org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysRequest
@@ -645,9 +654,9 @@ org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPar
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap
+org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$1
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$SupplyContextPhase
-org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage
@@ -681,7 +690,6 @@ org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapte
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter$EntrySet$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture$2
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture$3
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture$MiniFuture$2
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetFuture$MiniFuture$3
@@ -691,30 +699,27 @@ org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetResponse
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$2
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$3
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$4
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockRequest
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$2
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$3
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$4
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$ClientRemapFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticSerializableTxPrepareFuture$MiniFuture$1$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture$2
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture$3
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearPessimisticTxPrepareFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearPessimisticTxPrepareFuture$2
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearPessimisticTxPrepareFuture$3
+org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest
+org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache$2
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture$1
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture$2
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal
@@ -725,6 +730,7 @@ org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$4
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$5
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$6
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$7
+org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$8
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareFutureAdapter$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse
@@ -788,11 +794,16 @@ org.apache.ignite.internal.processors.cache.query.GridCacheQueryType
 org.apache.ignite.internal.processors.cache.query.GridCacheSqlIndexMetadata
 org.apache.ignite.internal.processors.cache.query.GridCacheSqlMetadata
 org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery
+org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryBatchAck
 org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEntry
 org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent
 org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler
+org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler$1$1
+org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler$1$2
 org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler$2
+org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler$3
 org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler$DeployableObject
+org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager$1
 org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager$JCacheQueryRemoteFilter
 org.apache.ignite.internal.processors.cache.query.jdbc.GridCacheQueryJdbcMetadataTask
 org.apache.ignite.internal.processors.cache.query.jdbc.GridCacheQueryJdbcMetadataTask$JdbcDriverMetadataJob
@@ -836,7 +847,7 @@ org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$15
 org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$2
 org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$4
 org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$5
-org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$7
+org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$8
 org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$9
 org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$FinishClosure
 org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter$PLC1
@@ -897,6 +908,8 @@ org.apache.ignite.internal.processors.continuous.GridContinuousHandler
 org.apache.ignite.internal.processors.continuous.GridContinuousHandler$RegisterStatus
 org.apache.ignite.internal.processors.continuous.GridContinuousMessage
 org.apache.ignite.internal.processors.continuous.GridContinuousMessageType
+org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$10$1
+org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$9
 org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$DiscoveryData
 org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$DiscoveryDataItem
 org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$LocalRoutineInfo
@@ -924,15 +937,17 @@ org.apache.ignite.internal.processors.datastreamer.DataStreamerResponse
 org.apache.ignite.internal.processors.datastreamer.DataStreamerUpdateJob$1
 org.apache.ignite.internal.processors.datastructures.CacheDataStructuresCacheKey
 org.apache.ignite.internal.processors.datastructures.CacheDataStructuresConfigurationKey
-org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$1
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$10
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$11
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$12
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$13
+org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$14
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$15
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$16
-org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$17
+org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$18
+org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$19
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$2
+org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$20
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$3
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$4
 org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$5
@@ -974,6 +989,8 @@ org.apache.ignite.internal.processors.datastructures.GridCacheQueueHeader
 org.apache.ignite.internal.processors.datastructures.GridCacheQueueHeaderKey
 org.apache.ignite.internal.processors.datastructures.GridCacheQueueItemKey
 org.apache.ignite.internal.processors.datastructures.GridCacheQueueProxy
+org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreImpl
+org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreState
 org.apache.ignite.internal.processors.datastructures.GridCacheSetHeader
 org.apache.ignite.internal.processors.datastructures.GridCacheSetHeaderKey
 org.apache.ignite.internal.processors.datastructures.GridCacheSetImpl$CollocatedItemKey
@@ -1294,6 +1311,7 @@ org.apache.ignite.internal.util.IgniteUtils$6
 org.apache.ignite.internal.util.IgniteUtils$7
 org.apache.ignite.internal.util.IgniteUtils$8
 org.apache.ignite.internal.util.IgniteUtils$9
+org.apache.ignite.internal.util.UUIDCollectionMessage
 org.apache.ignite.internal.util.future.GridCompoundFuture$1
 org.apache.ignite.internal.util.future.GridCompoundFuture$Listener
 org.apache.ignite.internal.util.future.GridEmbeddedFuture$1
@@ -1673,8 +1691,8 @@ org.apache.ignite.spi.collision.priorityqueue.PriorityQueueCollisionSpi$Priority
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$1
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$2$ConnectClosure
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$2$ConnectClosure$1
-org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$7
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$8
+org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$9
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$HandshakeClosure
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$HandshakeMessage
 org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$HandshakeTimeoutException

http://git-wip-us.apache.org/repos/asf/ignite/blob/802d48b5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
index 7e23863..37cf26d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -155,7 +155,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
             });
 
         assert ver1.version().compareTo(ver2.version()) < 0;
-        assert ver1.updateTime() < ver2.updateTime();
+        assert ver1.updateTime() <= ver2.updateTime();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/802d48b5/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 8f5e07b..8f28aef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -116,7 +116,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
 
         include = true;
 
-        startGridsMultiThreaded(GRID_CNT - 1);
+        startGrids(GRID_CNT - 1);
 
         include = false;
 
@@ -878,33 +878,37 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testMasterNodeLeave() throws Exception {
-        Ignite g = startGrid("anotherGrid");
-
-        final UUID nodeId = g.cluster().localNode().id();
         final CountDownLatch latch = new CountDownLatch(GRID_CNT);
 
-        for (int i = 0; i < GRID_CNT; i++) {
-            grid(i).events().localListen(new IgnitePredicate<Event>() {
-                @Override public boolean apply(Event evt) {
-                    if (nodeId.equals(((DiscoveryEvent) evt).eventNode().id()))
-                        latch.countDown();
+        Ignite g = startGrid("anotherGrid");
 
-                    return true;
-                }
-            }, EVT_NODE_LEFT, EVT_NODE_FAILED);
-        }
+        try {
+            final UUID nodeId = g.cluster().localNode().id();
+            for (int i = 0; i < GRID_CNT; i++) {
+                grid(i).events().localListen(new IgnitePredicate<Event>() {
+                    @Override public boolean apply(Event evt) {
+                        if (nodeId.equals(((DiscoveryEvent)evt).eventNode().id()))
+                            latch.countDown();
 
-        g.events().remoteListen(
-            null,
-            new P1<Event>() {
-                @Override public boolean apply(Event evt) {
-                    return true;
-                }
-            },
-            EVTS_ALL
-        );
+                        return true;
+                    }
+                }, EVT_NODE_LEFT, EVT_NODE_FAILED);
+            }
 
-        stopGrid("anotherGrid");
+            g.events().remoteListen(
+                null,
+                new P1<Event>() {
+                    @Override public boolean apply(Event evt) {
+                        return true;
+                    }
+                },
+                EVTS_ALL
+            );
+
+        }
+        finally {
+            stopGrid("anotherGrid");
+        }
 
         assert latch.await(3000, MILLISECONDS);
     }
@@ -915,42 +919,47 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
     public void testMasterNodeLeaveNoAutoUnsubscribe() throws Exception {
         Ignite g = startGrid("anotherGrid");
 
-        final UUID nodeId = g.cluster().localNode().id();
-        final CountDownLatch discoLatch = new CountDownLatch(GRID_CNT);
+        final CountDownLatch discoLatch;
 
-        for (int i = 0; i < GRID_CNT; i++) {
-            grid(0).events().localListen(new IgnitePredicate<Event>() {
-                @Override public boolean apply(Event evt) {
-                    if (nodeId.equals(((DiscoveryEvent) evt).eventNode().id()))
-                        discoLatch.countDown();
+        try {
+            final UUID nodeId = g.cluster().localNode().id();
+            discoLatch = new CountDownLatch(GRID_CNT);
 
-                    return true;
-                }
-            }, EVT_NODE_LEFT);
-        }
+            for (int i = 0; i < GRID_CNT; i++) {
+                grid(0).events().localListen(new IgnitePredicate<Event>() {
+                    @Override public boolean apply(Event evt) {
+                        if (nodeId.equals(((DiscoveryEvent) evt).eventNode().id()))
+                            discoLatch.countDown();
 
-        consumeLatch = new CountDownLatch(GRID_CNT * 2 + 1);
-        consumeCnt = new AtomicInteger();
+                        return true;
+                    }
+                }, EVT_NODE_LEFT);
+            }
 
-        noAutoUnsubscribe = true;
+            consumeLatch = new CountDownLatch(GRID_CNT * 2 + 1);
+            consumeCnt = new AtomicInteger();
 
-        g.events().remoteListen(
-            1, 0, false,
-            null,
-            new P1<Event>() {
-                @Override public boolean apply(Event evt) {
-                    consumeLatch.countDown();
-                    consumeCnt.incrementAndGet();
+            noAutoUnsubscribe = true;
 
-                    return true;
-                }
-            },
-            EVT_JOB_STARTED
-        );
+            g.events().remoteListen(
+                1, 0, false,
+                null,
+                new P1<Event>() {
+                    @Override public boolean apply(Event evt) {
+                        consumeLatch.countDown();
+                        consumeCnt.incrementAndGet();
 
-        grid(0).compute().broadcast(F.noop());
+                        return true;
+                    }
+                },
+                EVT_JOB_STARTED
+            );
 
-        stopGrid("anotherGrid");
+            grid(0).compute().broadcast(F.noop());
+        }
+        finally {
+            stopGrid("anotherGrid");
+        }
 
         discoLatch.await(3000, MILLISECONDS);
 


[36/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.

Posted by sb...@apache.org.
IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.


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

Branch: refs/heads/master
Commit: d71f6129bc737539e61206c391fc25c776f36242
Parents: 19d2dd0
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Nov 23 18:20:50 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Nov 23 18:20:50 2015 +0700

----------------------------------------------------------------------
 examples/schema-import/bin/db-init.sql          |   3 +-
 .../org/apache/ignite/schema/CacheConfig.java   |   7 +-
 .../java/org/apache/ignite/schema/Demo.java     |  20 +-
 .../org/apache/ignite/cache/QueryIndex.java     |  53 +-
 .../store/jdbc/CacheAbstractJdbcStore.java      | 638 ++++++++++++-------
 .../store/jdbc/CacheJdbcBlobStoreFactory.java   |  14 +-
 .../cache/store/jdbc/CacheJdbcPojoStore.java    | 444 +++++++++----
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   | 277 +++++++-
 .../ignite/cache/store/jdbc/JdbcType.java       | 255 ++++++++
 .../cache/store/jdbc/JdbcTypeDefaultHasher.java |  43 ++
 .../ignite/cache/store/jdbc/JdbcTypeField.java  | 172 +++++
 .../ignite/cache/store/jdbc/JdbcTypeHasher.java |  34 +
 .../processors/query/GridQueryProcessor.java    |   6 +-
 .../ignite/internal/visor/cache/VisorCache.java |   4 +-
 .../CacheJdbcPojoStoreAbstractSelfTest.java     | 395 ++++++++++++
 ...dbcPojoStoreOptimizedMarshallerSelfTest.java |  31 +
 ...JdbcPojoStorePortableMarshallerSelfTest.java |  85 +++
 .../store/jdbc/CacheJdbcPojoStoreTest.java      | 200 +++---
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |   2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |   6 +-
 modules/schema-import/README.txt                | 176 ++---
 .../ignite/schema/generator/CodeGenerator.java  | 198 +++---
 .../ignite/schema/generator/XmlGenerator.java   | 101 +--
 .../apache/ignite/schema/model/IndexItem.java   |  54 --
 .../ignite/schema/model/PojoDescriptor.java     |  72 +--
 .../ignite/schema/model/SchemaDescriptor.java   |   6 +-
 .../schema/parser/DatabaseMetadataParser.java   |  12 +-
 .../apache/ignite/schema/parser/DbTable.java    |  37 +-
 .../parser/dialect/DatabaseMetadataDialect.java |  32 +-
 .../parser/dialect/JdbcMetadataDialect.java     |  22 +-
 .../parser/dialect/OracleMetadataDialect.java   |  24 +-
 .../apache/ignite/schema/ui/ModalDialog.java    |   6 +-
 .../ignite/schema/ui/SchemaImportApp.java       |  13 +-
 .../schema/test/AbstractSchemaImportTest.java   |   4 +-
 .../schema/test/model/ignite-type-metadata.xml  | 610 +++++++++---------
 .../yardstick/config/ignite-store-config.xml    |  50 +-
 36 files changed, 2844 insertions(+), 1262 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/examples/schema-import/bin/db-init.sql
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/db-init.sql b/examples/schema-import/bin/db-init.sql
index f02236a..8a91a6a 100644
--- a/examples/schema-import/bin/db-init.sql
+++ b/examples/schema-import/bin/db-init.sql
@@ -17,7 +17,8 @@
 
 -- Script of database initialization for Schema Import Demo.
 drop table PERSON;
-create table PERSON(id integer not null, first_name varchar(50), last_name varchar(50), salary double not null, PRIMARY KEY(id));
+
+create table PERSON(id integer not null PRIMARY KEY, first_name varchar(50), last_name varchar(50), salary double not null);
 
 insert into PERSON(id, first_name, last_name, salary) values(1, 'Johannes', 'Kepler', 1000);
 insert into PERSON(id, first_name, last_name, salary) values(2, 'Galileo', 'Galilei', 2000);

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
index cb316c5..c5801cc 100644
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
+++ b/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
@@ -17,8 +17,7 @@
 
 package org.apache.ignite.schema;
 
-import javax.cache.configuration.Factory;
-import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
 import org.apache.ignite.configuration.CacheConfiguration;
 
 /**
@@ -31,7 +30,7 @@ public class CacheConfig {
      * @param name Cache name.
      * @param storeFactory Cache store factory.
      */
-    public static <K, V> CacheConfiguration<K, V> cache(String name, Factory<CacheStore<K, V>> storeFactory) {
+    public static <K, V> CacheConfiguration<K, V> cache(String name, CacheJdbcPojoStoreFactory<K, V> storeFactory) {
         throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
index cade7f1..a981f5a 100644
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
+++ b/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
@@ -18,13 +18,13 @@
 package org.apache.ignite.schema;
 
 import javax.cache.Cache;
-import javax.cache.configuration.Factory;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
+import org.apache.ignite.cache.store.jdbc.dialect.H2Dialect;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.transactions.Transaction;
 import org.h2.jdbcx.JdbcConnectionPool;
@@ -38,16 +38,14 @@ import org.h2.jdbcx.JdbcConnectionPool;
  */
 public class Demo {
     /**
-     * Constructs and returns a fully configured instance of a {@link CacheJdbcPojoStore}.
+     * Constructs and returns a fully configured instance of a {@link CacheJdbcPojoStoreFactory}.
      */
-    private static class H2DemoStoreFactory<K, V> implements Factory<CacheStore<K, V>> {
-        /** {@inheritDoc} */
-        @Override public CacheStore<K, V> create() {
-            CacheJdbcPojoStore<K, V> store = new CacheJdbcPojoStore<>();
+    private static class H2DemoStoreFactory<K, V> extends CacheJdbcPojoStoreFactory<K, V> {
+        /** Default constructor. */
+        H2DemoStoreFactory() {
+            setDialect(new H2Dialect());
 
-            store.setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/~/schema-import/demo", "sa", ""));
-
-            return store;
+            setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/~/schema-import/demo", "sa", ""));
         }
     }
 
@@ -144,4 +142,4 @@ public class Demo {
 
         System.out.println(">>> Updated person: " + cache.get(key));
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/QueryIndex.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/QueryIndex.java b/modules/core/src/main/java/org/apache/ignite/cache/QueryIndex.java
index f12044d..af11999 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/QueryIndex.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/QueryIndex.java
@@ -50,20 +50,33 @@ public class QueryIndex implements Serializable {
     /**
      * Creates single-field sorted ascending index.
      *
-     * @param name Field name.
+     * @param field Field name.
      */
-    public QueryIndex(String name) {
-        this(name, QueryIndexType.SORTED, true);
+    public QueryIndex(String field) {
+        this(field, QueryIndexType.SORTED, true);
     }
 
     /**
      * Creates single-field sorted index.
      *
-     * @param name Field name.
+     * @param field Field name.
      * @param asc Ascending flag.
      */
-    public QueryIndex(String name, boolean asc) {
-        this(name, QueryIndexType.SORTED, asc);
+    public QueryIndex(String field, boolean asc) {
+        this(field, QueryIndexType.SORTED, asc);
+    }
+
+    /**
+     * Creates single-field sorted index.
+     *
+     * @param field Field name.
+     * @param asc Ascending flag.
+     * @param name Index name.
+     */
+    public QueryIndex(String field, boolean asc, String name) {
+        this(field, QueryIndexType.SORTED, asc);
+
+        this.name = name;
     }
 
     /**
@@ -71,14 +84,20 @@ public class QueryIndex implements Serializable {
      * If index is sorted, then ascending sorting is used by default.
      * To specify sort order, use the next method.
      * This constructor should also have a corresponding setter method.
+     *
+     * @param field Field name.
+     * @param type Index type.
      */
     public QueryIndex(String field, QueryIndexType type) {
         this(Arrays.asList(field), type);
     }
 
     /**
-     * Creates index for one field. The last boolean parameter
-     * is ignored for non-sorted indexes.
+     * Creates index for one field. The last boolean parameter is ignored for non-sorted indexes.
+     *
+     * @param field Field name.
+     * @param type Index type.
+     * @param asc Ascending flag.
      */
     public QueryIndex(String field, QueryIndexType type, boolean asc) {
         fields = new LinkedHashMap<>();
@@ -88,6 +107,22 @@ public class QueryIndex implements Serializable {
     }
 
     /**
+     * Creates index for one field. The last boolean parameter is ignored for non-sorted indexes.
+     *
+     * @param field Field name.
+     * @param type Index type.
+     * @param asc Ascending flag.
+     * @param name Index name.
+     */
+    public QueryIndex(String field, QueryIndexType type, boolean asc, String name) {
+        fields = new LinkedHashMap<>();
+        fields.put(field, asc);
+
+        this.type = type;
+        this.name = name;
+    }
+
+    /**
      * Creates index for a collection of fields. If index is sorted, fields will be sorted in
      * ascending order.
      *
@@ -189,4 +224,4 @@ public class QueryIndex implements Serializable {
     public void setIndexType(QueryIndexType type) {
         this.type = type;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index 6e19234..6dc413b 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -30,6 +30,8 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.Callable;
@@ -66,6 +68,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiInClosure;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.lifecycle.LifecycleAware;
+import org.apache.ignite.marshaller.portable.BinaryMarshaller;
 import org.apache.ignite.resources.CacheStoreSessionResource;
 import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.resources.LoggerResource;
@@ -75,6 +78,10 @@ import org.jetbrains.annotations.Nullable;
 import static java.sql.Statement.EXECUTE_FAILED;
 import static java.sql.Statement.SUCCESS_NO_INFO;
 
+import static org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.DFLT_BATCH_SIZE;
+import static org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.DFLT_WRITE_ATTEMPTS;
+import static org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD;
+
 /**
  * Implementation of {@link CacheStore} backed by JDBC.
  * <p>
@@ -99,35 +106,43 @@ import static java.sql.Statement.SUCCESS_NO_INFO;
  * <h2 class="header">Java Example</h2>
  * <pre name="code" class="java">
  *    ...
- *    CacheConfiguration ccfg = new CacheConfiguration&lt;&gt;();
- *
- *    // Configure cache store.
- *    ccfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory(ConfigurationSnippet.store()));
+ *    // Create store factory.
+ *    CacheJdbcPojoStoreFactory storeFactory = new CacheJdbcPojoStoreFactory();
+ *    storeFactory.setDataSourceBean("your_data_source_name");
+ *    storeFactory.setDialect(new H2Dialect());
+ *    storeFactory.setTypes(array_with_your_types);
+ *    ...
+ *    ccfg.setCacheStoreFactory(storeFactory);
  *    ccfg.setReadThrough(true);
  *    ccfg.setWriteThrough(true);
  *
- *    // Configure cache types metadata.
- *    ccfg.setTypeMetadata(ConfigurationSnippet.typeMetadata());
- *
  *    cfg.setCacheConfiguration(ccfg);
  *    ...
  * </pre>
  */
 public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>, LifecycleAware {
-    /** Max attempt write count. */
-    protected static final int MAX_ATTEMPT_WRITE_COUNT = 2;
-
-    /** Default batch size for put and remove operations. */
-    protected static final int DFLT_BATCH_SIZE = 512;
-
-    /** Default batch size for put and remove operations. */
-    protected static final int DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD = 512;
-
     /** Connection attribute property name. */
     protected static final String ATTR_CONN_PROP = "JDBC_STORE_CONNECTION";
 
-    /** Empty column value. */
-    protected static final Object[] EMPTY_COLUMN_VALUE = new Object[] { null };
+    /** Built in Java types names. */
+    protected static final Collection<String> BUILT_IN_TYPES = new HashSet<>();
+
+    static {
+        BUILT_IN_TYPES.add("java.math.BigDecimal");
+        BUILT_IN_TYPES.add("java.lang.Boolean");
+        BUILT_IN_TYPES.add("java.lang.Byte");
+        BUILT_IN_TYPES.add("java.lang.Character");
+        BUILT_IN_TYPES.add("java.lang.Double");
+        BUILT_IN_TYPES.add("java.util.Date");
+        BUILT_IN_TYPES.add("java.sql.Date");
+        BUILT_IN_TYPES.add("java.lang.Float");
+        BUILT_IN_TYPES.add("java.lang.Integer");
+        BUILT_IN_TYPES.add("java.lang.Long");
+        BUILT_IN_TYPES.add("java.lang.Short");
+        BUILT_IN_TYPES.add("java.lang.String");
+        BUILT_IN_TYPES.add("java.sql.Timestamp");
+        BUILT_IN_TYPES.add("java.util.UUID");
+    }
 
     /** Auto-injected store session. */
     @CacheStoreSessionResource
@@ -135,7 +150,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
     /** Auto injected ignite instance. */
     @IgniteInstanceResource
-    private Ignite ignite;
+    protected Ignite ignite;
 
     /** Auto-injected logger instance. */
     @LoggerResource
@@ -151,30 +166,40 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
     /** Cache with entry mapping description. (cache name, (key id, mapping description)). */
     protected volatile Map<String, Map<Object, EntryMapping>> cacheMappings = Collections.emptyMap();
 
+    /** Maximum batch size for writeAll and deleteAll operations. */
+    private int batchSize = DFLT_BATCH_SIZE;
+
     /** Database dialect. */
     protected JdbcDialect dialect;
 
-    /** Max workers thread count. These threads are responsible for load cache. */
-    private int maxPoolSz = Runtime.getRuntime().availableProcessors();
+    /** Maximum write attempts in case of database error. */
+    private int maxWrtAttempts = DFLT_WRITE_ATTEMPTS;
 
-    /** Maximum batch size for writeAll and deleteAll operations. */
-    private int batchSz = DFLT_BATCH_SIZE;
+    /** Max workers thread count. These threads are responsible for load cache. */
+    private int maxPoolSize = Runtime.getRuntime().availableProcessors();
 
     /** Parallel load cache minimum threshold. If {@code 0} then load sequentially. */
     private int parallelLoadCacheMinThreshold = DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD;
 
+    /** Types that store could process. */
+    private JdbcType[] types;
+
+    /** Hash calculator.  */
+    protected JdbcTypeHasher hasher = JdbcTypeDefaultHasher.INSTANCE;
+
     /**
      * Get field value from object for use as query parameter.
      *
      * @param cacheName Cache name.
      * @param typeName Type name.
+     * @param typeKind Type kind.
      * @param fieldName Field name.
      * @param obj Cache object.
      * @return Field value from object.
      * @throws CacheException in case of error.
      */
-    @Nullable protected abstract Object extractParameter(@Nullable String cacheName, String typeName, String fieldName,
-        Object obj) throws CacheException;
+    @Nullable protected abstract Object extractParameter(@Nullable String cacheName, String typeName, TypeKind typeKind,
+        String fieldName, Object obj) throws CacheException;
 
     /**
      * Construct object from query result.
@@ -182,33 +207,36 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * @param <R> Type of result object.
      * @param cacheName Cache name.
      * @param typeName Type name.
-     * @param fields Fields descriptors.
+     * @param typeKind Type kind.
+     * @param flds Fields descriptors.
+     * @param hashFlds Field names for hash code calculation.
      * @param loadColIdxs Select query columns index.
      * @param rs ResultSet.
      * @return Constructed object.
      * @throws CacheLoaderException If failed to construct cache object.
      */
-    protected abstract <R> R buildObject(@Nullable String cacheName, String typeName,
-        Collection<CacheTypeFieldMetadata> fields, Map<String, Integer> loadColIdxs, ResultSet rs)
+    protected abstract <R> R buildObject(@Nullable String cacheName, String typeName, TypeKind typeKind,
+        JdbcTypeField[] flds, Collection<String> hashFlds, Map<String, Integer> loadColIdxs, ResultSet rs)
         throws CacheLoaderException;
 
     /**
-     * Extract key type id from key object.
+     * Calculate type ID for object.
      *
-     * @param key Key object.
-     * @return Key type id.
-     * @throws CacheException If failed to get type key id from object.
+     * @param obj Object to calculate type ID for.
+     * @return Type ID.
+     * @throws CacheException If failed to calculate type ID for given object.
      */
-    protected abstract Object keyTypeId(Object key) throws CacheException;
+    protected abstract Object typeIdForObject(Object obj) throws CacheException;
 
     /**
-     * Extract key type id from key class name.
+     * Calculate type ID for given type name.
      *
-     * @param type String description of key type.
-     * @return Key type id.
-     * @throws CacheException If failed to get type key id from object.
+     * @param kind If {@code true} then calculate type ID for POJO otherwise for binary object .
+     * @param typeName String description of type name.
+     * @return Type ID.
+     * @throws CacheException If failed to get type ID for given type name.
      */
-    protected abstract Object keyTypeId(String type) throws CacheException;
+    protected abstract Object typeIdForTypeName(TypeKind kind, String typeName) throws CacheException;
 
     /**
      * Prepare internal store specific builders for provided types metadata.
@@ -217,7 +245,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * @param types Collection of types.
      * @throws CacheException If failed to prepare internal builders for types.
      */
-    protected abstract void prepareBuilders(@Nullable String cacheName, Collection<CacheTypeMetadata> types)
+    protected abstract void prepareBuilders(@Nullable String cacheName, Collection<JdbcType> types)
         throws CacheException;
 
     /**
@@ -480,23 +508,23 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                         ? em.loadCacheQry
                         : em.loadCacheRangeQuery(lowerBound != null, upperBound != null));
 
-                    int ix = 1;
+                    int idx = 1;
 
                     if (lowerBound != null)
                         for (int i = lowerBound.length; i > 0; i--)
                             for (int j = 0; j < i; j++)
-                                stmt.setObject(ix++, lowerBound[j]);
+                                stmt.setObject(idx++, lowerBound[j]);
 
                     if (upperBound != null)
                         for (int i = upperBound.length; i > 0; i--)
                             for (int j = 0; j < i; j++)
-                                stmt.setObject(ix++, upperBound[j]);
+                                stmt.setObject(idx++, upperBound[j]);
 
                     ResultSet rs = stmt.executeQuery();
 
                     while (rs.next()) {
-                        K key = buildObject(em.cacheName, em.keyType(), em.keyColumns(), em.loadColIdxs, rs);
-                        V val = buildObject(em.cacheName, em.valueType(), em.valueColumns(), em.loadColIdxs, rs);
+                        K key = buildObject(em.cacheName, em.keyType(), em.keyKind(), em.keyColumns(), em.keyCols, em.loadColIdxs, rs);
+                        V val = buildObject(em.cacheName, em.valueType(), em.valueKind(), em.valueColumns(), null, em.loadColIdxs, rs);
 
                         clo.apply(key, val);
                     }
@@ -527,58 +555,86 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
     }
 
     /**
-     * Object is a simple type.
+     * Checks if type configured properly.
      *
-     * @param cls Class.
-     * @return {@code True} if object is a simple type.
-     */
-    protected static boolean simpleType(Class<?> cls) {
-        return (Number.class.isAssignableFrom(cls) || String.class.isAssignableFrom(cls) ||
-            java.util.Date.class.isAssignableFrom(cls) || Boolean.class.isAssignableFrom(cls) ||
-            UUID.class.isAssignableFrom(cls));
-    }
-
-    /**
      * @param cacheName Cache name to check mapping for.
-     * @param clsName Class name.
-     * @param fields Fields descriptors.
-     * @throws CacheException If failed to check type metadata.
+     * @param typeName Type name.
+     * @param flds Fields descriptors.
+     * @throws CacheException If failed to check type configuration.
      */
-    private static void checkMapping(@Nullable String cacheName, String clsName,
-        Collection<CacheTypeFieldMetadata> fields) throws CacheException {
+    private void checkTypeConfiguration(@Nullable String cacheName, TypeKind kind, String typeName,
+        JdbcTypeField[] flds) throws CacheException {
         try {
-            Class<?> cls = Class.forName(clsName);
-
-            if (simpleType(cls)) {
-                if (fields.size() != 1)
-                    throw new CacheException("More than one field for simple type [cache name=" + cacheName
-                        + ", type=" + clsName + " ]");
+            if (kind == TypeKind.BUILT_IN) {
+                if (flds.length != 1)
+                    throw new CacheException("More than one field for built in type [cache=" +  U.maskName(cacheName) +
+                        ", type=" + typeName + " ]");
 
-                CacheTypeFieldMetadata field = F.first(fields);
+                JdbcTypeField field = flds[0];
 
-                if (field.getDatabaseName() == null)
-                    throw new CacheException("Missing database name in mapping description [cache name=" + cacheName
-                        + ", type=" + clsName + " ]");
+                if (field.getDatabaseFieldName() == null)
+                    throw new CacheException("Missing database name in mapping description [cache=" +
+                        U.maskName(cacheName) + ", type=" + typeName + " ]");
 
-                field.setJavaType(cls);
+                field.setJavaFieldType(Class.forName(typeName));
             }
             else
-                for (CacheTypeFieldMetadata field : fields) {
-                    if (field.getDatabaseName() == null)
-                        throw new CacheException("Missing database name in mapping description [cache name=" + cacheName
-                            + ", type=" + clsName + " ]");
-
-                    if (field.getJavaName() == null)
-                        throw new CacheException("Missing field name in mapping description [cache name=" + cacheName
-                            + ", type=" + clsName + " ]");
-
-                    if (field.getJavaType() == null)
-                        throw new CacheException("Missing field type in mapping description [cache name=" + cacheName
-                            + ", type=" + clsName + " ]");
+                for (JdbcTypeField field : flds) {
+                    if (field.getDatabaseFieldName() == null)
+                        throw new CacheException("Missing database name in mapping description [cache=" +
+                            U.maskName(cacheName) + ", type=" + typeName + " ]");
+
+                    if (field.getJavaFieldName() == null)
+                        throw new CacheException("Missing field name in mapping description [cache=" +
+                            U.maskName(cacheName) + ", type=" + typeName + " ]");
+
+                    if (field.getJavaFieldType() == null)
+                        throw new CacheException("Missing field type in mapping description [cache=" +
+                            U.maskName(cacheName) + ", type=" + typeName + " ]");
                 }
         }
         catch (ClassNotFoundException e) {
-            throw new CacheException("Failed to find class: " + clsName, e);
+            throw new CacheException("Failed to find class: " + typeName, e);
+        }
+    }
+
+    /**
+     * For backward compatibility translate old field type descriptors to new format.
+     *
+     * @param oldFlds Fields in old format.
+     * @return Fields in new format.
+     */
+    @Deprecated
+    private JdbcTypeField[] translateFields(Collection<CacheTypeFieldMetadata> oldFlds) {
+        JdbcTypeField[] newFlds = new JdbcTypeField[oldFlds.size()];
+
+        int idx = 0;
+
+        for (CacheTypeFieldMetadata oldField : oldFlds) {
+            newFlds[idx] = new JdbcTypeField(oldField.getDatabaseType(), oldField.getDatabaseName(),
+                oldField.getJavaType(), oldField.getJavaName());
+
+            idx++;
+        }
+
+        return newFlds;
+    }
+
+    /**
+     * @param type Type name to check.
+     * @return {@code True} if class not found.
+     */
+    protected TypeKind kindForName(String type) {
+        if (BUILT_IN_TYPES.contains(type))
+            return TypeKind.BUILT_IN;
+
+        try {
+            Class.forName(type);
+
+            return TypeKind.POJO;
+        }
+        catch(ClassNotFoundException ignored) {
+            return TypeKind.BINARY;
         }
     }
 
@@ -587,46 +643,104 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * @return Type mappings for specified cache name.
      * @throws CacheException If failed to initialize cache mappings.
      */
-    private Map<Object, EntryMapping> cacheMappings(@Nullable String cacheName) throws CacheException {
+    private Map<Object, EntryMapping> getOrCreateCacheMappings(@Nullable String cacheName) throws CacheException {
         Map<Object, EntryMapping> entryMappings = cacheMappings.get(cacheName);
 
         if (entryMappings != null)
             return entryMappings;
 
         cacheMappingsLock.lock();
-
         try {
             entryMappings = cacheMappings.get(cacheName);
 
             if (entryMappings != null)
                 return entryMappings;
 
-            CacheConfiguration ccfg = ignite().cache(cacheName).getConfiguration(CacheConfiguration.class);
+            // If no types configured, check CacheTypeMetadata for backward compatibility.
+            if (types == null) {
+                CacheConfiguration ccfg = ignite.cache(cacheName).getConfiguration(CacheConfiguration.class);
+
+                Collection<CacheTypeMetadata> oldTypes = ccfg.getTypeMetadata();
+
+                types = new JdbcType[oldTypes.size()];
+
+                int idx = 0;
+
+                for (CacheTypeMetadata oldType : oldTypes) {
+                    JdbcType newType = new JdbcType();
 
-            Collection<CacheTypeMetadata> types = ccfg.getTypeMetadata();
+                    newType.setCacheName(cacheName);
 
-            entryMappings = U.newHashMap(types.size());
+                    newType.setDatabaseSchema(oldType.getDatabaseSchema());
+                    newType.setDatabaseTable(oldType.getDatabaseTable());
 
-            for (CacheTypeMetadata type : types) {
-                Object keyTypeId = keyTypeId(type.getKeyType());
+                    newType.setKeyType(oldType.getKeyType());
+                    newType.setKeyFields(translateFields(oldType.getKeyFields()));
 
-                if (entryMappings.containsKey(keyTypeId))
-                    throw new CacheException("Key type must be unique in type metadata [cache name=" + cacheName +
-                        ", key type=" + type.getKeyType() + "]");
+                    newType.setValueType(oldType.getValueType());
+                    newType.setValueFields(translateFields(oldType.getValueFields()));
 
-                checkMapping(cacheName, type.getKeyType(), type.getKeyFields());
-                checkMapping(cacheName, type.getValueType(), type.getValueFields());
+                    types[idx] = newType;
 
-                entryMappings.put(keyTypeId(type.getKeyType()), new EntryMapping(cacheName, dialect, type));
+                    idx++;
+                }
             }
 
-            Map<String, Map<Object, EntryMapping>> mappings = new HashMap<>(cacheMappings);
+            List<JdbcType> cacheTypes = new ArrayList<>(types.length);
+
+            for (JdbcType type : types)
+                if ((cacheName != null && cacheName.equals(type.getCacheName())) ||
+                    (cacheName == null && type.getCacheName() == null))
+                    cacheTypes.add(type);
+
+            entryMappings = U.newHashMap(cacheTypes.size());
+
+            if (!cacheTypes.isEmpty()) {
+                boolean binarySupported = ignite.configuration().getMarshaller() instanceof BinaryMarshaller;
+
+                for (JdbcType type : cacheTypes) {
+                    String keyType = type.getKeyType();
+                    String valType = type.getValueType();
+
+                    TypeKind keyKind = kindForName(keyType);
+
+                    if (!binarySupported && keyKind == TypeKind.BINARY)
+                        throw new CacheException("Key type has no class [cache=" + U.maskName(cacheName) +
+                            ", type=" + keyType + "]");
+
+                    checkTypeConfiguration(cacheName, keyKind, keyType, type.getKeyFields());
+
+                    Object keyTypeId = typeIdForTypeName(keyKind, keyType);
 
-            mappings.put(cacheName, entryMappings);
+                    if (entryMappings.containsKey(keyTypeId))
+                        throw new CacheException("Key type must be unique in type metadata [cache=" +
+                            U.maskName(cacheName) + ", type=" + keyType + "]");
 
-            prepareBuilders(cacheName, types);
+                    TypeKind valKind = kindForName(valType);
 
-            cacheMappings = mappings;
+                    checkTypeConfiguration(cacheName, valKind, valType, type.getValueFields());
+
+                    entryMappings.put(keyTypeId, new EntryMapping(cacheName, dialect, type, keyKind, valKind));
+
+                    // Add one more binding to binary typeId for POJOs,
+                    // because object could be passed to store in binary format.
+                    if (binarySupported && keyKind == TypeKind.POJO) {
+                        keyTypeId = typeIdForTypeName(TypeKind.BINARY, keyType);
+
+                        valKind = valKind == TypeKind.POJO ? TypeKind.BINARY : valKind;
+
+                        entryMappings.put(keyTypeId, new EntryMapping(cacheName, dialect, type, TypeKind.BINARY, valKind));
+                    }
+                }
+
+                Map<String, Map<Object, EntryMapping>> mappings = new HashMap<>(cacheMappings);
+
+                mappings.put(cacheName, entryMappings);
+
+                prepareBuilders(cacheName, cacheTypes);
+
+                cacheMappings = mappings;
+            }
 
             return entryMappings;
         }
@@ -637,19 +751,21 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
     /**
      * @param cacheName Cache name.
-     * @param keyTypeId Key type id.
-     * @param key Key object.
+     * @param typeId Type id.
      * @return Entry mapping.
      * @throws CacheException If mapping for key was not found.
      */
-    private EntryMapping entryMapping(String cacheName, Object keyTypeId, Object key) throws CacheException {
-        EntryMapping em = cacheMappings(cacheName).get(keyTypeId);
+    private EntryMapping entryMapping(String cacheName, Object typeId) throws CacheException {
+        Map<Object, EntryMapping> mappings = getOrCreateCacheMappings(cacheName);
+
+        EntryMapping em = mappings.get(typeId);
 
         if (em == null) {
             String maskedCacheName = U.maskName(cacheName);
 
-            throw new CacheException("Failed to find mapping description [key=" + key +
-                ", cache=" + maskedCacheName + "]. Please configure CacheTypeMetadata to associate '" + maskedCacheName + "' with JdbcPojoStore.");
+            throw new CacheException("Failed to find mapping description [cache=" + maskedCacheName +
+                ", typeId=" + typeId + "]. Please configure JdbcType to associate cache '" + maskedCacheName +
+                "' with JdbcPojoStore.");
         }
 
         return em;
@@ -663,34 +779,37 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         String cacheName = session().cacheName();
 
         try {
-            pool = Executors.newFixedThreadPool(maxPoolSz);
+            pool = Executors.newFixedThreadPool(maxPoolSize);
 
             Collection<Future<?>> futs = new ArrayList<>();
 
+            Map<Object, EntryMapping> mappings = getOrCreateCacheMappings(cacheName);
+
             if (args != null && args.length > 0) {
                 if (args.length % 2 != 0)
                     throw new CacheLoaderException("Expected even number of arguments, but found: " + args.length);
 
                 if (log.isDebugEnabled())
-                    log.debug("Start loading entries from db using user queries from arguments");
+                    log.debug("Start loading entries from db using user queries from arguments...");
 
                 for (int i = 0; i < args.length; i += 2) {
                     String keyType = args[i].toString();
 
                     String selQry = args[i + 1].toString();
 
-                    EntryMapping em = entryMapping(cacheName, keyTypeId(keyType), keyType);
+                    EntryMapping em = entryMapping(cacheName, typeIdForTypeName(kindForName(keyType), keyType));
 
                     futs.add(pool.submit(new LoadCacheCustomQueryWorker<>(em, selQry, clo)));
                 }
             }
             else {
-                Collection<EntryMapping> entryMappings = cacheMappings(session().cacheName()).values();
+                Collection<EntryMapping> entryMappings = mappings.values();
 
                 for (EntryMapping em : entryMappings) {
                     if (parallelLoadCacheMinThreshold > 0) {
-                        log.debug("Multithread loading entries from db [cache name=" + cacheName +
-                            ", key type=" + em.keyType() + " ]");
+                        if (log.isDebugEnabled())
+                            log.debug("Multithread loading entries from db [cache=" +  U.maskName(cacheName) +
+                                ", keyType=" + em.keyType() + " ]");
 
                         Connection conn = null;
 
@@ -738,8 +857,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                     }
                     else {
                         if (log.isDebugEnabled())
-                            log.debug("Single thread loading entries from db [cache name=" + cacheName +
-                                ", key type=" + em.keyType() + " ]");
+                            log.debug("Single thread loading entries from db [cache=" +  U.maskName(cacheName) +
+                                ", keyType=" + em.keyType() + " ]");
 
                         futs.add(pool.submit(loadCacheFull(em, clo)));
                     }
@@ -750,10 +869,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 U.get(fut);
 
             if (log.isDebugEnabled())
-                log.debug("Cache loaded from db: " + cacheName);
+                log.debug("Cache loaded from db: " +  U.maskName(cacheName));
         }
         catch (IgniteCheckedException e) {
-            throw new CacheLoaderException("Failed to load cache: " + cacheName, e.getCause());
+            throw new CacheLoaderException("Failed to load cache: " + U.maskName(cacheName), e.getCause());
         }
         finally {
             U.shutdownNow(getClass(), pool, log);
@@ -764,7 +883,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
     @Nullable @Override public V load(K key) throws CacheLoaderException {
         assert key != null;
 
-        EntryMapping em = entryMapping(session().cacheName(), keyTypeId(key), key);
+        EntryMapping em = entryMapping(session().cacheName(), typeIdForObject(key));
 
         if (log.isDebugEnabled())
             log.debug("Load value from db [table= " + em.fullTableName() + ", key=" + key + "]");
@@ -783,7 +902,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
             ResultSet rs = stmt.executeQuery();
 
             if (rs.next())
-                return buildObject(em.cacheName, em.valueType(), em.valueColumns(), em.loadColIdxs, rs);
+                return buildObject(em.cacheName, em.valueType(), em.valueKind(), em.valueColumns(), null, em.loadColIdxs, rs);
         }
         catch (SQLException e) {
             throw new CacheLoaderException("Failed to load object [table=" + em.fullTableName() +
@@ -807,14 +926,14 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
             String cacheName = session().cacheName();
 
-            Map<Object, LoadWorker<K, V>> workers = U.newHashMap(cacheMappings(cacheName).size());
+            Map<Object, LoadWorker<K, V>> workers = U.newHashMap(getOrCreateCacheMappings(cacheName).size());
 
             Map<K, V> res = new HashMap<>();
 
             for (K key : keys) {
-                Object keyTypeId = keyTypeId(key);
+                Object keyTypeId = typeIdForObject(key);
 
-                EntryMapping em = entryMapping(cacheName, keyTypeId, key);
+                EntryMapping em = entryMapping(cacheName, keyTypeId);
 
                 LoadWorker<K, V> worker = workers.get(keyTypeId);
 
@@ -852,7 +971,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         try {
             CacheWriterException we = null;
 
-            for (int attempt = 0; attempt < MAX_ATTEMPT_WRITE_COUNT; attempt++) {
+            for (int attempt = 0; attempt < maxWrtAttempts; attempt++) {
                 int paramIdx = fillValueParameters(updStmt, 1, em, entry.getValue());
 
                 fillKeyParameters(updStmt, paramIdx, em, entry.getKey());
@@ -921,7 +1040,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
         K key = entry.getKey();
 
-        EntryMapping em = entryMapping(session().cacheName(), keyTypeId(key), key);
+        EntryMapping em = entryMapping(session().cacheName(), typeIdForObject(key));
 
         if (log.isDebugEnabled())
             log.debug("Start write entry to database [table=" + em.fullTableName() + ", entry=" + entry + "]");
@@ -937,9 +1056,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 try {
                     stmt = conn.prepareStatement(em.mergeQry);
 
-                    int i = fillKeyParameters(stmt, em, key);
+                    int idx = fillKeyParameters(stmt, em, key);
 
-                    fillValueParameters(stmt, i, em, entry.getValue());
+                    fillValueParameters(stmt, idx, em, entry.getValue());
 
                     int updCnt = stmt.executeUpdate();
 
@@ -1010,15 +1129,15 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                     for (Cache.Entry<? extends K, ? extends V> entry : entries) {
                         K key = entry.getKey();
 
-                        Object keyTypeId = keyTypeId(key);
+                        Object keyTypeId = typeIdForObject(key);
 
-                        em = entryMapping(cacheName, keyTypeId, key);
+                        em = entryMapping(cacheName, keyTypeId);
 
                         if (currKeyTypeId == null || !currKeyTypeId.equals(keyTypeId)) {
                             if (mergeStmt != null) {
                                 if (log.isDebugEnabled())
-                                    log.debug("Write entries to db [cache name=" + cacheName +
-                                        ", key type=" + em.keyType() + ", count=" + prepared + "]");
+                                    log.debug("Write entries to db [cache=" +  U.maskName(cacheName) +
+                                        ", keyType=" + em.keyType() + ", cnt=" + prepared + "]");
 
                                 executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
 
@@ -1034,16 +1153,16 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                             prepared = 0;
                         }
 
-                        int i = fillKeyParameters(mergeStmt, em, key);
+                        int idx = fillKeyParameters(mergeStmt, em, key);
 
-                        fillValueParameters(mergeStmt, i, em, entry.getValue());
+                        fillValueParameters(mergeStmt, idx, em, entry.getValue());
 
                         mergeStmt.addBatch();
 
-                        if (++prepared % batchSz == 0) {
+                        if (++prepared % batchSize == 0) {
                             if (log.isDebugEnabled())
-                                log.debug("Write entries to db [cache name=" + cacheName +
-                                    ", key type=" + em.keyType() + ", count=" + prepared + "]");
+                                log.debug("Write entries to db [cache=" +  U.maskName(cacheName) +
+                                    ", keyType=" + em.keyType() + ", cnt=" + prepared + "]");
 
                             executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
 
@@ -1053,10 +1172,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                         }
                     }
 
-                    if (mergeStmt != null && prepared % batchSz != 0) {
+                    if (mergeStmt != null && prepared % batchSize != 0) {
                         if (log.isDebugEnabled())
-                            log.debug("Write entries to db [cache name=" + cacheName +
-                                ", key type=" + em.keyType() + ", count=" + prepared + "]");
+                            log.debug("Write entries to db [cache=" +  U.maskName(cacheName) +
+                                ", keyType=" + em.keyType() + ", cnt=" + prepared + "]");
 
                         executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
 
@@ -1067,8 +1186,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 }
             }
             else {
-                log.debug("Write entries to db one by one using update and insert statements [cache name=" +
-                    cacheName + ", count=" + entries.size() + "]");
+                if (log.isDebugEnabled())
+                    log.debug("Write entries to db one by one using update and insert statements [cache=" +
+                        U.maskName(cacheName) + ", cnt=" + entries.size() + "]");
 
                 PreparedStatement insStmt = null;
 
@@ -1078,9 +1198,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                     for (Cache.Entry<? extends K, ? extends V> entry : entries) {
                         K key = entry.getKey();
 
-                        Object keyTypeId = keyTypeId(key);
+                        Object keyTypeId = typeIdForObject(key);
 
-                        EntryMapping em = entryMapping(cacheName, keyTypeId, key);
+                        EntryMapping em = entryMapping(cacheName, keyTypeId);
 
                         if (currKeyTypeId == null || !currKeyTypeId.equals(keyTypeId)) {
                             U.closeQuiet(insStmt);
@@ -1116,7 +1236,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
     @Override public void delete(Object key) throws CacheWriterException {
         assert key != null;
 
-        EntryMapping em = entryMapping(session().cacheName(), keyTypeId(key), key);
+        EntryMapping em = entryMapping(session().cacheName(), typeIdForObject(key));
 
         if (log.isDebugEnabled())
             log.debug("Remove value from db [table=" + em.fullTableName() + ", key=" + key + "]");
@@ -1220,9 +1340,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
             int fromIdx = 0, prepared = 0;
 
             for (Object key : keys) {
-                Object keyTypeId = keyTypeId(key);
+                Object keyTypeId = typeIdForObject(key);
 
-                em = entryMapping(cacheName, keyTypeId, key);
+                em = entryMapping(cacheName, keyTypeId);
 
                 if (delStmt == null) {
                     delStmt = conn.prepareStatement(em.remQry);
@@ -1232,8 +1352,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                 if (!currKeyTypeId.equals(keyTypeId)) {
                     if (log.isDebugEnabled())
-                        log.debug("Delete entries from db [cache name=" + cacheName +
-                            ", key type=" + em.keyType() + ", count=" + prepared + "]");
+                        log.debug("Delete entries from db [cache=" +  U.maskName(cacheName) +
+                            ", keyType=" + em.keyType() + ", cnt=" + prepared + "]");
 
                     executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
 
@@ -1248,10 +1368,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                 delStmt.addBatch();
 
-                if (++prepared % batchSz == 0) {
+                if (++prepared % batchSize == 0) {
                     if (log.isDebugEnabled())
-                        log.debug("Delete entries from db [cache name=" + cacheName +
-                            ", key type=" + em.keyType() + ", count=" + prepared + "]");
+                        log.debug("Delete entries from db [cache=" +  U.maskName(cacheName) +
+                            ", keyType=" + em.keyType() + ", cnt=" + prepared + "]");
 
                     executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
 
@@ -1261,10 +1381,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 }
             }
 
-            if (delStmt != null && prepared % batchSz != 0) {
+            if (delStmt != null && prepared % batchSize != 0) {
                 if (log.isDebugEnabled())
-                    log.debug("Delete entries from db [cache name=" + cacheName +
-                        ", key type=" + em.keyType() + ", count=" + prepared + "]");
+                    log.debug("Delete entries from db [cache=" +  U.maskName(cacheName) +
+                        ", keyType=" + em.keyType() + ", cnt=" + prepared + "]");
 
                 executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
             }
@@ -1281,17 +1401,17 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * Sets the value of the designated parameter using the given object.
      *
      * @param stmt Prepare statement.
-     * @param i Index for parameters.
+     * @param idx Index for parameters.
      * @param field Field descriptor.
      * @param fieldVal Field value.
      * @throws CacheException If failed to set statement parameter.
      */
-    protected void fillParameter(PreparedStatement stmt, int i, CacheTypeFieldMetadata field, @Nullable Object fieldVal)
+    protected void fillParameter(PreparedStatement stmt, int idx, JdbcTypeField field, @Nullable Object fieldVal)
         throws CacheException {
         try {
             if (fieldVal != null) {
-                if (field.getJavaType() == UUID.class) {
-                    switch (field.getDatabaseType()) {
+                if (field.getJavaFieldType() == UUID.class) {
+                    switch (field.getDatabaseFieldType()) {
                         case Types.BINARY:
                             fieldVal = U.uuidToBytes((UUID)fieldVal);
 
@@ -1304,13 +1424,13 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                     }
                 }
 
-                stmt.setObject(i, fieldVal);
+                stmt.setObject(idx, fieldVal);
             }
             else
-                stmt.setNull(i, field.getDatabaseType());
+                stmt.setNull(idx, field.getDatabaseFieldType());
         }
         catch (SQLException e) {
-            throw new CacheException("Failed to set statement parameter name: " + field.getDatabaseName(), e);
+            throw new CacheException("Failed to set statement parameter name: " + field.getDatabaseFieldName(), e);
         }
     }
 
@@ -1324,8 +1444,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      */
     protected int fillKeyParameters(PreparedStatement stmt, int idx, EntryMapping em,
         Object key) throws CacheException {
-        for (CacheTypeFieldMetadata field : em.keyColumns()) {
-            Object fieldVal = extractParameter(em.cacheName, em.keyType(), field.getJavaName(), key);
+        for (JdbcTypeField field : em.keyColumns()) {
+            Object fieldVal = extractParameter(em.cacheName, em.keyType(), em.keyKind(), field.getJavaFieldName(), key);
 
             fillParameter(stmt, idx++, field, fieldVal);
         }
@@ -1354,8 +1474,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      */
     protected int fillValueParameters(PreparedStatement stmt, int idx, EntryMapping em, Object val)
         throws CacheWriterException {
-        for (CacheTypeFieldMetadata field : em.uniqValFields) {
-            Object fieldVal = extractParameter(em.cacheName, em.valueType(), field.getJavaName(), val);
+        for (JdbcTypeField field : em.uniqValFlds) {
+            Object fieldVal = extractParameter(em.cacheName, em.valueType(), em.valueKind(), field.getJavaFieldName(), val);
 
             fillParameter(stmt, idx++, field, fieldVal);
         }
@@ -1401,16 +1521,70 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * @return Max workers thread count.
      */
     public int getMaximumPoolSize() {
-        return maxPoolSz;
+        return maxPoolSize;
     }
 
     /**
      * Set Max workers thread count. These threads are responsible for execute query.
      *
-     * @param maxPoolSz Max workers thread count.
+     * @param maxPoolSize Max workers thread count.
      */
-    public void setMaximumPoolSize(int maxPoolSz) {
-        this.maxPoolSz = maxPoolSz;
+    public void setMaximumPoolSize(int maxPoolSize) {
+        this.maxPoolSize = maxPoolSize;
+    }
+
+    /**
+     * Gets maximum number of write attempts in case of database error.
+     *
+     * @return Maximum number of write attempts.
+     */
+    public int getMaximumWriteAttempts() {
+        return maxWrtAttempts;
+    }
+
+    /**
+     * Sets maximum number of write attempts in case of database error.
+     *
+     * @param maxWrtAttempts Number of write attempts.
+     */
+    public void setMaximumWriteAttempts(int maxWrtAttempts) {
+        this.maxWrtAttempts = maxWrtAttempts;
+    }
+
+    /**
+     * Gets types known by store.
+     *
+     * @return Types known by store.
+     */
+    public JdbcType[] getTypes() {
+        return types;
+    }
+
+    /**
+     * Sets store configurations.
+     *
+     * @param types Store should process.
+     */
+    public void setTypes(JdbcType... types) {
+        this.types = types;
+    }
+
+    /**
+     * Gets hash code calculator.
+     *
+     * @return Hash code calculator.
+     */
+    public JdbcTypeHasher getHasher() {
+        return hasher;
+    }
+
+    /**
+     * Sets hash code calculator.
+     *
+     * @param hasher Hash code calculator.
+     */
+    public void setHasher(JdbcTypeHasher hasher) {
+        this.hasher = hasher;
     }
 
     /**
@@ -1419,16 +1593,16 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * @return Maximum batch size.
      */
     public int getBatchSize() {
-        return batchSz;
+        return batchSize;
     }
 
     /**
      * Set maximum batch size for write and delete operations.
      *
-     * @param batchSz Maximum batch size.
+     * @param batchSize Maximum batch size.
      */
-    public void setBatchSize(int batchSz) {
-        this.batchSz = batchSz;
+    public void setBatchSize(int batchSize) {
+        this.batchSize = batchSize;
     }
 
     /**
@@ -1464,6 +1638,18 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
     }
 
     /**
+     * Type kind.
+     */
+    protected enum TypeKind {
+        /** Type is known as Java built in type, like {@link String} */
+        BUILT_IN,
+        /** Class for this type is available. */
+        POJO,
+        /** Class for this type is not available. */
+        BINARY
+    }
+
+    /**
      * Entry mapping description.
      */
     protected static class EntryMapping {
@@ -1510,10 +1696,16 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         private final Map<String, Integer> loadColIdxs;
 
         /** Unique value fields. */
-        private final Collection<CacheTypeFieldMetadata> uniqValFields;
+        private final Collection<JdbcTypeField> uniqValFlds;
 
         /** Type metadata. */
-        private final CacheTypeMetadata typeMeta;
+        private final JdbcType typeMeta;
+
+        /** Key type kind. */
+        private final TypeKind keyKind;
+
+        /** Value type kind. */
+        private final TypeKind valKind;
 
         /** Full table name. */
         private final String fullTblName;
@@ -1523,22 +1715,27 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
          * @param dialect JDBC dialect.
          * @param typeMeta Type metadata.
          */
-        public EntryMapping(@Nullable String cacheName, JdbcDialect dialect, CacheTypeMetadata typeMeta) {
+        public EntryMapping(@Nullable String cacheName, JdbcDialect dialect, JdbcType typeMeta,
+            TypeKind keyKind, TypeKind valKind) {
             this.cacheName = cacheName;
 
             this.dialect = dialect;
 
             this.typeMeta = typeMeta;
 
-            Collection<CacheTypeFieldMetadata> keyFields = typeMeta.getKeyFields();
+            this.keyKind = keyKind;
+
+            this.valKind = valKind;
+
+            JdbcTypeField[] keyFields = typeMeta.getKeyFields();
 
-            Collection<CacheTypeFieldMetadata> valFields = typeMeta.getValueFields();
+            JdbcTypeField[] valFields = typeMeta.getValueFields();
 
-            keyCols = databaseColumns(keyFields);
+            keyCols = databaseColumns(F.asList(keyFields));
 
-            uniqValFields = F.view(valFields, new IgnitePredicate<CacheTypeFieldMetadata>() {
-                @Override public boolean apply(CacheTypeFieldMetadata col) {
-                    return !keyCols.contains(col.getDatabaseName());
+            uniqValFlds = F.view(F.asList(valFields), new IgnitePredicate<JdbcTypeField>() {
+                @Override public boolean apply(JdbcTypeField col) {
+                    return !keyCols.contains(col.getDatabaseFieldName());
                 }
             });
 
@@ -1548,7 +1745,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
             fullTblName = F.isEmpty(schema) ? tblName : schema + "." + tblName;
 
-            Collection<String> uniqValCols = databaseColumns(uniqValFields);
+            Collection<String> uniqValCols = databaseColumns(uniqValFlds);
 
             cols = F.concat(false, keyCols, uniqValCols);
 
@@ -1579,21 +1776,49 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         }
 
         /**
-         * Extract database column names from {@link CacheTypeFieldMetadata}.
+         * Extract database column names from {@link JdbcTypeField}.
          *
-         * @param dsc collection of {@link CacheTypeFieldMetadata}.
+         * @param dsc collection of {@link JdbcTypeField}.
          * @return Collection with database column names.
          */
-        private static Collection<String> databaseColumns(Collection<CacheTypeFieldMetadata> dsc) {
-            return F.transform(dsc, new C1<CacheTypeFieldMetadata, String>() {
+        private static Collection<String> databaseColumns(Collection<JdbcTypeField> dsc) {
+            return F.transform(dsc, new C1<JdbcTypeField, String>() {
                 /** {@inheritDoc} */
-                @Override public String apply(CacheTypeFieldMetadata col) {
-                    return col.getDatabaseName();
+                @Override public String apply(JdbcTypeField col) {
+                    return col.getDatabaseFieldName();
                 }
             });
         }
 
         /**
+         * @return Key type.
+         */
+        protected String keyType() {
+            return typeMeta.getKeyType();
+        }
+
+        /**
+         * @return Key type kind.
+         */
+        protected TypeKind keyKind() {
+            return keyKind;
+        }
+
+        /**
+         * @return Value type.
+         */
+        protected String valueType() {
+            return typeMeta.getValueType();
+        }
+
+        /**
+         * @return Value type kind.
+         */
+        protected TypeKind valueKind() {
+            return valKind;
+        }
+
+        /**
          * Construct query for select values with key count less or equal {@code maxKeysPerStmt}
          *
          * @param keyCnt Key count.
@@ -1623,25 +1848,11 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         }
 
         /**
-         * @return Key type.
-         */
-        protected String keyType() {
-            return typeMeta.getKeyType();
-        }
-
-        /**
-         * @return Value type.
-         */
-        protected String valueType() {
-            return typeMeta.getValueType();
-        }
-
-        /**
          * Gets key columns.
          *
          * @return Key columns.
          */
-        protected Collection<CacheTypeFieldMetadata> keyColumns() {
+        protected JdbcTypeField[] keyColumns() {
             return typeMeta.getKeyFields();
         }
 
@@ -1650,7 +1861,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
          *
          * @return Value columns.
          */
-        protected Collection<CacheTypeFieldMetadata> valueColumns() {
+        protected JdbcTypeField[] valueColumns() {
             return typeMeta.getValueFields();
         }
 
@@ -1694,8 +1905,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         /** {@inheritDoc} */
         @Override public Void call() throws Exception {
             if (log.isDebugEnabled())
-                log.debug("Load cache using custom query [cache name= " + em.cacheName +
-                    ", key type=" + em.keyType() + ", query=" + qry + "]");
+                log.debug("Load cache using custom query [cache= " + U.maskName(em.cacheName) +
+                    ", keyType=" + em.keyType() + ", query=" + qry + "]");
 
             Connection conn = null;
 
@@ -1716,8 +1927,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                     colIdxs.put(meta.getColumnLabel(i), i);
 
                 while (rs.next()) {
-                    K1 key = buildObject(em.cacheName, em.keyType(), em.keyColumns(), colIdxs, rs);
-                    V1 val = buildObject(em.cacheName, em.valueType(), em.valueColumns(), colIdxs, rs);
+                    K1 key = buildObject(em.cacheName, em.keyType(), em.keyKind(), em.keyColumns(), em.keyCols, colIdxs, rs);
+                    V1 val = buildObject(em.cacheName, em.valueType(), em.valueKind(), em.valueColumns(), null, colIdxs, rs);
 
                     clo.apply(key, val);
                 }
@@ -1790,8 +2001,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         /** {@inheritDoc} */
         @Override public Map<K1, V1> call() throws Exception {
             if (log.isDebugEnabled())
-                log.debug("Load values from db [table= " + em.fullTableName() +
-                    ", key count=" + keys.size() + "]");
+                log.debug("Load values from db [table= " + em.fullTableName() + ", keysCnt=" + keys.size() + "]");
 
             PreparedStatement stmt = null;
 
@@ -1801,8 +2011,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 int idx = 1;
 
                 for (Object key : keys)
-                    for (CacheTypeFieldMetadata field : em.keyColumns()) {
-                        Object fieldVal = extractParameter(em.cacheName, em.keyType(), field.getJavaName(), key);
+                    for (JdbcTypeField field : em.keyColumns()) {
+                        Object fieldVal = extractParameter(em.cacheName, em.keyType(), em.keyKind(), field.getJavaFieldName(), key);
 
                         fillParameter(stmt, idx++, field, fieldVal);
                     }
@@ -1812,8 +2022,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 Map<K1, V1> entries = U.newHashMap(keys.size());
 
                 while (rs.next()) {
-                    K1 key = buildObject(em.cacheName, em.keyType(), em.keyColumns(), em.loadColIdxs, rs);
-                    V1 val = buildObject(em.cacheName, em.valueType(), em.valueColumns(), em.loadColIdxs, rs);
+                    K1 key = buildObject(em.cacheName, em.keyType(), em.keyKind(), em.keyColumns(), em.keyCols, em.loadColIdxs, rs);
+                    V1 val = buildObject(em.cacheName, em.valueType(), em.valueKind(), em.valueColumns(), null, em.loadColIdxs, rs);
 
                     entries.put(key, val);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
index 74ab30b..6a46619 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
@@ -35,7 +35,7 @@ import org.apache.ignite.resources.SpringApplicationContextResource;
  *
  * <h2 class="header">Spring Example</h2>
  * <pre name="code" class="xml">
- *     &lt;bean id= "simpleDataSource" class="org.h2.jdbcx.JdbcDataSource"/&gt;
+ *     &lt;bean id= "myDataSource" class="org.h2.jdbcx.JdbcDataSource"/&gt;
  *
  *     &lt;bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
  *          ...
@@ -46,7 +46,7 @@ import org.apache.ignite.resources.SpringApplicationContextResource;
  *                      &lt;property name="cacheStoreFactory"&gt;
  *                          &lt;bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactory"&gt;
  *                              &lt;property name="user" value = "Ignite" /&gt;
- *                              &lt;property name="dataSourceBean" value = "simpleDataSource" /&gt;
+ *                              &lt;property name="dataSourceBean" value = "myDataSource" /&gt;
  *                          &lt;/bean&gt;
  *                      &lt;/property&gt;
  *                  &lt;/bean&gt;
@@ -99,7 +99,7 @@ public class CacheJdbcBlobStoreFactory<K, V> implements Factory<CacheJdbcBlobSto
 
     /** Application context. */
     @SpringApplicationContextResource
-    private Object appContext;
+    private Object appCtx;
 
     /** {@inheritDoc} */
     @Override public CacheJdbcBlobStore<K, V> create() {
@@ -118,7 +118,7 @@ public class CacheJdbcBlobStoreFactory<K, V> implements Factory<CacheJdbcBlobSto
         if (dataSrc != null)
             store.setDataSource(dataSrc);
         else if (dataSrcBean != null) {
-            if (appContext == null)
+            if (appCtx == null)
                 throw new IgniteException("Spring application context resource is not injected.");
 
             IgniteSpringHelper spring;
@@ -126,13 +126,13 @@ public class CacheJdbcBlobStoreFactory<K, V> implements Factory<CacheJdbcBlobSto
             try {
                 spring = IgniteComponentType.SPRING.create(false);
 
-                DataSource data = spring.loadBeanFromAppContext(appContext, dataSrcBean);
+                DataSource data = spring.loadBeanFromAppContext(appCtx, dataSrcBean);
 
                 store.setDataSource(data);
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteException("Failed to load bean in application context [beanName=" + dataSrcBean +
-                    ", igniteConfig=" + appContext + ']');
+                    ", igniteConfig=" + appCtx + ']');
             }
         }
 
@@ -287,4 +287,4 @@ public class CacheJdbcBlobStoreFactory<K, V> implements Factory<CacheJdbcBlobSto
     @Override public String toString() {
         return S.toString(CacheJdbcBlobStoreFactory.class, this);
     }
-}
\ No newline at end of file
+}


[27/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts

Posted by sb...@apache.org.
Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts


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

Branch: refs/heads/master
Commit: 388c85785271deabc8822e1d8cf1fdaf4254b6e2
Parents: 7cd4a77
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Nov 23 09:36:32 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Nov 23 09:36:32 2015 +0300

----------------------------------------------------------------------
 .../colocated/GridDhtColocatedLockFuture.java   | 61 +++++++-------------
 .../distributed/near/GridNearLockFuture.java    | 18 +++---
 2 files changed, 29 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/388c8578/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index bd6c2a7..7e6ce89 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -89,26 +89,26 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
 
     /** Cache registry. */
     @GridToStringExclude
-    private GridCacheContext<?, ?> cctx;
+    private final GridCacheContext<?, ?> cctx;
 
     /** Lock owner thread. */
     @GridToStringInclude
-    private long threadId;
+    private final long threadId;
 
     /** Keys to lock. */
     private Collection<KeyCacheObject> keys;
 
     /** Future ID. */
-    private IgniteUuid futId;
+    private final IgniteUuid futId;
 
     /** Lock version. */
-    private GridCacheVersion lockVer;
+    private final GridCacheVersion lockVer;
 
     /** Read flag. */
-    private boolean read;
+    private final boolean read;
 
     /** Flag to return value. */
-    private boolean retval;
+    private final boolean retval;
 
     /** Error. */
     private volatile Throwable err;
@@ -118,26 +118,26 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
     private LockTimeoutObject timeoutObj;
 
     /** Lock timeout. */
-    private long timeout;
+    private final long timeout;
 
     /** Filter. */
-    private CacheEntryPredicate[] filter;
+    private final CacheEntryPredicate[] filter;
 
     /** Transaction. */
     @GridToStringExclude
-    private GridNearTxLocal tx;
+    private final GridNearTxLocal tx;
 
     /** Topology snapshot to operate on. */
     private volatile AffinityTopologyVersion topVer;
 
     /** Map of current values. */
-    private Map<KeyCacheObject, IgniteBiTuple<GridCacheVersion, CacheObject>> valMap;
+    private final Map<KeyCacheObject, IgniteBiTuple<GridCacheVersion, CacheObject>> valMap;
 
     /** Trackable flag (here may be non-volatile). */
     private boolean trackable;
 
     /** TTL for read operation. */
-    private long accessTtl;
+    private final long accessTtl;
 
     /** Skip store flag. */
     private final boolean skipStore;
@@ -457,7 +457,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
      * @param miniId Mini ID to find.
      * @return Mini future.
      */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
+    @SuppressWarnings({"ForLoopReplaceableByForEach", "IfMayBeConditional"})
     private MiniFuture miniFuture(IgniteUuid miniId) {
         // We iterate directly over the futs collection here to avoid copy.
         synchronized (futs) {
@@ -742,6 +742,12 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
         }
     }
 
+    /**
+     * @param keys Keys to map.
+     * @param remap Remap flag.
+     * @param topLocked Topology locked flag.
+     * @throws IgniteCheckedException If mapping failed.
+     */
     private synchronized void map0(
         Collection<KeyCacheObject> keys,
         boolean remap,
@@ -908,34 +914,6 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                                     mapping.request(req);
                                 }
 
-                                req = new GridNearLockRequest(
-                                    cctx.cacheId(),
-                                    topVer,
-                                    cctx.nodeId(),
-                                    threadId,
-                                    futId,
-                                    lockVer,
-                                    inTx(),
-                                    implicitTx(),
-                                    implicitSingleTx(),
-                                    read,
-                                    retval,
-                                    isolation(),
-                                    isInvalidate(),
-                                    timeout,
-                                    mappedKeys.size(),
-                                    inTx() ? tx.size() : mappedKeys.size(),
-                                    inTx() && tx.syncCommit(),
-                                    inTx() ? tx.subjectId() : null,
-                                    inTx() ? tx.taskNameHash() : 0,
-                                    read ? accessTtl : -1L,
-                                    skipStore,
-                                    clientFirst,
-                                    cctx.deploymentEnabled());
-
-                                mapping.request(req);
-                            }
-
                             distributedKeys.add(key);
 
                             if (tx != null)
@@ -1502,7 +1480,8 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                             false,
                             CU.subjectId(tx, cctx.shared()),
                             null,
-                            tx == null ? null : tx.resolveTaskName());
+                            tx == null ? null : tx.resolveTaskName(),
+                            keepBinary);
                     }
 
                     i++;

http://git-wip-us.apache.org/repos/asf/ignite/blob/388c8578/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 832cc3d..f1f9990 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -85,26 +85,26 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
 
     /** Cache registry. */
     @GridToStringExclude
-    private GridCacheContext<?, ?> cctx;
+    private final GridCacheContext<?, ?> cctx;
 
     /** Lock owner thread. */
     @GridToStringInclude
     private long threadId;
 
     /** Keys to lock. */
-    private Collection<KeyCacheObject> keys;
+    private final Collection<KeyCacheObject> keys;
 
     /** Future ID. */
-    private IgniteUuid futId;
+    private final IgniteUuid futId;
 
     /** Lock version. */
-    private GridCacheVersion lockVer;
+    private final GridCacheVersion lockVer;
 
     /** Read flag. */
     private boolean read;
 
     /** Flag to return value. */
-    private boolean retval;
+    private final boolean retval;
 
     /** Error. */
     private volatile Throwable err;
@@ -120,17 +120,17 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
     private long timeout;
 
     /** Filter. */
-    private CacheEntryPredicate[] filter;
+    private final CacheEntryPredicate[] filter;
 
     /** Transaction. */
     @GridToStringExclude
-    private GridNearTxLocal tx;
+    private final GridNearTxLocal tx;
 
     /** Topology snapshot to operate on. */
     private volatile AffinityTopologyVersion topVer;
 
     /** Map of current values. */
-    private Map<KeyCacheObject, IgniteBiTuple<GridCacheVersion, CacheObject>> valMap;
+    private final Map<KeyCacheObject, IgniteBiTuple<GridCacheVersion, CacheObject>> valMap;
 
     /** Trackable flag. */
     private boolean trackable = true;
@@ -496,7 +496,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
      * @param miniId Mini ID to find.
      * @return Mini future.
      */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
+    @SuppressWarnings({"ForLoopReplaceableByForEach", "IfMayBeConditional"})
     private MiniFuture miniFuture(IgniteUuid miniId) {
         // We iterate directly over the futs collection here to avoid copy.
         synchronized (futs) {


[26/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts

Posted by sb...@apache.org.
Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts


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

Branch: refs/heads/master
Commit: 7cd4a77a39007e890e5ae47fdcfe7a24b010c20d
Parents: 1c8ff10 15877a8
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Nov 23 09:36:01 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Nov 23 09:36:01 2015 +0300

----------------------------------------------------------------------
 .gitignore                                      |    6 +
 assembly/release-fabric-base.xml                |   94 +
 .../config/binary/example-ignite-binary.xml     |   44 +
 examples/config/example-default.xml             |   76 +
 examples/config/example-ignite.xml              |   56 +-
 .../apache/ignite/examples/binary/Address.java  |   72 +
 .../apache/ignite/examples/binary/Employee.java |   93 +
 .../ignite/examples/binary/EmployeeKey.java     |   90 +
 .../binary/ExampleBinaryNodeStartup.java        |   36 +
 .../ignite/examples/binary/Organization.java    |   93 +
 .../examples/binary/OrganizationType.java       |   32 +
 ...ComputeClientBinaryTaskExecutionExample.java |  153 +
 .../binary/computegrid/ComputeClientTask.java   |  116 +
 .../binary/computegrid/package-info.java        |   21 +
 .../CacheClientBinaryPutGetExample.java         |  230 ++
 .../datagrid/CacheClientBinaryQueryExample.java |  330 ++
 .../examples/binary/datagrid/package-info.java  |   21 +
 .../ignite/examples/binary/package-info.java    |   21 +
 .../CacheClientPortableExampleTest.java         |   46 +
 .../ComputeClientPortableExampleTest.java       |   37 +
 .../testsuites/IgniteExamplesSelfTestSuite.java |    6 +
 .../ignite/codegen/MessageCodeGenerator.java    |   11 +-
 modules/core/pom.xml                            |   21 +
 ...processors.platform.PlatformBootstrapFactory |    2 +
 .../src/main/java/org/apache/ignite/Ignite.java |    7 +
 .../java/org/apache/ignite/IgniteBinary.java    |  357 ++
 .../java/org/apache/ignite/IgniteCache.java     |   41 +
 .../org/apache/ignite/IgniteDataStreamer.java   |   16 +
 .../org/apache/ignite/binary/BinaryField.java   |   46 +
 .../apache/ignite/binary/BinaryIdMapper.java    |   54 +
 .../binary/BinaryInvalidTypeException.java      |   58 +
 .../org/apache/ignite/binary/BinaryObject.java  |  149 +
 .../ignite/binary/BinaryObjectBuilder.java      |  135 +
 .../ignite/binary/BinaryObjectException.java    |   57 +
 .../apache/ignite/binary/BinaryRawReader.java   |  240 ++
 .../apache/ignite/binary/BinaryRawWriter.java   |  225 ++
 .../org/apache/ignite/binary/BinaryReader.java  |  290 ++
 .../apache/ignite/binary/BinarySerializer.java  |   47 +
 .../org/apache/ignite/binary/BinaryType.java    |   68 +
 .../ignite/binary/BinaryTypeConfiguration.java  |  112 +
 .../org/apache/ignite/binary/BinaryWriter.java  |  273 ++
 .../org/apache/ignite/binary/Binarylizable.java |   48 +
 .../org/apache/ignite/binary/package-info.java  |   22 +
 .../ignite/cache/CacheKeyConfiguration.java     |   92 +
 .../apache/ignite/cache/CacheTypeMetadata.java  |   67 +-
 .../org/apache/ignite/cache/QueryEntity.java    |  217 ++
 .../org/apache/ignite/cache/QueryIndex.java     |  192 +
 .../org/apache/ignite/cache/QueryIndexType.java |   38 +
 .../configuration/BinaryConfiguration.java      |  139 +
 .../configuration/CacheConfiguration.java       |  692 +++-
 .../configuration/IgniteConfiguration.java      |   75 +-
 .../configuration/PlatformConfiguration.java    |   25 +
 .../ignite/internal/GridKernalContextImpl.java  |    4 +-
 .../org/apache/ignite/internal/IgniteEx.java    |    9 -
 .../apache/ignite/internal/IgniteKernal.java    |   39 +-
 .../ignite/internal/IgniteNodeAttributes.java   |    6 +
 .../internal/client/GridClientCompute.java      |    2 +-
 .../impl/connection/GridClientConnection.java   |    2 +-
 .../GridClientConnectionManagerAdapter.java     |    2 +-
 .../connection/GridClientNioTcpConnection.java  |    6 +-
 .../communication/GridIoMessageFactory.java     |    4 +-
 .../swapspace/GridSwapSpaceManager.java         |   34 -
 .../portable/BinaryCachingMetadataHandler.java  |   70 +
 .../internal/portable/BinaryEnumCache.java      |   69 +
 .../internal/portable/BinaryFieldAccessor.java  |  805 ++++
 .../internal/portable/BinaryFieldImpl.java      |  116 +
 .../portable/BinaryInternalIdMapper.java        |  161 +
 .../internal/portable/BinaryMetadata.java       |  166 +
 .../portable/BinaryMetadataCollector.java       |  277 ++
 .../portable/BinaryMetadataHandler.java         |   44 +
 .../portable/BinaryNoopMetadataHandler.java     |   53 +
 .../internal/portable/BinaryObjectEx.java       |  245 ++
 .../internal/portable/BinaryObjectImpl.java     |  581 +++
 .../portable/BinaryObjectOffheapImpl.java       |  436 +++
 .../internal/portable/BinaryRawReaderEx.java    |   33 +
 .../internal/portable/BinaryRawWriterEx.java    |   60 +
 .../internal/portable/BinaryReaderExImpl.java   | 2748 +++++++++++++
 .../internal/portable/BinaryReaderHandles.java  |  108 +
 .../portable/BinaryThreadLocalContext.java      |   69 +
 .../internal/portable/BinaryTypeImpl.java       |   81 +
 .../internal/portable/BinaryWriteMode.java      |  178 +
 .../internal/portable/BinaryWriterExImpl.java   | 1817 +++++++++
 .../internal/portable/BinaryWriterHandles.java  |  101 +
 .../portable/BinaryWriterSchemaHolder.java      |  148 +
 .../portable/GridPortableMarshaller.java        |   67 +-
 .../portable/PortableClassDescriptor.java       | 1003 ++---
 .../internal/portable/PortableContext.java      |  542 +--
 .../portable/PortableMetaDataCollector.java     |  258 --
 .../portable/PortableMetaDataHandler.java       |   44 -
 .../internal/portable/PortableMetaDataImpl.java |  150 -
 .../internal/portable/PortableObjectEx.java     |  214 -
 .../internal/portable/PortableObjectImpl.java   |  391 --
 .../portable/PortableObjectOffheapImpl.java     |  243 --
 .../portable/PortablePositionReadable.java      |   47 +
 .../internal/portable/PortablePrimitives.java   |  779 +---
 .../internal/portable/PortableRawReaderEx.java  |   33 -
 .../internal/portable/PortableRawWriterEx.java  |   60 -
 .../portable/PortableReaderContext.java         |   82 -
 .../internal/portable/PortableReaderExImpl.java | 3157 ---------------
 .../internal/portable/PortableSchema.java       |  466 +++
 .../portable/PortableSchemaRegistry.java        |  172 +
 .../PortableThreadLocalMemoryAllocator.java     |  162 -
 .../ignite/internal/portable/PortableUtils.java |  651 +++-
 .../internal/portable/PortableWriterExImpl.java | 1854 ---------
 .../internal/portable/api/IgnitePortables.java  |  362 --
 .../internal/portable/api/PortableBuilder.java  |  136 -
 .../portable/api/PortableException.java         |   57 -
 .../internal/portable/api/PortableIdMapper.java |   54 -
 .../api/PortableInvalidClassException.java      |   58 -
 .../portable/api/PortableMarshalAware.java      |   48 -
 .../portable/api/PortableMarshaller.java        |  357 --
 .../internal/portable/api/PortableMetadata.java |   60 -
 .../internal/portable/api/PortableObject.java   |  152 -
 .../portable/api/PortableProtocolVersion.java   |   41 -
 .../portable/api/PortableRawReader.java         |  234 --
 .../portable/api/PortableRawWriter.java         |  219 --
 .../internal/portable/api/PortableReader.java   |  284 --
 .../portable/api/PortableSerializer.java        |   47 -
 .../portable/api/PortableTypeConfiguration.java |  195 -
 .../internal/portable/api/PortableWriter.java   |  266 --
 .../builder/BinaryObjectBuilderImpl.java        |  577 +++
 .../portable/builder/PortableBuilderEnum.java   |    8 +-
 .../portable/builder/PortableBuilderImpl.java   |  533 ---
 .../portable/builder/PortableBuilderReader.java |  214 +-
 .../PortableBuilderSerializationAware.java      |    2 +-
 .../builder/PortableBuilderSerializer.java      |   36 +-
 .../builder/PortableEnumArrayLazyValue.java     |   12 +-
 .../portable/builder/PortableLazyArrayList.java |    8 +-
 .../builder/PortableLazyLinkedList.java         |    8 +-
 .../portable/builder/PortableLazyMap.java       |    8 +-
 .../portable/builder/PortableLazyMapEntry.java  |    2 +-
 .../portable/builder/PortableLazySet.java       |    8 +-
 .../builder/PortableModifiableLazyValue.java    |    2 +-
 .../builder/PortableObjectArrayLazyValue.java   |    8 +-
 .../builder/PortablePlainLazyValue.java         |    2 +-
 .../builder/PortablePlainPortableObject.java    |   22 +-
 .../portable/builder/PortableValueWithType.java |   13 +-
 .../streams/PortableAbstractInputStream.java    |   48 +-
 .../streams/PortableAbstractOutputStream.java   |   44 +-
 .../streams/PortableHeapInputStream.java        |   34 +-
 .../streams/PortableHeapOutputStream.java       |  106 +-
 .../portable/streams/PortableInputStream.java   |   12 +-
 .../streams/PortableMemoryAllocator.java        |   67 +-
 .../streams/PortableMemoryAllocatorChunk.java   |  117 +
 .../streams/PortableOffheapInputStream.java     |   17 +-
 .../streams/PortableOffheapOutputStream.java    |   59 +-
 .../portable/streams/PortableOutputStream.java  |   94 +
 .../streams/PortableSimpleMemoryAllocator.java  |   66 -
 .../affinity/GridAffinityAssignmentCache.java   |    3 +-
 .../affinity/GridAffinityProcessor.java         |    5 +-
 .../processors/cache/CacheInvokeEntry.java      |   11 +-
 .../processors/cache/CacheLazyEntry.java        |   23 +-
 .../internal/processors/cache/CacheObject.java  |   11 +-
 .../processors/cache/CacheObjectAdapter.java    |    2 +-
 .../cache/CacheObjectByteArrayImpl.java         |    7 +-
 .../processors/cache/CacheObjectContext.java    |  128 +-
 .../processors/cache/CacheObjectImpl.java       |    5 +
 .../processors/cache/CacheOperationContext.java |   22 +-
 .../processors/cache/GridCacheAdapter.java      |   98 +-
 .../cache/GridCacheConcurrentMap.java           |   10 +-
 .../processors/cache/GridCacheContext.java      |   14 +-
 .../processors/cache/GridCacheEntryEx.java      |   15 +-
 .../processors/cache/GridCacheEventManager.java |   31 +-
 .../cache/GridCacheEvictionManager.java         |    5 +-
 .../processors/cache/GridCacheMapEntry.java     |  157 +-
 .../processors/cache/GridCacheMvccManager.java  |   29 +-
 .../processors/cache/GridCacheProcessor.java    |    7 +
 .../processors/cache/GridCacheProxyImpl.java    |    4 +-
 .../processors/cache/GridCacheReturn.java       |   27 +-
 .../processors/cache/GridCacheSwapManager.java  |   37 +-
 .../processors/cache/GridCacheUtils.java        |    3 +
 .../processors/cache/IgniteCacheProxy.java      |   11 +-
 .../processors/cache/IgniteInternalCache.java   |    6 +-
 .../processors/cache/KeyCacheObjectImpl.java    |    5 +
 .../CacheDataStructuresManager.java             |    4 +-
 .../GridDistributedCacheAdapter.java            |   40 +-
 .../distributed/GridDistributedCacheEntry.java  |    9 +-
 .../distributed/GridDistributedLockRequest.java |   17 +
 .../GridDistributedTxPrepareRequest.java        |    3 +-
 .../GridDistributedTxRemoteAdapter.java         |    3 +
 .../distributed/dht/GridDhtCacheEntry.java      |    5 +-
 .../distributed/dht/GridDhtLocalPartition.java  |    3 +-
 .../distributed/dht/GridDhtLockFuture.java      |   10 +-
 .../distributed/dht/GridDhtLockRequest.java     |    3 +
 .../dht/GridDhtTransactionalCacheAdapter.java   |   21 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   17 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   15 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   12 +-
 .../dht/GridPartitionedGetFuture.java           |    6 +-
 .../dht/GridPartitionedSingleGetFuture.java     |   14 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   74 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |    6 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |   42 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   15 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |   68 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |    5 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   31 +-
 .../colocated/GridDhtColocatedLockFuture.java   |   41 +-
 .../dht/preloader/GridDhtForceKeysFuture.java   |    2 +-
 .../dht/preloader/GridDhtPartitionDemander.java |    2 +-
 .../distributed/near/GridNearAtomicCache.java   |    4 +
 .../distributed/near/GridNearCacheEntry.java    |   17 +-
 .../distributed/near/GridNearGetFuture.java     |   55 +-
 .../distributed/near/GridNearLockFuture.java    |   14 +-
 .../distributed/near/GridNearLockRequest.java   |    2 +
 .../near/GridNearTransactionalCache.java        |    8 +-
 .../cache/distributed/near/GridNearTxLocal.java |    9 +-
 .../distributed/near/GridNearTxRemote.java      |   12 +-
 .../cache/local/GridLocalCacheEntry.java        |   16 +-
 .../cache/local/GridLocalLockFuture.java        |    3 +-
 .../local/atomic/GridLocalAtomicCache.java      |  108 +-
 .../CacheDefaultPortableAffinityKeyMapper.java  |    8 +-
 .../portable/CacheObjectBinaryProcessor.java    |   97 +
 .../CacheObjectBinaryProcessorImpl.java         |  848 ++++
 .../portable/CacheObjectPortableContext.java    |  133 -
 .../portable/CacheObjectPortableProcessor.java  |  103 -
 .../CacheObjectPortableProcessorImpl.java       | 1035 -----
 .../cache/portable/IgniteBinaryImpl.java        |  165 +
 .../cache/portable/IgnitePortablesImpl.java     |  177 -
 .../cache/portable/PortableMetaDataKey.java     |   82 -
 .../cache/portable/PortableMetadataKey.java     |   82 +
 .../cache/query/GridCacheQueryManager.java      |  298 +-
 .../cache/query/GridCacheQueryRequest.java      |    4 +-
 .../continuous/CacheContinuousQueryEvent.java   |   10 +-
 .../cache/store/CacheOsStoreManager.java        |    4 +-
 .../store/GridCacheStoreManagerAdapter.java     |   47 +-
 .../transactions/IgniteTransactionsImpl.java    |   10 +-
 .../cache/transactions/IgniteTxAdapter.java     |    5 +-
 .../cache/transactions/IgniteTxEntry.java       |   57 +-
 .../transactions/IgniteTxLocalAdapter.java      |  145 +-
 .../cache/transactions/IgniteTxLocalEx.java     |    1 +
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |    6 +
 .../IgniteCacheObjectProcessorImpl.java         |    9 +
 .../processors/cacheobject/NoOpBinary.java      |   75 +
 .../continuous/GridContinuousProcessor.java     |    6 +-
 .../datastreamer/DataStreamProcessor.java       |    1 +
 .../datastreamer/DataStreamerEntry.java         |    6 +-
 .../datastreamer/DataStreamerImpl.java          |   16 +-
 .../datastreamer/DataStreamerRequest.java       |   58 +-
 .../datastreamer/DataStreamerUpdateJob.java     |   10 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   26 +-
 .../processors/hadoop/HadoopJobProperty.java    |    2 +-
 .../platform/PlatformAbstractBootstrap.java     |   48 +
 .../PlatformAbstractConfigurationClosure.java   |   61 +
 .../platform/PlatformAbstractPredicate.java     |   67 +
 .../platform/PlatformAbstractTarget.java        |  320 ++
 .../processors/platform/PlatformBootstrap.java  |   35 +
 .../platform/PlatformBootstrapFactory.java      |   37 +
 .../platform/PlatformConfiguration.java         |   25 -
 .../platform/PlatformConfigurationEx.java       |   48 +
 .../processors/platform/PlatformContext.java    |   26 +-
 .../platform/PlatformContextImpl.java           |  616 +++
 .../platform/PlatformExtendedException.java     |    4 +-
 .../processors/platform/PlatformIgnition.java   |  189 +
 .../platform/PlatformNoopProcessor.java         |    6 +
 .../processors/platform/PlatformProcessor.java  |   11 +
 .../platform/PlatformProcessorImpl.java         |  374 ++
 .../platform/cache/PlatformCache.java           | 1090 ++++++
 .../cache/PlatformCacheEntryFilterImpl.java     |  106 +
 .../cache/PlatformCacheEntryProcessorImpl.java  |  220 ++
 .../platform/cache/PlatformCacheIterator.java   |   72 +
 .../PlatformCachePartialUpdateException.java    |   59 +
 .../cache/affinity/PlatformAffinity.java        |  297 ++
 .../query/PlatformAbstractQueryCursor.java      |  192 +
 .../query/PlatformContinuousQueryImpl.java      |  235 ++
 .../PlatformContinuousQueryRemoteFilter.java    |  188 +
 .../cache/query/PlatformFieldsQueryCursor.java  |   49 +
 .../cache/query/PlatformQueryCursor.java        |   45 +
 .../cache/store/PlatformCacheStoreCallback.java |   61 +
 .../platform/cluster/PlatformClusterGroup.java  |  335 ++
 .../cluster/PlatformClusterNodeFilterImpl.java  |   78 +
 .../platform/compute/PlatformAbstractJob.java   |  156 +
 .../platform/compute/PlatformAbstractTask.java  |  206 +
 .../PlatformBalancingMultiClosureTask.java      |   83 +
 ...tformBalancingSingleClosureAffinityTask.java |   88 +
 .../PlatformBalancingSingleClosureTask.java     |   81 +
 .../PlatformBroadcastingMultiClosureTask.java   |   87 +
 .../PlatformBroadcastingSingleClosureTask.java  |   84 +
 .../platform/compute/PlatformClosureJob.java    |  104 +
 .../platform/compute/PlatformCompute.java       |  332 ++
 .../platform/compute/PlatformFullJob.java       |  220 ++
 .../platform/compute/PlatformFullTask.java      |  192 +
 .../platform/cpp/PlatformCppBootstrap.java      |   31 +
 .../cpp/PlatformCppBootstrapFactory.java        |   39 +
 .../cpp/PlatformCppConfigurationClosure.java    |  114 +
 .../cpp/PlatformCppConfigurationEx.java         |   82 +
 .../datastreamer/PlatformDataStreamer.java      |  227 ++
 .../PlatformStreamReceiverImpl.java             |  119 +
 .../datastructures/PlatformAtomicLong.java      |  149 +
 .../dotnet/PlatformDotNetBootstrap.java         |   31 +
 .../dotnet/PlatformDotNetBootstrapFactory.java  |   39 +
 .../dotnet/PlatformDotNetCacheStore.java        |  484 +++
 .../dotnet/PlatformDotNetConfiguration.java     |  119 -
 .../PlatformDotNetConfigurationClosure.java     |  258 ++
 .../dotnet/PlatformDotNetConfigurationEx.java   |   91 +
 .../PlatformDotNetPortableConfiguration.java    |  228 --
 ...PlatformDotNetPortableTypeConfiguration.java |  248 --
 .../platform/dotnet/PlatformDotNetService.java  |   27 +
 .../dotnet/PlatformDotNetServiceImpl.java       |   47 +
 .../events/PlatformEventFilterListenerImpl.java |  186 +
 .../platform/events/PlatformEvents.java         |  396 ++
 .../lifecycle/PlatformLifecycleBean.java        |   75 +
 .../platform/memory/PlatformAbstractMemory.java |  121 +
 .../PlatformBigEndianInputStreamImpl.java       |  136 +
 .../PlatformBigEndianOutputStreamImpl.java      |  196 +
 .../platform/memory/PlatformExternalMemory.java |   55 +
 .../memory/PlatformInputStreamImpl.java         |  351 ++
 .../memory/PlatformMemoryManagerImpl.java       |   85 +
 .../platform/memory/PlatformMemoryPool.java     |  140 +
 .../platform/memory/PlatformMemoryUtils.java    |  467 +++
 .../memory/PlatformOutputStreamImpl.java        |  342 ++
 .../platform/memory/PlatformPooledMemory.java   |   64 +
 .../platform/memory/PlatformUnpooledMemory.java |   51 +
 .../messaging/PlatformMessageFilterImpl.java    |  110 +
 .../messaging/PlatformMessageLocalFilter.java   |  102 +
 .../platform/messaging/PlatformMessaging.java   |  166 +
 .../services/PlatformAbstractService.java       |  230 ++
 .../platform/services/PlatformServices.java     |  275 ++
 .../transactions/PlatformTransactions.java      |  259 ++
 .../platform/utils/PlatformFutureUtils.java     |  397 ++
 .../platform/utils/PlatformReaderBiClosure.java |   34 +
 .../platform/utils/PlatformReaderClosure.java   |   34 +
 .../platform/utils/PlatformUtils.java           |  809 ++++
 .../platform/utils/PlatformWriterBiClosure.java |   34 +
 .../platform/utils/PlatformWriterClosure.java   |   33 +
 .../processors/query/GridQueryIndexing.java     |   18 +-
 .../processors/query/GridQueryProcessor.java    |  674 ++--
 .../client/message/GridClientTaskRequest.java   |    6 +-
 .../ignite/internal/util/GridEnumCache.java     |   56 -
 .../ignite/internal/util/IgniteUtils.java       |   34 +-
 .../ignite/internal/util/nio/GridNioServer.java |    4 +-
 .../marshaller/portable/BinaryMarshaller.java   |  146 +
 .../marshaller/portable/package-info.java       |   22 +
 .../platform/cpp/PlatformCppConfiguration.java  |   47 +
 .../ignite/platform/cpp/package-info.java       |   22 +
 .../PlatformDotNetBinaryConfiguration.java      |  170 +
 .../PlatformDotNetBinaryTypeConfiguration.java  |  171 +
 .../dotnet/PlatformDotNetCacheStoreFactory.java |  117 +
 .../dotnet/PlatformDotNetConfiguration.java     |   97 +
 .../dotnet/PlatformDotNetLifecycleBean.java     |   86 +
 .../ignite/platform/dotnet/package-info.java    |   22 +
 .../apache/ignite/platform/package-info.java    |   22 +
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   51 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |    2 +
 .../apache/ignite/spi/swapspace/SwapKey.java    |    9 +-
 .../resources/META-INF/classnames.properties    |  268 +-
 .../portable/BinaryFieldsAbstractSelfTest.java  |  719 ++++
 .../portable/BinaryFieldsHeapSelfTest.java      |   32 +
 .../portable/BinaryFieldsOffheapSelfTest.java   |   61 +
 .../BinaryFooterOffsetsAbstractSelfTest.java    |  206 +
 .../BinaryFooterOffsetsHeapSelfTest.java        |   32 +
 .../BinaryFooterOffsetsOffheapSelfTest.java     |   61 +
 .../portable/BinaryMarshallerSelfTest.java      | 3671 ++++++++++++++++++
 .../BinaryObjectBuilderAdditionalSelfTest.java  | 1292 ++++++
 .../portable/BinaryObjectBuilderSelfTest.java   | 1069 +++++
 .../GridPortableAffinityKeySelfTest.java        |  225 ++
 ...idPortableMarshallerCtxDisabledSelfTest.java |  248 ++
 .../portable/GridPortableMetaDataSelfTest.java  |  372 ++
 .../portable/GridPortableWildcardsSelfTest.java |  465 +++
 .../portable/TestCachingMetadataHandler.java    |   45 +
 .../GridBinaryMarshalerAwareTestClass.java      |   67 +
 .../mutabletest/GridPortableTestClasses.java    |  443 +++
 .../portable/mutabletest/package-info.java      |   22 +
 .../BinaryFieldsHeapNonCompactSelfTest.java     |   30 +
 .../BinaryFieldsOffheapNonCompactSelfTest.java  |   30 +
 ...naryFooterOffsetsHeapNonCompactSelfTest.java |   30 +
 ...yFooterOffsetsOffheapNonCompactSelfTest.java |   30 +
 .../BinaryMarshallerNonCompactSelfTest.java     |   30 +
 ...jectBuilderAdditionalNonCompactSelfTest.java |   30 +
 .../BinaryObjectBuilderNonCompactSelfTest.java  |   30 +
 .../ignite/internal/portable/package-info.java  |   22 +
 .../portable/test/GridPortableTestClass1.java   |   28 +
 .../portable/test/GridPortableTestClass2.java   |   24 +
 .../internal/portable/test/package-info.java    |   22 +
 .../test/subpackage/GridPortableTestClass3.java |   24 +
 .../portable/test/subpackage/package-info.java  |   22 +
 .../cache/CacheNearReaderUpdateTest.java        |   62 +-
 .../cache/GridCacheAbstractSelfTest.java        |    9 +-
 ...heOffHeapTieredEvictionAbstractSelfTest.java |    2 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   13 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |   30 +-
 ...IgniteCacheAbstractExecutionContextTest.java |    5 +
 ...tractDistributedByteArrayValuesSelfTest.java |    4 +
 ...naryObjectsAbstractDataStreamerSelfTest.java |  192 +
 ...aryObjectsAbstractMultiThreadedSelfTest.java |  233 ++
 .../GridCacheBinaryObjectsAbstractSelfTest.java |  981 +++++
 ...ntNodeBinaryObjectMetadataMultinodeTest.java |  295 ++
 ...CacheClientNodeBinaryObjectMetadataTest.java |  221 ++
 .../GridCachePortableStoreAbstractSelfTest.java |  300 ++
 .../GridCachePortableStoreObjectsSelfTest.java  |   55 +
 ...GridCachePortableStorePortablesSelfTest.java |   66 +
 ...ridPortableCacheEntryMemorySizeSelfTest.java |   48 +
 ...leDuplicateIndexObjectsAbstractSelfTest.java |  161 +
 .../DataStreamProcessorPortableSelfTest.java    |   71 +
 .../GridDataStreamerImplSelfTest.java           |  345 ++
 ...ridCacheAffinityRoutingPortableSelfTest.java |   54 +
 ...lyPortableDataStreamerMultiNodeSelfTest.java |   29 +
 ...rtableDataStreamerMultithreadedSelfTest.java |   47 +
 ...artitionedOnlyPortableMultiNodeSelfTest.java |   28 +
 ...tionedOnlyPortableMultithreadedSelfTest.java |   47 +
 ...AtomicNearDisabledOffheapTieredSelfTest.java |   29 +
 ...BinaryObjectsAtomicNearDisabledSelfTest.java |   51 +
 ...inaryObjectsAtomicOffheapTieredSelfTest.java |   29 +
 .../GridCacheBinaryObjectsAtomicSelfTest.java   |   51 +
 ...tionedNearDisabledOffheapTieredSelfTest.java |   30 +
 ...yObjectsPartitionedNearDisabledSelfTest.java |   51 +
 ...ObjectsPartitionedOffheapTieredSelfTest.java |   30 +
 ...idCacheBinaryObjectsPartitionedSelfTest.java |   51 +
 .../GridCacheMemoryModePortableSelfTest.java    |   36 +
 ...acheOffHeapTieredAtomicPortableSelfTest.java |   48 +
 ...eapTieredEvictionAtomicPortableSelfTest.java |   96 +
 ...heOffHeapTieredEvictionPortableSelfTest.java |   96 +
 .../GridCacheOffHeapTieredPortableSelfTest.java |   48 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 +
 ...xObjectPartitionedTransactionalSelfTest.java |   41 +
 ...sNearPartitionedByteArrayValuesSelfTest.java |   41 +
 ...sPartitionedOnlyByteArrayValuesSelfTest.java |   42 +
 ...ridCacheBinaryObjectsReplicatedSelfTest.java |   51 +
 ...idCacheBinaryObjectsAtomicLocalSelfTest.java |   32 +
 ...BinaryObjectsLocalOffheapTieredSelfTest.java |   29 +
 .../GridCacheBinaryObjectsLocalSelfTest.java    |   51 +
 .../CacheVersionedEntryAbstractTest.java        |    2 +-
 .../continuous/GridEventConsumeSelfTest.java    |  111 +-
 .../DataStreamProcessorSelfTest.java            |    8 +
 .../loadtests/hashmap/GridHashMapLoadTest.java  |    3 +-
 .../platform/PlatformComputeBinarizable.java    |   42 +
 .../PlatformComputeBinarizableArgTask.java      |  119 +
 .../platform/PlatformComputeBroadcastTask.java  |   73 +
 .../platform/PlatformComputeDecimalTask.java    |  106 +
 .../platform/PlatformComputeEchoTask.java       |  188 +
 .../ignite/platform/PlatformComputeEnum.java    |   28 +
 .../PlatformComputeJavaBinarizable.java         |   39 +
 .../platform/PlatformEventsWriteEventTask.java  |  144 +
 .../ignite/platform/PlatformMaxMemoryTask.java  |   57 +
 .../ignite/platform/PlatformMinMemoryTask.java  |   57 +
 .../lifecycle/PlatformJavaLifecycleBean.java    |   47 +
 .../lifecycle/PlatformJavaLifecycleTask.java    |   65 +
 .../file/GridFileSwapSpaceSpiSelfTest.java      |   11 +-
 .../testframework/junits/GridAbstractTest.java  |    4 +-
 .../ignite/testframework/junits/IgniteMock.java |    6 +
 .../multijvm/IgniteCacheProcessProxy.java       |    7 +-
 .../junits/multijvm/IgniteProcessProxy.java     |    4 +-
 .../IgnitePortableCacheFullApiTestSuite.java    |   37 +
 .../IgnitePortableCacheTestSuite.java           |  103 +
 .../IgnitePortableObjectsTestSuite.java         |  110 +
 .../ignite/portable/test1/1.1/test1-1.1.jar     |  Bin 0 -> 2548 bytes
 .../ignite/portable/test1/1.1/test1-1.1.pom     |    9 +
 .../portable/test1/maven-metadata-local.xml     |   12 +
 .../ignite/portable/test2/1.1/test2-1.1.jar     |  Bin 0 -> 1361 bytes
 .../ignite/portable/test2/1.1/test2-1.1.pom     |    9 +
 .../portable/test2/maven-metadata-local.xml     |   12 +
 .../HadoopDefaultMapReducePlannerSelfTest.java  |    6 -
 .../processors/query/h2/IgniteH2Indexing.java   |   25 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    |    8 +-
 .../query/h2/opt/GridLuceneIndex.java           |    4 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |    3 +-
 ...CacheOffheapTieredMultithreadedSelfTest.java |   25 +-
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |   22 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   22 +-
 .../query/IgniteSqlSplitterSelfTest.java        |   54 +
 .../h2/GridIndexingSpiAbstractSelfTest.java     |    7 +-
 .../IgnitePortableCacheQueryTestSuite.java      |  117 +
 modules/platform/licenses/apache-2.0.txt        |  202 -
 modules/platform/pom.xml                        |   80 -
 modules/platform/src/main/cpp/README.txt        |  103 -
 .../platform/src/main/cpp/common/Makefile.am    |   45 -
 .../platform/src/main/cpp/common/configure.ac   |   62 -
 .../src/main/cpp/common/ignite-common.pc.in     |    9 -
 .../src/main/cpp/common/include/Makefile.am     |   22 -
 .../common/include/ignite/common/concurrent.h   |  210 -
 .../cpp/common/include/ignite/common/exports.h  |  145 -
 .../cpp/common/include/ignite/common/java.h     |  652 ----
 .../cpp/common/os/linux/include/Makefile.am     |   21 -
 .../os/linux/include/ignite/common/common.h     |   81 -
 .../linux/include/ignite/common/concurrent_os.h |  394 --
 .../src/main/cpp/common/os/linux/src/common.cpp |   59 -
 .../cpp/common/os/linux/src/concurrent_os.cpp   |  175 -
 .../os/win/include/ignite/common/common.h       |   56 -
 .../win/include/ignite/common/concurrent_os.h   |  406 --
 .../src/main/cpp/common/os/win/src/common.cpp   |   65 -
 .../cpp/common/os/win/src/concurrent_os.cpp     |  151 -
 .../src/main/cpp/common/project/README.TXT      |    1 -
 .../src/main/cpp/common/project/vs/README.TXT   |    1 -
 .../main/cpp/common/project/vs/common.vcxproj   |  202 -
 .../common/project/vs/common.vcxproj.filters    |   54 -
 .../src/main/cpp/common/project/vs/module.def   |   99 -
 .../src/main/cpp/common/project/vs/targetver.h  |   25 -
 .../src/main/cpp/common/src/concurrent.cpp      |   94 -
 .../src/main/cpp/common/src/exports.cpp         |  413 --
 .../platform/src/main/cpp/common/src/java.cpp   | 2205 -----------
 .../platform/src/main/cpp/core-test/Makefile.am |   49 -
 .../main/cpp/core-test/config/cache-query.xml   |   91 -
 .../main/cpp/core-test/config/cache-test.xml    |  129 -
 .../src/main/cpp/core-test/configure.ac         |   62 -
 .../src/main/cpp/core-test/include/Makefile.am  |   22 -
 .../include/ignite/portable_test_defs.h         |  320 --
 .../include/ignite/portable_test_utils.h        |  516 ---
 .../cpp/core-test/include/teamcity_messages.h   |   55 -
 .../src/main/cpp/core-test/project/README.TXT   |    1 -
 .../main/cpp/core-test/project/vs/README.TXT    |    1 -
 .../cpp/core-test/project/vs/core-test.vcxproj  |  174 -
 .../project/vs/core-test.vcxproj.filters        |   68 -
 .../main/cpp/core-test/src/cache_query_test.cpp |  656 ----
 .../src/main/cpp/core-test/src/cache_test.cpp   |  486 ---
 .../main/cpp/core-test/src/concurrent_test.cpp  |  186 -
 .../cpp/core-test/src/handle_registry_test.cpp  |  176 -
 .../main/cpp/core-test/src/ignition_test.cpp    |  102 -
 .../src/portable_reader_writer_raw_test.cpp     | 1532 --------
 .../src/portable_reader_writer_test.cpp         | 1951 ----------
 .../cpp/core-test/src/portable_session_test.cpp |  257 --
 .../cpp/core-test/src/portable_test_defs.cpp    |   65 -
 .../main/cpp/core-test/src/teamcity_boost.cpp   |  159 -
 .../cpp/core-test/src/teamcity_messages.cpp     |  150 -
 modules/platform/src/main/cpp/core/Makefile.am  |   66 -
 modules/platform/src/main/cpp/core/configure.ac |   62 -
 modules/platform/src/main/cpp/core/ignite.pc.in |    9 -
 .../src/main/cpp/core/include/Makefile.am       |   61 -
 .../main/cpp/core/include/ignite/cache/cache.h  | 1153 ------
 .../cpp/core/include/ignite/cache/cache_entry.h |  118 -
 .../core/include/ignite/cache/cache_peek_mode.h |   71 -
 .../cpp/core/include/ignite/cache/query/query.h |   27 -
 .../include/ignite/cache/query/query_argument.h |  125 -
 .../include/ignite/cache/query/query_cursor.h   |  191 -
 .../include/ignite/cache/query/query_scan.h     |  151 -
 .../core/include/ignite/cache/query/query_sql.h |  253 --
 .../include/ignite/cache/query/query_text.h     |  159 -
 .../src/main/cpp/core/include/ignite/guid.h     |  112 -
 .../src/main/cpp/core/include/ignite/ignite.h   |  154 -
 .../core/include/ignite/ignite_configuration.h  |   92 -
 .../main/cpp/core/include/ignite/ignite_error.h |  260 --
 .../src/main/cpp/core/include/ignite/ignition.h |  195 -
 .../core/include/ignite/impl/cache/cache_impl.h |  418 --
 .../ignite/impl/cache/query/query_impl.h        |  115 -
 .../core/include/ignite/impl/handle_registry.h  |  202 -
 .../include/ignite/impl/ignite_environment.h    |  130 -
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  146 -
 .../core/include/ignite/impl/interop/interop.h  |   25 -
 .../ignite/impl/interop/interop_input_stream.h  |  234 --
 .../ignite/impl/interop/interop_memory.h        |  280 --
 .../ignite/impl/interop/interop_output_stream.h |  234 --
 .../cpp/core/include/ignite/impl/operations.h   |  452 ---
 .../ignite/impl/portable/portable_common.h      |  146 -
 .../ignite/impl/portable/portable_id_resolver.h |  106 -
 .../impl/portable/portable_metadata_handler.h   |  102 -
 .../impl/portable/portable_metadata_manager.h   |  120 -
 .../impl/portable/portable_metadata_snapshot.h  |  122 -
 .../impl/portable/portable_metadata_updater.h   |   53 -
 .../portable/portable_metadata_updater_impl.h   |   65 -
 .../ignite/impl/portable/portable_reader_impl.h | 1130 ------
 .../ignite/impl/portable/portable_utils.h       |  344 --
 .../ignite/impl/portable/portable_writer_impl.h |  859 ----
 .../cpp/core/include/ignite/portable/portable.h |   29 -
 .../include/ignite/portable/portable_consts.h   |  106 -
 .../ignite/portable/portable_containers.h       |  525 ---
 .../ignite/portable/portable_raw_reader.h       |  324 --
 .../ignite/portable/portable_raw_writer.h       |  300 --
 .../include/ignite/portable/portable_reader.h   |  355 --
 .../include/ignite/portable/portable_type.h     |  293 --
 .../include/ignite/portable/portable_writer.h   |  335 --
 .../main/cpp/core/os/linux/include/Makefile.am  |   20 -
 .../core/os/linux/include/ignite/impl/utils.h   |  155 -
 .../main/cpp/core/os/linux/src/impl/utils.cpp   |  439 ---
 .../cpp/core/os/win/include/ignite/impl/utils.h |  155 -
 .../src/main/cpp/core/os/win/src/impl/utils.cpp |  453 ---
 .../src/main/cpp/core/project/README.TXT        |    1 -
 .../src/main/cpp/core/project/vs/README.TXT     |    1 -
 .../src/main/cpp/core/project/vs/core.vcxproj   |  272 --
 .../cpp/core/project/vs/core.vcxproj.filters    |  246 --
 modules/platform/src/main/cpp/core/src/guid.cpp |   65 -
 .../platform/src/main/cpp/core/src/ignite.cpp   |   43 -
 .../src/main/cpp/core/src/ignite_error.cpp      |  222 --
 .../platform/src/main/cpp/core/src/ignition.cpp |  468 ---
 .../main/cpp/core/src/impl/cache/cache_impl.cpp |  388 --
 .../core/src/impl/cache/query/query_impl.cpp    |  193 -
 .../main/cpp/core/src/impl/handle_registry.cpp  |  234 --
 .../cpp/core/src/impl/ignite_environment.cpp    |  167 -
 .../src/main/cpp/core/src/impl/ignite_impl.cpp  |   42 -
 .../src/impl/interop/interop_input_stream.cpp   |  215 -
 .../core/src/impl/interop/interop_memory.cpp    |  182 -
 .../src/impl/interop/interop_output_stream.cpp  |  215 -
 .../impl/portable/portable_metadata_handler.cpp |   78 -
 .../impl/portable/portable_metadata_manager.cpp |  201 -
 .../portable/portable_metadata_snapshot.cpp     |   70 -
 .../impl/portable/portable_metadata_updater.cpp |   32 -
 .../portable/portable_metadata_updater_impl.cpp |   94 -
 .../src/impl/portable/portable_reader_impl.cpp  |  683 ----
 .../core/src/impl/portable/portable_utils.cpp   |  214 -
 .../src/impl/portable/portable_writer_impl.cpp  |  600 ---
 .../core/src/portable/portable_containers.cpp   |   76 -
 .../core/src/portable/portable_raw_reader.cpp   |  135 -
 .../core/src/portable/portable_raw_writer.cpp   |  147 -
 .../cpp/core/src/portable/portable_reader.cpp   |  142 -
 .../cpp/core/src/portable/portable_type.cpp     |   51 -
 .../cpp/core/src/portable/portable_writer.cpp   |  154 -
 .../platform/src/main/cpp/project/vs/ignite.sln |   48 -
 .../Apache.Ignite.Core.csproj                   |  376 --
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |   67 -
 .../Cache/CacheEntryProcessorException.cs       |   79 -
 .../Apache.Ignite.Core/Cache/CacheException.cs  |   68 -
 .../Cache/CachePartialUpdateException.cs        |  119 -
 .../Apache.Ignite.Core/Cache/CachePeekMode.cs   |   68 -
 .../Cache/Event/CacheEntryEventType.cs          |   41 -
 .../Cache/Event/ICacheEntryEvent.cs             |   40 -
 .../Cache/Event/ICacheEntryEventFilter.cs       |   31 -
 .../Cache/Event/ICacheEntryEventListener.cs     |   33 -
 .../Cache/Expiry/ExpiryPolicy.cs                |   89 -
 .../Cache/Expiry/IExpiryPolicy.cs               |   59 -
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  542 ---
 .../Apache.Ignite.Core/Cache/ICacheAffinity.cs  |  161 -
 .../Apache.Ignite.Core/Cache/ICacheEntry.cs     |   37 -
 .../Cache/ICacheEntryFilter.cs                  |   34 -
 .../Cache/ICacheEntryProcessor.cs               |   45 -
 .../Cache/ICacheEntryProcessorResult.cs         |   40 -
 .../Apache.Ignite.Core/Cache/ICacheLock.cs      |   58 -
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |  486 ---
 .../Cache/IMutableCacheEntry.cs                 |   47 -
 .../Cache/Query/Continuous/ContinuousQuery.cs   |  170 -
 .../Query/Continuous/IContinuousQueryHandle.cs  |   51 -
 .../Cache/Query/IQueryCursor.cs                 |   40 -
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   82 -
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |   77 -
 .../Cache/Query/SqlFieldsQuery.cs               |   81 -
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |  119 -
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |  104 -
 .../Store/CacheParallelLoadStoreAdapter.cs      |  205 -
 .../Cache/Store/CacheStoreAdapter.cs            |  146 -
 .../Cache/Store/CacheStoreException.cs          |   66 -
 .../Cache/Store/ICacheStore.cs                  |  184 -
 .../Cache/Store/ICacheStoreSession.cs           |   42 -
 .../Cluster/ClusterGroupEmptyException.cs       |   70 -
 .../Cluster/ClusterTopologyException.cs         |   69 -
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |   80 -
 .../Apache.Ignite.Core/Cluster/IClusterGroup.cs |  229 --
 .../Cluster/IClusterMetrics.cs                  |  515 ---
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |  138 -
 .../Cluster/IClusterNodeFilter.cs               |   32 -
 .../Common/AsyncSupportedAttribute.cs           |   33 -
 .../Apache.Ignite.Core/Common/IAsyncSupport.cs  |   52 -
 .../dotnet/Apache.Ignite.Core/Common/IFuture.cs |  115 -
 .../Common/IgniteException.cs                   |   66 -
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |  138 -
 .../ComputeExecutionRejectedException.cs        |   69 -
 .../Compute/ComputeJobAdapter.cs                |  122 -
 .../Compute/ComputeJobFailoverException.cs      |   72 -
 .../Compute/ComputeJobResultPolicy.cs           |   45 -
 .../Compute/ComputeTaskAdapter.cs               |   93 -
 .../Compute/ComputeTaskCancelledException.cs    |   69 -
 .../ComputeTaskNoResultCacheAttribute.cs        |   35 -
 .../Compute/ComputeTaskSplitAdapter.cs          |   95 -
 .../Compute/ComputeTaskTimeoutException.cs      |   67 -
 .../Compute/ComputeUserUndeclaredException.cs   |   70 -
 .../Apache.Ignite.Core/Compute/ICompute.cs      |  274 --
 .../Apache.Ignite.Core/Compute/IComputeFunc.cs  |   55 -
 .../Apache.Ignite.Core/Compute/IComputeJob.cs   |   58 -
 .../Compute/IComputeJobResult.cs                |   73 -
 .../Compute/IComputeReducer.cs                  |   39 -
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |  132 -
 .../Datastream/IDataStreamer.cs                 |  206 -
 .../Datastream/IStreamReceiver.cs               |   38 -
 .../Datastream/StreamTransformer.cs             |   73 -
 .../Datastream/StreamVisitor.cs                 |   55 -
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |  176 -
 .../Events/CacheQueryExecutedEvent.cs           |   97 -
 .../Events/CacheQueryReadEvent.cs               |  134 -
 .../Events/CacheRebalancingEvent.cs             |   98 -
 .../Events/CheckpointEvent.cs                   |   50 -
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   80 -
 .../Apache.Ignite.Core/Events/EventBase.cs      |  160 -
 .../Apache.Ignite.Core/Events/EventReader.cs    |   72 -
 .../Apache.Ignite.Core/Events/EventType.cs      |  514 ---
 .../dotnet/Apache.Ignite.Core/Events/IEvent.cs  |   74 -
 .../Apache.Ignite.Core/Events/IEventFilter.cs   |   36 -
 .../dotnet/Apache.Ignite.Core/Events/IEvents.cs |  182 -
 .../Apache.Ignite.Core/Events/JobEvent.cs       |  100 -
 .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs |   50 -
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |   91 -
 .../main/dotnet/Apache.Ignite.Core/IIgnite.cs   |  168 -
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  140 -
 .../main/dotnet/Apache.Ignite.Core/Ignition.cs  |  657 ----
 .../Impl/Cache/CacheAffinityImpl.cs             |  275 --
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |  126 -
 .../Impl/Cache/CacheEntryFilterHolder.cs        |  147 -
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  145 -
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   65 -
 .../Cache/CacheEntryProcessorResultHolder.cs    |  127 -
 .../Impl/Cache/CacheEnumerable.cs               |   82 -
 .../Impl/Cache/CacheEnumerator.cs               |  117 -
 .../Impl/Cache/CacheEnumeratorProxy.cs          |  156 -
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  940 -----
 .../Apache.Ignite.Core/Impl/Cache/CacheLock.cs  |  171 -
 .../Impl/Cache/CacheMetricsImpl.cs              |  248 --
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   63 -
 .../Impl/Cache/CacheProxyImpl.cs                |  499 ---
 .../Impl/Cache/Event/CacheEntryCreateEvent.cs   |   74 -
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |   74 -
 .../Impl/Cache/Event/CacheEntryUpdateEvent.cs   |   79 -
 .../Impl/Cache/MutableCacheEntry.cs             |  163 -
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 --
 .../Query/Continuous/ContinuousQueryFilter.cs   |  125 -
 .../Continuous/ContinuousQueryFilterHolder.cs   |  118 -
 .../Continuous/ContinuousQueryHandleImpl.cs     |  216 --
 .../Query/Continuous/ContinuousQueryUtils.cs    |  115 -
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   54 -
 .../Impl/Cache/Query/QueryCursor.cs             |   50 -
 .../Impl/Cache/Store/CacheStore.cs              |  263 --
 .../Impl/Cache/Store/CacheStoreSession.cs       |   53 -
 .../Impl/Cache/Store/CacheStoreSessionProxy.cs  |   63 -
 .../Impl/Cluster/ClusterGroupImpl.cs            |  577 ---
 .../Impl/Cluster/ClusterMetricsImpl.cs          |  292 --
 .../Impl/Cluster/ClusterNodeImpl.cs             |  221 --
 .../Impl/Cluster/IClusterGroupEx.cs             |   35 -
 .../Impl/Collections/CollectionExtensions.cs    |   45 -
 .../Impl/Collections/MultiValueDictionary.cs    |  143 -
 .../Impl/Collections/ReadOnlyCollection.cs      |  102 -
 .../Impl/Collections/ReadOnlyDictionary.cs      |  149 -
 .../Impl/Common/AsyncResult.cs                  |   71 -
 .../Impl/Common/CompletedAsyncResult.cs         |   70 -
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   70 -
 .../Impl/Common/DelegateConverter.cs            |  253 --
 .../Impl/Common/DelegateTypeDescriptor.cs       |  314 --
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  286 --
 .../Impl/Common/FutureConverter.cs              |   62 -
 .../Impl/Common/FutureType.cs                   |   52 -
 .../Impl/Common/IFutureConverter.cs             |   34 -
 .../Impl/Common/IFutureInternal.cs              |   46 -
 .../Impl/Common/IgniteArgumentCheck.cs          |   76 -
 .../Impl/Common/LoadedAssembliesResolver.cs     |   96 -
 .../Impl/Common/PortableResultWrapper.cs        |   68 -
 .../Impl/Common/TypeCaster.cs                   |   72 -
 .../Closure/ComputeAbstractClosureTask.cs       |  101 -
 .../Impl/Compute/Closure/ComputeActionJob.cs    |   83 -
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |   89 -
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   56 -
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |   76 -
 .../Closure/ComputeReducingClosureTask.cs       |   61 -
 .../Compute/Closure/ComputeSingleClosureTask.cs |   48 -
 .../Compute/Closure/IComputeResourceInjector.cs |   31 -
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  213 -
 .../Impl/Compute/ComputeAsync.cs                |  261 --
 .../Impl/Compute/ComputeFunc.cs                 |  119 -
 .../Impl/Compute/ComputeImpl.cs                 |  645 ---
 .../Impl/Compute/ComputeJob.cs                  |  163 -
 .../Impl/Compute/ComputeJobHolder.cs            |  246 --
 .../Compute/ComputeJobResultGenericWrapper.cs   |   70 -
 .../Impl/Compute/ComputeJobResultImpl.cs        |   96 -
 .../Impl/Compute/ComputeOutFunc.cs              |  123 -
 .../Impl/Compute/ComputeTaskHolder.cs           |  484 ---
 .../Impl/Datastream/DataStreamerBatch.cs        |  269 --
 .../Impl/Datastream/DataStreamerEntry.cs        |   64 -
 .../Impl/Datastream/DataStreamerImpl.cs         |  832 ----
 .../Impl/Datastream/DataStreamerRemoveEntry.cs  |   48 -
 .../Impl/Datastream/StreamReceiverHolder.cs     |  144 -
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |  498 ---
 .../Impl/Events/EventsAsync.cs                  |  158 -
 .../Impl/Events/RemoteListenEventFilter.cs      |   85 -
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  204 -
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   69 -
 .../Impl/Handle/HandleRegistry.cs               |  340 --
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |   35 -
 .../Apache.Ignite.Core/Impl/IInteropCallback.cs |   34 -
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  549 ---
 .../Impl/IgniteConfigurationEx.cs               |   57 -
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |  490 ---
 .../Apache.Ignite.Core/Impl/IgniteProxy.cs      |  351 --
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  438 ---
 .../Impl/Interop/InteropDotNetConfiguration.cs  |   62 -
 .../InteropDotNetPortableConfiguration.cs       |  127 -
 .../InteropDotNetPortableTypeConfiguration.cs   |  151 -
 .../Impl/InteropExceptionHolder.cs              |   85 -
 .../Impl/LifecycleBeanHolder.cs                 |   66 -
 .../Impl/Memory/IPlatformMemory.cs              |   65 -
 .../Impl/Memory/InteropExternalMemory.cs        |   46 -
 .../Impl/Memory/InteropMemoryUtils.cs           |   38 -
 .../Memory/PlatformBigEndianMemoryStream.cs     |  483 ---
 .../Impl/Memory/PlatformMemory.cs               |   78 -
 .../Impl/Memory/PlatformMemoryManager.cs        |  107 -
 .../Impl/Memory/PlatformMemoryPool.cs           |  106 -
 .../Impl/Memory/PlatformMemoryStream.cs         |  677 ----
 .../Impl/Memory/PlatformMemoryUtils.cs          |  463 ---
 .../Impl/Memory/PlatformPooledMemory.cs         |   70 -
 .../Impl/Memory/PlatformRawMemory.cs            |   89 -
 .../Impl/Memory/PlatformUnpooledMemory.cs       |   52 -
 .../Impl/Messaging/MessageFilterHolder.cs       |  179 -
 .../Impl/Messaging/Messaging.cs                 |  262 --
 .../Impl/Messaging/MessagingAsync.cs            |   68 -
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   47 -
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  715 ----
 .../Portable/IPortableSystemTypeSerializer.cs   |   34 -
 .../Impl/Portable/IPortableTypeDescriptor.cs    |  124 -
 .../Impl/Portable/IPortableWriteAware.cs        |   34 -
 .../Impl/Portable/Io/IPortableStream.cs         |  320 --
 .../Impl/Portable/Io/PortableAbstractStream.cs  | 1298 -------
 .../Impl/Portable/Io/PortableHeapStream.cs      |  447 ---
 .../Impl/Portable/Io/PortableStreamAdapter.cs   |  114 -
 .../Metadata/IPortableMetadataHandler.cs        |   41 -
 .../Metadata/PortableHashsetMetadataHandler.cs  |   69 -
 .../Portable/Metadata/PortableMetadataHolder.cs |  149 -
 .../Portable/Metadata/PortableMetadataImpl.cs   |  200 -
 .../Impl/Portable/PortableBuilderField.cs       |   73 -
 .../Impl/Portable/PortableBuilderImpl.cs        |  923 -----
 .../Impl/Portable/PortableCollectionInfo.cs     |  251 --
 .../Impl/Portable/PortableFullTypeDescriptor.cs |  203 -
 .../Impl/Portable/PortableHandleDictionary.cs   |  187 -
 .../Portable/PortableMarshalAwareSerializer.cs  |   45 -
 .../Impl/Portable/PortableMarshaller.cs         |  603 ---
 .../Impl/Portable/PortableMode.cs               |   40 -
 .../Impl/Portable/PortableObjectHandle.cs       |   59 -
 .../PortableOrSerializableObjectHolder.cs       |   66 -
 .../Portable/PortableReaderHandleDictionary.cs  |   42 -
 .../Impl/Portable/PortableReaderImpl.cs         | 1013 -----
 .../Impl/Portable/PortableReflectiveRoutines.cs |  483 ---
 .../Portable/PortableReflectiveSerializer.cs    |  218 --
 .../Portable/PortableSurrogateTypeDescriptor.cs |  133 -
 .../Impl/Portable/PortableSystemHandlers.cs     | 1336 -------
 .../Portable/PortableSystemTypeSerializer.cs    |   62 -
 .../Impl/Portable/PortableUserObject.cs         |  385 --
 .../Impl/Portable/PortableUtils.cs              | 2039 ----------
 .../Impl/Portable/PortableWriterImpl.cs         | 1305 -------
 .../Impl/Portable/PortablesImpl.cs              |  205 -
 .../Impl/Portable/SerializableObjectHolder.cs   |   66 -
 .../Impl/Portable/TypeResolver.cs               |  227 --
 .../Impl/Resource/IResourceInjector.cs          |   27 -
 .../Impl/Resource/ResourceFieldInjector.cs      |   47 -
 .../Impl/Resource/ResourceMethodInjector.cs     |   48 -
 .../Impl/Resource/ResourceProcessor.cs          |  105 -
 .../Impl/Resource/ResourcePropertyInjector.cs   |   47 -
 .../Impl/Resource/ResourceTypeDescriptor.cs     |  291 --
 .../Impl/Services/ServiceContext.cs             |   60 -
 .../Impl/Services/ServiceDescriptor.cs          |  106 -
 .../Impl/Services/ServiceProxy.cs               |   71 -
 .../Impl/Services/ServiceProxyInvoker.cs        |  136 -
 .../Impl/Services/ServiceProxySerializer.cs     |  140 -
 .../Impl/Services/Services.cs                   |  316 --
 .../Impl/Services/ServicesAsync.cs              |   89 -
 .../Impl/Transactions/AsyncTransaction.cs       |   78 -
 .../Impl/Transactions/Transaction.cs            |  155 -
 .../Impl/Transactions/TransactionImpl.cs        |  489 ---
 .../Impl/Transactions/TransactionMetricsImpl.cs |   62 -
 .../Impl/Transactions/TransactionsImpl.cs       |  201 -
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |   42 -
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |   99 -
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        | 1154 ------
 .../Impl/Unmanaged/UnmanagedContext.cs          |   53 -
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |   68 -
 .../Impl/Unmanaged/UnmanagedTarget.cs           |   77 -
 .../Impl/Unmanaged/UnmanagedUtils.cs            | 1263 ------
 .../Lifecycle/ILifecycleBean.cs                 |   64 -
 .../Lifecycle/LifecycleEventType.cs             |   49 -
 .../Messaging/IMessageFilter.cs                 |   35 -
 .../Apache.Ignite.Core/Messaging/IMessaging.cs  |  105 -
 .../Portable/IPortableBuilder.cs                |   78 -
 .../Portable/IPortableIdMapper.cs               |   40 -
 .../Portable/IPortableMarshalAware.cs           |   39 -
 .../Portable/IPortableMetadata.cs               |   61 -
 .../Portable/IPortableNameMapper.cs             |   39 -
 .../Portable/IPortableObject.cs                 |   44 -
 .../Portable/IPortableRawReader.cs              |  264 --
 .../Portable/IPortableRawWriter.cs              |  221 --
 .../Portable/IPortableReader.cs                 |  340 --
 .../Portable/IPortableSerializer.cs             |   39 -
 .../Portable/IPortableWriter.cs                 |  259 --
 .../Apache.Ignite.Core/Portable/IPortables.cs   |  120 -
 .../Portable/PortableConfiguration.cs           |  122 -
 .../Portable/PortableException.cs               |   64 -
 .../Portable/PortableTypeConfiguration.cs       |  162 -
 .../Portable/PortableTypeNames.cs               |  115 -
 .../Properties/AssemblyInfo.cs                  |   46 -
 .../Resource/InstanceResourceAttribute.cs       |   35 -
 .../Resource/StoreSessionResourceAttribute.cs   |   32 -
 .../Apache.Ignite.Core/Services/IService.cs     |   51 -
 .../Services/IServiceContext.cs                 |   69 -
 .../Services/IServiceDescriptor.cs              |   96 -
 .../Apache.Ignite.Core/Services/IServices.cs    |  181 -
 .../Services/ServiceConfiguration.cs            |   62 -
 .../Services/ServiceInvocationException.cs      |  101 -
 .../Transactions/ITransaction.cs                |  230 --
 .../Transactions/ITransactionMetrics.cs         |   47 -
 .../Transactions/ITransactions.cs               |   73 -
 .../Transactions/TransactionConcurrency.cs      |   36 -
 .../TransactionHeuristicException.cs            |   72 -
 .../Transactions/TransactionIsolation.cs        |   41 -
 .../TransactionOptimisticException.cs           |   69 -
 .../TransactionRollbackException.cs             |   68 -
 .../Transactions/TransactionState.cs            |   70 -
 .../Transactions/TransactionTimeoutException.cs |   69 -
 .../platform/src/main/dotnet/Apache.Ignite.sln  |   68 -
 .../main/dotnet/Apache.Ignite.sln.DotSettings   |    4 -
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   76 -
 .../src/main/dotnet/Apache.Ignite/App.config    |   56 -
 .../Config/AppSettingsConfigurator.cs           |  113 -
 .../Apache.Ignite/Config/ArgsConfigurator.cs    |  164 -
 .../Apache.Ignite/Config/ConfigValueParser.cs   |   42 -
 .../Apache.Ignite/Config/IConfigurator.cs       |   34 -
 .../main/dotnet/Apache.Ignite/IgniteRunner.cs   |  171 -
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   35 -
 .../Apache.Ignite/Service/IgniteService.cs      |  219 --
 .../Apache.Ignite/Service/NativeMethods.cs      |   57 -
 .../Apache.Ignite/Service/ServiceDescription.cs |   32 -
 ...processors.platform.PlatformBootstrapFactory |    2 -
 .../platform/PlatformAbstractBootstrap.java     |   48 -
 .../PlatformAbstractConfigurationClosure.java   |   61 -
 .../platform/PlatformAbstractPredicate.java     |   67 -
 .../platform/PlatformAbstractTarget.java        |  320 --
 .../processors/platform/PlatformBootstrap.java  |   35 -
 .../platform/PlatformBootstrapFactory.java      |   37 -
 .../platform/PlatformConfigurationEx.java       |   48 -
 .../platform/PlatformContextImpl.java           |  621 ---
 .../processors/platform/PlatformIgnition.java   |  189 -
 .../platform/PlatformProcessorImpl.java         |  359 --
 .../platform/cache/PlatformCache.java           | 1090 ------
 .../cache/PlatformCacheEntryFilterImpl.java     |  106 -
 .../cache/PlatformCacheEntryProcessorImpl.java  |  220 --
 .../platform/cache/PlatformCacheIterator.java   |   72 -
 .../PlatformCachePartialUpdateException.java    |   59 -
 .../cache/affinity/PlatformAffinity.java        |  296 --
 .../query/PlatformAbstractQueryCursor.java      |  192 -
 .../query/PlatformContinuousQueryImpl.java      |  235 --
 .../PlatformContinuousQueryRemoteFilter.java    |  188 -
 .../cache/query/PlatformFieldsQueryCursor.java  |   49 -
 .../cache/query/PlatformQueryCursor.java        |   45 -
 .../cache/store/PlatformCacheStoreCallback.java |   61 -
 .../platform/cluster/PlatformClusterGroup.java  |  335 --
 .../cluster/PlatformClusterNodeFilterImpl.java  |   78 -
 .../platform/compute/PlatformAbstractJob.java   |  156 -
 .../platform/compute/PlatformAbstractTask.java  |  206 -
 .../PlatformBalancingMultiClosureTask.java      |   83 -
 ...tformBalancingSingleClosureAffinityTask.java |   88 -
 .../PlatformBalancingSingleClosureTask.java     |   81 -
 .../PlatformBroadcastingMultiClosureTask.java   |   87 -
 .../PlatformBroadcastingSingleClosureTask.java  |   84 -
 .../platform/compute/PlatformClosureJob.java    |  104 -
 .../platform/compute/PlatformCompute.java       |  332 --
 .../platform/compute/PlatformFullJob.java       |  220 --
 .../platform/compute/PlatformFullTask.java      |  192 -
 .../platform/cpp/PlatformCppBootstrap.java      |   31 -
 .../cpp/PlatformCppBootstrapFactory.java        |   39 -
 .../cpp/PlatformCppConfigurationClosure.java    |   99 -
 .../cpp/PlatformCppConfigurationEx.java         |   82 -
 .../datastreamer/PlatformDataStreamer.java      |  226 --
 .../PlatformStreamReceiverImpl.java             |  119 -
 .../dotnet/PlatformDotNetBootstrap.java         |   31 -
 .../dotnet/PlatformDotNetBootstrapFactory.java  |   39 -
 .../dotnet/PlatformDotNetCacheStore.java        |  497 ---
 .../PlatformDotNetConfigurationClosure.java     |  254 --
 .../dotnet/PlatformDotNetConfigurationEx.java   |   90 -
 .../platform/dotnet/PlatformDotNetService.java  |   27 -
 .../dotnet/PlatformDotNetServiceImpl.java       |   47 -
 .../events/PlatformEventFilterListenerImpl.java |  163 -
 .../platform/events/PlatformEvents.java         |  396 --
 .../lifecycle/PlatformLifecycleBean.java        |   75 -
 .../platform/memory/PlatformAbstractMemory.java |  121 -
 .../PlatformBigEndianInputStreamImpl.java       |  126 -
 .../PlatformBigEndianOutputStreamImpl.java      |  161 -
 .../platform/memory/PlatformExternalMemory.java |   55 -
 .../memory/PlatformInputStreamImpl.java         |  331 --
 .../memory/PlatformMemoryManagerImpl.java       |   85 -
 .../platform/memory/PlatformMemoryPool.java     |  140 -
 .../platform/memory/PlatformMemoryUtils.java    |  467 ---
 .../memory/PlatformOutputStreamImpl.java        |  267 --
 .../platform/memory/PlatformPooledMemory.java   |   64 -
 .../platform/memory/PlatformUnpooledMemory.java |   51 -
 .../messaging/PlatformMessageFilterImpl.java    |  110 -
 .../messaging/PlatformMessageLocalFilter.java   |  102 -
 .../platform/messaging/PlatformMessaging.java   |  166 -
 .../services/PlatformAbstractService.java       |  230 --
 .../platform/services/PlatformServices.java     |  275 --
 .../transactions/PlatformTransactions.java      |  259 --
 .../platform/utils/PlatformFutureUtils.java     |  397 --
 .../platform/utils/PlatformReaderBiClosure.java |   34 -
 .../platform/utils/PlatformReaderClosure.java   |   34 -
 .../platform/utils/PlatformUtils.java           |  768 ----
 .../platform/utils/PlatformWriterBiClosure.java |   34 -
 .../platform/utils/PlatformWriterClosure.java   |   33 -
 .../platform/cpp/PlatformCppConfiguration.java  |   47 -
 .../ignite/platform/cpp/package-info.java       |   22 -
 .../dotnet/PlatformDotNetCacheStoreFactory.java |  139 -
 .../dotnet/PlatformDotNetLifecycleBean.java     |  109 -
 .../ignite/platform/dotnet/package-info.java    |   22 -
 .../apache/ignite/platform/package-info.java    |   22 -
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   52 -
 .../Properties/AssemblyInfo.cs                  |   49 -
 .../TestClass.cs                                |   35 -
 .../Apache.Ignite.Core.Tests.csproj             |  225 --
 .../Cache/CacheAbstractTest.cs                  | 3252 ----------------
 .../Cache/CacheAffinityTest.cs                  |  139 -
 .../Cache/CacheDynamicStartTest.cs              |  281 --
 .../Cache/CacheEntryTest.cs                     |   69 -
 .../Cache/CacheForkedTest.cs                    |   81 -
 .../Cache/CacheLocalAtomicTest.cs               |   57 -
 .../Cache/CacheLocalTest.cs                     |   56 -
 .../CachePartitionedAtomicNearEnabledTest.cs    |   50 -
 .../Cache/CachePartitionedAtomicTest.cs         |   50 -
 .../Cache/CachePartitionedNearEnabledTest.cs    |   50 -
 .../Cache/CachePartitionedTest.cs               |   50 -
 .../Cache/CacheReplicatedAtomicTest.cs          |   60 -
 .../Cache/CacheReplicatedTest.cs                |   60 -
 .../Cache/CacheTestAsyncWrapper.cs              |  436 ---
 .../Cache/Query/CacheQueriesTest.cs             |  928 -----
 .../Continuous/ContinuousQueryAbstractTest.cs   | 1181 ------
 .../ContinuousQueryAtomicBackupTest.cs          |   33 -
 .../ContinuousQueryAtomicNoBackupTest.cs        |   34 -
 .../ContinuousQueryNoBackupAbstractTest.cs      |   72 -
 .../ContinuousQueryTransactionalBackupTest.cs   |   34 -
 .../ContinuousQueryTransactionalNoBackupTest.cs |   33 -
 .../Cache/Store/CacheParallelLoadStoreTest.cs   |  110 -
 .../Cache/Store/CacheStoreSessionTest.cs        |  285 --
 .../Cache/Store/CacheStoreTest.cs               |  510 ---
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   91 -
 .../Cache/Store/CacheTestStore.cs               |  155 -
 .../Compute/AbstractTaskTest.cs                 |  217 --
 .../Compute/ClosureTaskTest.cs                  |  390 --
 .../Compute/ComputeApiTest.cs                   | 1281 ------
 .../Compute/ComputeMultithreadedTest.cs         |  269 --
 .../Compute/FailoverTaskSelfTest.cs             |  246 --
 .../Forked/ForkedPortableClosureTaskTest.cs     |   30 -
 .../Compute/Forked/ForkedResourceTaskTest.cs    |   33 -
 .../Forked/ForkedSerializableClosureTaskTest.cs |   33 -
 .../Compute/Forked/ForkedTaskAdapterTest.cs     |   30 -
 .../Compute/IgniteExceptionTaskSelfTest.cs      |  753 ----
 .../Compute/PortableClosureTaskTest.cs          |  217 --
 .../Compute/PortableTaskTest.cs                 |  253 --
 .../Compute/ResourceTaskTest.cs                 |  568 ---
 .../Compute/SerializableClosureTaskTest.cs      |  217 --
 .../Compute/TaskAdapterTest.cs                  |  274 --
 .../Compute/TaskResultTest.cs                   |  437 ---
 .../Config/Apache.Ignite.exe.config.test        |   41 -
 .../Config/Cache/Store/cache-store-session.xml  |   80 -
 .../Config/Compute/compute-grid1.xml            |   90 -
 .../Config/Compute/compute-grid2.xml            |   63 -
 .../Config/Compute/compute-grid3.xml            |   52 -
 .../Config/Compute/compute-standalone.xml       |   87 -
 .../Config/Dynamic/dynamic-client.xml           |   51 -
 .../Config/Dynamic/dynamic-data-no-cfg.xml      |   47 -
 .../Config/Dynamic/dynamic-data.xml             |   65 -
 .../Config/Lifecycle/lifecycle-beans.xml        |   66 -
 .../Config/Lifecycle/lifecycle-no-beans.xml     |   44 -
 .../Config/cache-portables.xml                  |   78 -
 .../Config/cache-query-continuous.xml           |  171 -
 .../Config/cache-query.xml                      |  100 -
 .../Config/marshaller-default.xml               |   43 -
 .../Config/marshaller-invalid.xml               |   46 -
 .../Config/marshaller-portable.xml              |   43 -
 .../native-client-test-cache-affinity.xml       |   70 -
 .../native-client-test-cache-parallel-store.xml |   69 -
 .../Config/native-client-test-cache-store.xml   |  125 -
 .../Config/native-client-test-cache.xml         |  194 -
 .../Config/portable.xml                         |   56 -
 .../Config/start-test-grid1.xml                 |   54 -
 .../Config/start-test-grid2.xml                 |   45 -
 .../Config/start-test-grid3.xml                 |   43 -
 .../Dataload/DataStreamerTest.cs                |  592 ---
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  961 -----
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |  352 --
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  443 ---
 .../Apache.Ignite.Core.Tests/FutureTest.cs      |  278 --
 .../IgniteManagerTest.cs                        |   51 -
 .../IgniteStartStopTest.cs                      |  422 --
 .../Apache.Ignite.Core.Tests/LifecycleTest.cs   |  288 --
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |  243 --
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |   71 -
 .../Memory/InteropMemoryTest.cs                 |  213 -
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |  646 ---
 .../Portable/PortableApiSelfTest.cs             | 1787 ---------
 .../Portable/PortableSelfTest.cs                | 2078 ----------
 .../PortableConfigurationTest.cs                |  173 -
 .../Process/IIgniteProcessOutputReader.cs       |   35 -
 .../Process/IgniteProcess.cs                    |  283 --
 .../Process/IgniteProcessConsoleOutputReader.cs |   40 -
 .../Properties/AssemblyInfo.cs                  |   35 -
 .../Query/ImplicitPortablePerson.cs             |   46 -
 .../Query/NoDefPortablePerson.cs                |   35 -
 .../Query/PortablePerson.cs                     |   69 -
 .../SerializationTest.cs                        |  240 --
 .../Services/ServiceProxyTest.cs                |  741 ----
 .../Services/ServicesAsyncWrapper.cs            |  174 -
 .../Services/ServicesTest.cs                    |  823 ----
 .../Services/ServicesTestAsync.cs               |   33 -
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |   71 -
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |  292 --
 .../TypeResolverTest.cs                         |  107 -
 .../platform/PlatformComputeBroadcastTask.java  |   73 -
 .../platform/PlatformComputeDecimalTask.java    |  106 -
 .../platform/PlatformComputeEchoTask.java       |  188 -
 .../ignite/platform/PlatformComputeEnum.java    |   28 -
 .../platform/PlatformComputeJavaPortable.java   |   39 -
 .../platform/PlatformComputePortable.java       |   42 -
 .../PlatformComputePortableArgTask.java         |  121 -
 .../platform/PlatformEventsWriteEventTask.java  |  146 -
 .../ignite/platform/PlatformMaxMemoryTask.java  |   57 -
 .../ignite/platform/PlatformMinMemoryTask.java  |   57 -
 .../lifecycle/PlatformJavaLifecycleBean.java    |   47 -
 .../lifecycle/PlatformJavaLifecycleTask.java    |   65 -
 modules/platforms/cpp/README.txt                |  101 +
 modules/platforms/cpp/common/Makefile.am        |   45 +
 modules/platforms/cpp/common/configure.ac       |   62 +
 .../platforms/cpp/common/ignite-common.pc.in    |    9 +
 .../platforms/cpp/common/include/Makefile.am    |   26 +
 .../common/include/ignite/common/concurrent.h   |  237 ++
 .../cpp/common/include/ignite/common/exports.h  |  158 +
 .../cpp/common/include/ignite/common/java.h     |  679 ++++
 .../cpp/common/include/ignite/common/utils.h    |   81 +
 .../cpp/common/os/linux/include/Makefile.am     |   24 +
 .../os/linux/include/ignite/common/common.h     |   81 +
 .../linux/include/ignite/common/concurrent_os.h |  394 ++
 .../cpp/common/os/linux/src/common.cpp          |   59 +
 .../cpp/common/os/linux/src/concurrent_os.cpp   |  175 +
 .../os/win/include/ignite/common/common.h       |   56 +
 .../win/include/ignite/common/concurrent_os.h   |  406 ++
 .../platforms/cpp/common/os/win/src/common.cpp  |   65 +
 .../cpp/common/os/win/src/concurrent_os.cpp     |  151 +
 modules/platforms/cpp/common/project/README.TXT |    1 +
 .../platforms/cpp/common/project/vs/README.TXT  |    1 +
 .../cpp/common/project/vs/common.vcxproj        |  203 +
 .../common/project/vs/common.vcxproj.filters    |   57 +
 .../platforms/cpp/common/project/vs/module.def  |  111 +
 .../platforms/cpp/common/project/vs/targetver.h |   25 +
 modules/platforms/cpp/common/src/concurrent.cpp |   94 +
 modules/platforms/cpp/common/src/exports.cpp    |  461 +++
 modules/platforms/cpp/common/src/java.cpp       | 2416 ++++++++++++
 modules/platforms/cpp/core-test/Makefile.am     |   49 +
 .../cpp/core-test/config/cache-query.xml        |   91 +
 .../cpp/core-test/config/cache-test.xml         |  129 +
 modules/platforms/cpp/core-test/configure.ac    |   62 +
 .../platforms/cpp/core-test/include/Makefile.am |   22 +
 .../core-test/include/ignite/binary_test_defs.h |  320 ++
 .../include/ignite/binary_test_utils.h          |  516 +++
 .../cpp/core-test/include/teamcity_messages.h   |   55 +
 .../platforms/cpp/core-test/project/README.TXT  |    1 +
 .../cpp/core-test/project/vs/README.TXT         |    1 +
 .../cpp/core-test/project/vs/core-test.vcxproj  |  174 +
 .../project/vs/core-test.vcxproj.filters        |   68 +
 .../src/binary_reader_writer_raw_test.cpp       | 1593 ++++++++
 .../core-test/src/binary_reader_writer_test.cpp | 2373 +++++++++++
 .../cpp/core-test/src/binary_session_test.cpp   |  257 ++
 .../cpp/core-test/src/binary_test_defs.cpp      |   65 +
 .../cpp/core-test/src/cache_query_test.cpp      |  841 ++++
 .../platforms/cpp/core-test/src/cache_test.cpp  |  479 +++
 .../cpp/core-test/src/concurrent_test.cpp       |  186 +
 .../cpp/core-test/src/handle_registry_test.cpp  |  176 +
 .../cpp/core-test/src/ignition_test.cpp         |   95 +
 .../cpp/core-test/src/teamcity_boost.cpp        |  159 +
 .../cpp/core-test/src/teamcity_messages.cpp     |  150 +
 modules/platforms/cpp/core/Makefile.am          |   67 +
 modules/platforms/cpp/core/configure.ac         |   62 +
 modules/platforms/cpp/core/ignite.pc.in         |    9 +
 modules/platforms/cpp/core/include/Makefile.am  |   69 +
 .../cpp/core/include/ignite/binary/binary.h     |   29 +
 .../core/include/ignite/binary/binary_consts.h  |  106 +
 .../include/ignite/binary/binary_containers.h   |  525 +++
 .../include/ignite/binary/binary_raw_reader.h   |  350 ++
 .../include/ignite/binary/binary_raw_writer.h   |  326 ++
 .../core/include/ignite/binary/binary_reader.h  |  384 ++
 .../core/include/ignite/binary/binary_type.h    |  293 ++
 .../core/include/ignite/binary/binary_writer.h  |  362 ++
 .../cpp/core/include/ignite/cache/cache.h       | 1196 ++++++
 .../cpp/core/include/ignite/cache/cache_entry.h |  118 +
 .../core/include/ignite/cache/cache_peek_mode.h |   71 +
 .../cpp/core/include/ignite/cache/query/query.h |   28 +
 .../include/ignite/cache/query/query_argument.h |  125 +
 .../include/ignite/cache/query/query_cursor.h   |  200 +
 .../ignite/cache/query/query_fields_cursor.h    |  153 +
 .../ignite/cache/query/query_fields_row.h       |  154 +
 .../include/ignite/cache/query/query_scan.h     |  151 +
 .../core/include/ignite/cache/query/query_sql.h |  243 ++
 .../ignite/cache/query/query_sql_fields.h       |  210 +
 .../include/ignite/cache/query/query_text.h     |  160 +
 .../platforms/cpp/core/include/ignite/guid.h    |  112 +
 .../platforms/cpp/core/include/ignite/ignite.h  |  166 +
 .../core/include/ignite/ignite_configuration.h  |   66 +
 .../cpp/core/include/ignite/ignite_error.h      |  260 ++
 .../cpp/core/include/ignite/ignition.h          |  195 +
 .../include/ignite/impl/binary/binary_common.h  |  188 +
 .../ignite/impl/binary/binary_id_resolver.h     |  106 +
 .../ignite/impl/binary/binary_reader_impl.h     | 1309 +++++++
 .../include/ignite/impl/binary/binary_schema.h  |  136 +
 .../ignite/impl/binary/binary_type_handler.h    |  102 +
 .../ignite/impl/binary/binary_type_manager.h    |  120 +
 .../ignite/impl/binary/binary_type_snapshot.h   |  122 +
 .../ignite/impl/binary/binary_type_updater.h    |   53 +
 .../impl/binary/binary_type_updater_impl.h      |   65 +
 .../include/ignite/impl/binary/binary_utils.h   |  344 ++
 .../ignite/impl/binary/binary_writer_impl.h     |  913 +++++
 .../core/include/ignite/impl/cache/cache_impl.h |  428 ++
 .../impl/cache/query/query_fields_row_impl.h    |  174 +
 .../ignite/impl/cache/query/query_impl.h        |  125 +
 .../core/include/ignite/impl/handle_registry.h  |  202 +
 .../include/ignite/impl/ignite_environment.h    |  130 +
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  165 +
 .../core/include/ignite/impl/interop/interop.h  |   25 +
 .../ignite/impl/interop/interop_input_stream.h  |  250 ++
 .../ignite/impl/interop/interop_memory.h        |  280 ++
 .../ignite/impl/interop/interop_output_stream.h |  250 ++
 .../interop/interop_stream_position_guard.h     |   79 +
 .../cpp/core/include/ignite/impl/operations.h   |  452 +++
 .../cpp/core/os/linux/include/Makefile.am       |   23 +
 .../core/os/linux/include/ignite/impl/utils.h   |  155 +
 .../cpp/core/os/linux/src/impl/utils.cpp        |  439 +++
 .../cpp/core/os/win/include/ignite/impl/utils.h |  155 +
 .../cpp/core/os/win/src/impl/utils.cpp          |  453 +++
 modules/platforms/cpp/core/project/README.TXT   |    1 +
 .../platforms/cpp/core/project/vs/README.TXT    |    1 +
 .../platforms/cpp/core/project/vs/core.vcxproj  |  279 ++
 .../cpp/core/project/vs/core.vcxproj.filters    |  267 ++
 .../cpp/core/src/binary/binary_containers.cpp   |   76 +
 .../cpp/core/src/binary/binary_raw_reader.cpp   |  145 +
 .../cpp/core/src/binary/binary_raw_writer.cpp   |  147 +
 .../cpp/core/src/binary/binary_reader.cpp       |  152 +
 .../cpp/core/src/binary/binary_type.cpp         |   51 +
 .../cpp/core/src/binary/binary_writer.cpp       |  154 +
 modules/platforms/cpp/core/src/guid.cpp         |   65 +
 modules/platforms/cpp/core/src/ignite.cpp       |   43 +
 modules/platforms/cpp/core/src/ignite_error.cpp |  222 ++
 modules/platforms/cpp/core/src/ignition.cpp     |  470 +++
 .../core/src/impl/binary/binary_reader_impl.cpp |  760 ++++
 .../cpp/core/src/impl/binary/binary_schema.cpp  |  135 +
 .../src/impl/binary/binary_type_handler.cpp     |   78 +
 .../src/impl/binary/binary_type_manager.cpp     |  201 +
 .../src/impl/binary/binary_type_snapshot.cpp    |   70 +
 .../src/impl/binary/binary_type_updater.cpp     |   32 +
 .../impl/binary/binary_type_updater_impl.cpp    |   94 +
 .../cpp/core/src/impl/binary/binary_utils.cpp   |  211 +
 .../core/src/impl/binary/binary_writer_impl.cpp |  623 +++
 .../cpp/core/src/impl/cache/cache_impl.cpp      |  393 ++
 .../core/src/impl/cache/query/query_impl.cpp    |  228 ++
 .../cpp/core/src/impl/handle_registry.cpp       |  234 ++
 .../cpp/core/src/impl/ignite_environment.cpp    |  167 +
 .../platforms/cpp/core/src/impl/ignite_impl.cpp |   47 +
 .../src/impl/interop/interop_input_stream.cpp   |  235 ++
 .../core/src/impl/interop/interop_memory.cpp    |  182 +
 .../src/impl/interop/interop_output_stream.cpp  |  233 ++
 modules/platforms/cpp/examples/Makefile.am      |   39 +
 modules/platforms/cpp/examples/README.txt       |   42 +
 .../cpp/examples/config/example-cache.xml       |   77 +
 modules/platforms/cpp/examples/configure.ac     |   38 +
 .../platforms/cpp/examples/include/Makefile.am  |   21 +
 .../examples/include/ignite/examples/address.h  |  109 +
 .../include/ignite/examples/organization.h      |  111 +
 .../cpp/examples/project/vs/ignite-examples.sln |   19 +
 .../examples/project/vs/ignite-examples.vcxproj |  107 +
 .../project/vs/ignite-examples.vcxproj.filters  |   30 +
 .../cpp/examples/src/putgetexample.cpp          |  126 +
 modules/platforms/cpp/ignite/Makefile.am        |   39 +
 modules/platforms/cpp/ignite/configure.ac       |   62 +
 modules/platforms/cpp/ignite/project/README.TXT |    1 +
 .../platforms/cpp/ignite/project/vs/README.TXT  |    1 +
 .../cpp/ignite/project/vs/ignite.vcxproj        |  167 +
 .../ignite/project/vs/ignite.vcxproj.filters    |   25 +
 modules/platforms/cpp/ignite/src/ignite.cpp     |  225 ++
 modules/platforms/cpp/project/vs/ignite.sln     |   58 +
 modules/platforms/cpp/project/vs/ignite.slnrel  |   33 +
 .../platforms/cpp/project/vs/ignite_x86.slnrel  |   33 +
 .../Apache.Ignite.Benchmarks.csproj             |   92 +
 .../Apache.Ignite.Benchmarks.snk                |  Bin 0 -> 596 bytes
 .../dotnet/Apache.Ignite.Benchmarks/App.config  |   24 +
 .../Apache.Ignite.Benchmarks/BenchmarkBase.cs   |  931 +++++
 .../BenchmarkOperationDescriptor.cs             |   68 +
 .../Apache.Ignite.Benchmarks/BenchmarkRunner.cs |   94 +
 .../Apache.Ignite.Benchmarks/BenchmarkState.cs  |  106 +
 .../Apache.Ignite.Benchmarks/BenchmarkUtils.cs  |  236 ++
 .../Binary/BinarizableReadBenchmark.cs          |  125 +
 .../Binary/BinarizableWriteBenchmark.cs         |  135 +
 .../Config/benchmark.xml                        |   57 +
 .../Interop/ClosureBenchmark.cs                 |   66 +
 .../Interop/GetAsyncBenchmark.cs                |   62 +
 .../Interop/GetBenchmark.cs                     |   62 +
 .../Interop/PlatformBenchmarkBase.cs            |  121 +
 .../Interop/PutAsyncBenchmark.cs                |   58 +
 .../Interop/PutBenchmark.cs                     |   58 +
 .../Interop/TaskBenchmark.cs                    |  100 +
 .../Interop/TxBenchmark.cs                      |   65 +
 .../Apache.Ignite.Benchmarks/Model/Address.cs   |   80 +
 .../Apache.Ignite.Benchmarks/Model/Company.cs   |   89 +
 .../Model/Department.cs                         |   40 +
 .../Apache.Ignite.Benchmarks/Model/Employee.cs  |  136 +
 .../Apache.Ignite.Benchmarks/Model/Sex.cs       |   31 +
 .../Apache.Ignite.Benchmarks/Model/TestModel.cs |  111 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Result/BenchmarkConsoleResultWriter.cs      |   68 +
 .../Result/BenchmarkFileResultWriter.cs         |  323 ++
 .../Result/IBenchmarkResultWriter.cs            |   55 +
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   61 +
 .../Apache.Ignite.Core.Tests.TestDll.snk        |  Bin 0 -> 596 bytes
 .../Properties/AssemblyInfo.cs                  |   49 +
 .../TestClass.cs                                |   35 +
 .../Apache.Ignite.Core.Tests.csproj             |  259 ++
 .../Apache.Ignite.Core.Tests.nunit              |    7 +
 .../Apache.Ignite.Core.Tests.snk                |  Bin 0 -> 596 bytes
 .../Binary/BinaryBuilderSelfTest.cs             | 1721 ++++++++
 .../Binary/BinarySelfTest.cs                    | 2157 ++++++++++
 .../Binary/BinaryStructureTest.cs               |  250 ++
 .../BinaryConfigurationTest.cs                  |  173 +
 .../Cache/CacheAbstractTest.cs                  | 3265 ++++++++++++++++
 .../Cache/CacheAffinityTest.cs                  |  139 +
 .../Cache/CacheDynamicStartTest.cs              |  282 ++
 .../Cache/CacheEntryTest.cs                     |   69 +
 .../Cache/CacheForkedTest.cs                    |   81 +
 .../Cache/CacheLocalAtomicTest.cs               |   57 +
 .../Cache/CacheLocalTest.cs                     |   56 +
 .../CachePartitionedAtomicNearEnabledTest.cs    |   50 +
 .../Cache/CachePartitionedAtomicTest.cs         |   50 +
 .../Cache/CachePartitionedNearEnabledTest.cs    |   50 +
 .../Cache/CachePartitionedTest.cs               |   50 +
 .../Cache/CacheReplicatedAtomicTest.cs          |   60 +
 .../Cache/CacheReplicatedTest.cs                |   60 +
 .../Cache/CacheTestAsyncWrapper.cs              |  575 +++
 .../Cache/Query/CacheQueriesTest.cs             |  935 +++++
 .../Continuous/ContinuousQueryAbstractTest.cs   | 1238 ++++++
 .../ContinuousQueryAtomicBackupTest.cs          |   33 +
 .../ContinuousQueryAtomicNoBackupTest.cs        |   34 +
 .../ContinuousQueryNoBackupAbstractTest.cs      |   72 +
 .../ContinuousQueryTransactionalBackupTest.cs   |   34 +
 .../ContinuousQueryTransactionalNoBackupTest.cs |   33 +
 .../Cache/Store/CacheParallelLoadStoreTest.cs   |  110 +
 .../Cache/Store/CacheStoreSessionTest.cs        |  285 ++
 .../Cache/Store/CacheStoreTest.cs               |  536 +++
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   91 +
 .../Cache/Store/CacheTestStore.cs               |  155 +
 .../Compute/AbstractTaskTest.cs                 |  217 ++
 .../Compute/BinarizableClosureTaskTest.cs       |  185 +
 .../Compute/BinarizableTaskTest.cs              |  269 ++
 .../Compute/ClosureTaskTest.cs                  |  390 ++
 .../Compute/ComputeApiTest.cs                   | 1303 +++++++
 .../Compute/ComputeMultithreadedTest.cs         |  269 ++
 .../Compute/FailoverTaskSelfTest.cs             |  246 ++
 .../Forked/ForkedBinarizableClosureTaskTest.cs  |   30 +
 .../Compute/Forked/ForkedResourceTaskTest.cs    |   30 +
 .../Forked/ForkedSerializableClosureTaskTest.cs |   30 +
 .../Compute/Forked/ForkedTaskAdapterTest.cs     |   30 +
 .../Compute/IgniteExceptionTaskSelfTest.cs      |  754 ++++
 .../Compute/ResourceTaskTest.cs                 |  568 +++
 .../Compute/SerializableClosureTaskTest.cs      |  217 ++
 .../Compute/TaskAdapterTest.cs                  |  274 ++
 .../Compute/TaskResultTest.cs                   |  437 +++
 .../Config/Apache.Ignite.exe.config.test        |   41 +
 .../Config/Cache/Store/cache-store-session.xml  |   79 +
 .../Config/Compute/compute-grid1.xml            |   95 +
 .../Config/Compute/compute-grid2.xml            |   63 +
 .../Config/Compute/compute-grid3.xml            |   52 +
 .../Config/Compute/compute-standalone.xml       |   87 +
 .../Config/Dynamic/dynamic-client.xml           |   51 +
 .../Config/Dynamic/dynamic-data-no-cfg.xml      |   47 +
 .../Config/Dynamic/dynamic-data.xml             |   65 +
 .../Config/Lifecycle/lifecycle-beans.xml        |   66 +
 .../Config/Lifecycle/lifecycle-no-beans.xml     |   44 +
 .../Apache.Ignite.Core.Tests/Config/binary.xml  |   56 +
 .../Config/cache-binarizables.xml               |   78 +
 .../Config/cache-query-continuous.xml           |  171 +
 .../Config/cache-query.xml                      |  100 +
 .../Config/marshaller-default.xml               |   43 +
 .../Config/marshaller-explicit.xml              |   53 +
 .../Config/marshaller-invalid.xml               |   46 +
 .../native-client-test-cache-affinity.xml       |   70 +
 .../native-client-test-cache-parallel-store.xml |   68 +
 .../Config/native-client-test-cache-store.xml   |  121 +
 .../Config/native-client-test-cache.xml         |  143 +
 .../Config/start-test-grid1.xml                 |   54 +
 .../Config/start-test-grid2.xml                 |   45 +
 .../Config/start-test-grid3.xml                 |   43 +
 .../DataStructures/AtomicLongTest.cs            |  138 +
 .../Dataload/DataStreamerTest.cs                |  592 +++
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  956 +++++
 .../Examples/Example.cs                         |  126 +
 .../Examples/ExamplesTest.cs                    |  156 +
 .../Examples/PathUtil.cs                        |   50 +
 .../Examples/ProjectFilesTest.cs                |   49 +
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |  365 ++
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  443 +++
 .../Apache.Ignite.Core.Tests/FutureTest.cs      |  188 +
 .../IgniteManagerTest.cs                        |   51 +
 .../IgniteStartStopTest.cs                      |  426 ++
 .../Apache.Ignite.Core.Tests/IgniteTestBase.cs  |  200 +
 .../Apache.Ignite.Core.Tests/LifecycleTest.cs   |  289 ++
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |  243 ++
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |   71 +
 .../Memory/InteropMemoryTest.cs                 |  200 +
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |  644 +++
 .../Process/IIgniteProcessOutputReader.cs       |   35 +
 .../Process/IgniteProcess.cs                    |  283 ++
 .../Process/IgniteProcessConsoleOutputReader.cs |   40 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Query/BinarizablePerson.cs                  |   69 +
 .../Query/ImplicitBinarizablePerson.cs          |   46 +
 .../Query/NoDefBinarizablePerson.cs             |   35 +
 .../SerializationTest.cs                        |  240 ++
 .../Services/ServiceProxyTest.cs                |  741 ++++
 .../Services/ServicesAsyncWrapper.cs            |  182 +
 .../Services/ServicesTest.cs                    |  823 ++++
 .../Services/ServicesTestAsync.cs               |   33 +
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |   71 +
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |  306 ++
 .../TypeResolverTest.cs                         |  107 +
 .../Apache.Ignite.Core.csproj                   |  381 ++
 .../Apache.Ignite.Core/Apache.Ignite.Core.snk   |  Bin 0 -> 596 bytes
 .../Binary/BinaryConfiguration.cs               |   90 +
 .../Binary/BinaryObjectException.cs             |   64 +
 .../Binary/BinaryTypeConfiguration.cs           |  116 +
 .../Binary/BinaryTypeNames.cs                   |  121 +
 .../Apache.Ignite.Core/Binary/IBinarizable.cs   |   39 +
 .../Binary/IBinaryIdMapper.cs                   |   40 +
 .../Binary/IBinaryNameMapper.cs                 |   39 +
 .../Apache.Ignite.Core/Binary/IBinaryObject.cs  |   60 +
 .../Binary/IBinaryObjectBuilder.cs              |  310 ++
 .../Binary/IBinaryRawReader.cs                  |  223 ++
 .../Binary/IBinaryRawWriter.cs                  |  220 ++
 .../Apache.Ignite.Core/Binary/IBinaryReader.cs  |  279 ++
 .../Binary/IBinarySerializer.cs                 |   39 +
 .../Apache.Ignite.Core/Binary/IBinaryType.cs    |   52 +
 .../Apache.Ignite.Core/Binary/IBinaryWriter.cs  |  256 ++
 .../Apache.Ignite.Core/Binary/IIgniteBinary.cs  |  120 +
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |   67 +
 .../Cache/CacheEntryProcessorException.cs       |   79 +
 .../Apache.Ignite.Core/Cache/CacheException.cs  |   68 +
 .../Cache/CachePartialUpdateException.cs        |  119 +
 .../Apache.Ignite.Core/Cache/CachePeekMode.cs   |   68 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |   98 +
 .../Cache/Event/CacheEntryEventType.cs          |   41 +
 .../Cache/Event/ICacheEntryEvent.cs             |   45 +
 .../Cache/Event/ICacheEntryEventFilter.cs       |   31 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   33 +
 .../Cache/Expiry/ExpiryPolicy.cs                |   89 +
 .../Cache/Expiry/IExpiryPolicy.cs               |   63 +
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  844 ++++
 .../Apache.Ignite.Core/Cache/ICacheAffinity.cs  |  158 +
 .../Apache.Ignite.Core/Cache/ICacheEntry.cs     |   37 +
 .../Cache/ICacheEntryFilter.cs                  |   34 +
 .../Cache/ICacheEntryProcessor.cs               |   45 +
 .../Cache/ICacheEntryProcessorResult.cs         |   40 +
 .../Apache.Ignite.Core/Cache/ICacheLock.cs      |   58 +
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |  486 +++
 .../Cache/IMutableCacheEntry.cs                 |   47 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |  170 +
 .../Query/Continuous/IContinuousQueryHandle.cs  |   47 +
 .../Cache/Query/IQueryCursor.cs                 |   44 +
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   82 +
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |   76 +
 .../Cache/Query/SqlFieldsQuery.cs               |   81 +
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |  120 +
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |  104 +
 .../Store/CacheParallelLoadStoreAdapter.cs      |  207 +
 .../Cache/Store/CacheStoreAdapter.cs            |  146 +
 .../Cache/Store/CacheStoreException.cs          |   66 +
 .../Cache/Store/ICacheStore.cs                  |  184 +
 .../Cache/Store/ICacheStoreSession.cs           |   42 +
 .../Cluster/ClusterGroupEmptyException.cs       |   70 +
 .../Cluster/ClusterTopologyException.cs         |   69 +
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |   79 +
 .../Apache.Ignite.Core/Cluster/IClusterGroup.cs |  235 ++
 .../Cluster/IClusterMetrics.cs                  |  347 ++
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |  135 +
 .../Cluster/IClusterNodeFilter.cs               |   32 +
 .../Common/IgniteException.cs                   |   66 +
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |  132 +
 .../ComputeExecutionRejectedException.cs        |   69 +
 .../Compute/ComputeJobAdapter.cs                |  122 +
 .../Compute/ComputeJobFailoverException.cs      |   72 +
 .../Compute/ComputeJobResultPolicy.cs           |   45 +
 .../Compute/ComputeTaskAdapter.cs               |   95 +
 .../Compute/ComputeTaskCancelledException.cs    |   69 +
 .../ComputeTaskNoResultCacheAttribute.cs        |   35 +
 .../Compute/ComputeTaskSplitAdapter.cs          |   95 +
 .../Compute/ComputeTaskTimeoutException.cs      |   67 +
 .../Compute/ComputeUserUndeclaredException.cs   |   70 +
 .../Apache.Ignite.Core/Compute/ICompute.cs      |  431 ++
 .../Apache.Ignite.Core/Compute/IComputeFunc.cs  |   55 +
 .../Apache.Ignite.Core/Compute/IComputeJob.cs   |   59 +
 .../Compute/IComputeJobResult.cs                |   66 +
 .../Compute/IComputeReducer.cs                  |   41 +
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |  132 +
 .../DataStructures/IAtomicLong.cs               |   84 +
 .../Datastream/IDataStreamer.cs                 |  206 +
 .../Datastream/IStreamReceiver.cs               |   38 +
 .../Datastream/StreamTransformer.cs             |   73 +
 .../Datastream/StreamVisitor.cs                 |   55 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |  178 +
 .../Events/CacheQueryExecutedEvent.cs           |   99 +
 .../Events/CacheQueryReadEvent.cs               |  136 +
 .../Events/CacheRebalancingEvent.cs             |  100 +
 .../Events/CheckpointEvent.cs                   |   51 +
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   82 +
 .../Apache.Ignite.Core/Events/EventBase.cs      |  167 +
 .../Apache.Ignite.Core/Events/EventReader.cs    |   72 +
 .../Apache.Ignite.Core/Events/EventType.cs      |  595 +++
 .../dotnet/Apache.Ignite.Core/Events/IEvent.cs  |   74 +
 .../Apache.Ignite.Core/Events/IEventFilter.cs   |   33 +
 .../Apache.Ignite.Core/Events/IEventListener.cs |   34 +
 .../dotnet/Apache.Ignite.Core/Events/IEvents.cs |  259 ++
 .../Apache.Ignite.Core/Events/JobEvent.cs       |  102 +
 .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs |   51 +
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |   93 +
 .../Apache.Ignite.Core/GlobalSuppressions.cs    |  Bin 0 -> 1908 bytes
 .../dotnet/Apache.Ignite.Core/IIgnite.cs        |  168 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  143 +
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |  627 +++
 .../Impl/Binary/BinarizableSerializer.cs        |   45 +
 .../Impl/Binary/BinaryBuilderField.cs           |   89 +
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |  210 +
 .../Impl/Binary/BinaryHandleDictionary.cs       |  188 +
 .../Impl/Binary/BinaryMode.cs                   |   42 +
 .../Impl/Binary/BinaryObject.cs                 |  354 ++
 .../Impl/Binary/BinaryObjectBuilder.cs          | 1137 ++++++
 .../Impl/Binary/BinaryObjectHandle.cs           |   59 +
 .../Impl/Binary/BinaryObjectHeader.cs           |  496 +++
 .../Impl/Binary/BinaryObjectSchema.cs           |   98 +
 .../Impl/Binary/BinaryObjectSchemaField.cs      |   48 +
 .../Impl/Binary/BinaryObjectSchemaHolder.cs     |  107 +
 .../Impl/Binary/BinaryReader.cs                 |  965 +++++
 .../Impl/Binary/BinaryReaderExtensions.cs       |   52 +
 .../Impl/Binary/BinaryReaderHandleDictionary.cs |   42 +
 .../Impl/Binary/BinaryReflectiveActions.cs      |  440 +++
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |  218 ++
 .../Binary/BinarySurrogateTypeDescriptor.cs     |  162 +
 .../Impl/Binary/BinarySystemHandlers.cs         |  832 ++++
 .../Impl/Binary/BinarySystemTypeSerializer.cs   |   62 +
 .../Impl/Binary/BinaryUtils.cs                  | 1823 +++++++++
 .../Impl/Binary/BinaryWriter.cs                 | 1428 +++++++
 .../Impl/Binary/DateTimeHolder.cs               |   68 +
 .../Impl/Binary/IBinarySystemTypeSerializer.cs  |   34 +
 .../Impl/Binary/IBinaryTypeDescriptor.cs        |  133 +
 .../Impl/Binary/IBinaryWriteAware.cs            |   34 +
 .../Impl/Binary/IgniteBinary.cs                 |  192 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |  452 +++
 .../Impl/Binary/Io/BinaryStreamAdapter.cs       |  114 +
 .../Impl/Binary/Io/BinaryStreamBase.cs          | 1253 ++++++
 .../Impl/Binary/Io/IBinaryStream.cs             |  322 ++
 .../Impl/Binary/Marshaller.cs                   |  537 +++
 .../Impl/Binary/Metadata/BinaryType.cs          |  200 +
 .../Binary/Metadata/BinaryTypeHashsetHandler.cs |   69 +
 .../Impl/Binary/Metadata/BinaryTypeHolder.cs    |  147 +
 .../Impl/Binary/Metadata/IBinaryTypeHandler.cs  |   41 +
 .../Impl/Binary/SerializableObjectHolder.cs     |   73 +
 .../Impl/Binary/Structure/BinaryStructure.cs    |  332 ++
 .../Binary/Structure/BinaryStructureEntry.cs    |  128 +
 .../Structure/BinaryStructureJumpTable.cs       |  118 +
 .../Binary/Structure/BinaryStructureTracker.cs  |  140 +
 .../Binary/Structure/BinaryStructureUpdate.cs   |   84 +
 .../Impl/Binary/TypeResolver.cs                 |  231 ++
 .../Impl/Cache/CacheAffinityImpl.cs             |  275 ++
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |  127 +
 .../Impl/Cache/CacheEntryFilterHolder.cs        |  132 +
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  144 +
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   65 +
 .../Cache/CacheEntryProcessorResultHolder.cs    |  128 +
 .../Impl/Cache/CacheEnumerable.cs               |   82 +
 .../Impl/Cache/CacheEnumerator.cs               |  117 +
 .../Impl/Cache/CacheEnumeratorProxy.cs          |  159 +
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  | 1255 ++++++
 .../Apache.Ignite.Core/Impl/Cache/CacheLock.cs  |  171 +
 .../Impl/Cache/CacheMetricsImpl.cs              |  248 ++
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   64 +
 .../Impl/Cache/Event/CacheEntryCreateEvent.cs   |   80 +
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |   80 +
 .../Impl/Cache/Event/CacheEntryUpdateEvent.cs   |   85 +
 .../Impl/Cache/MutableCacheEntry.cs             |  163 +
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 ++
 .../Query/Continuous/ContinuousQueryFilter.cs   |  125 +
 .../Continuous/ContinuousQueryFilterHolder.cs   |   86 +
 .../Continuous/ContinuousQueryHandleImpl.cs     |  213 +
 .../Query/Continuous/ContinuousQueryUtils.cs    |   96 +
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   54 +
 .../Impl/Cache/Query/QueryCursor.cs             |   50 +
 .../Impl/Cache/Store/CacheStore.cs              |  263 ++
 .../Impl/Cache/Store/CacheStoreSession.cs       |   53 +
 .../Impl/Cache/Store/CacheStoreSessionProxy.cs  |   63 +
 .../Impl/Cluster/ClusterGroupImpl.cs            |  574 +++
 .../Impl/Cluster/ClusterMetricsImpl.cs          |  294 ++
 .../Impl/Cluster/ClusterNodeImpl.cs             |  222 ++
 .../Impl/Cluster/IClusterGroupEx.cs             |   35 +
 .../Impl/Collections/CollectionExtensions.cs    |   45 +
 .../Impl/Collections/MultiValueDictionary.cs    |  145 +
 .../Impl/Collections/ReadOnlyCollection.cs      |  102 +
 .../Impl/Collections/ReadOnlyDictionary.cs      |  149 +
 .../Apache.Ignite.Core/Impl/Common/Classpath.cs |  159 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   72 +
 .../Impl/Common/DelegateConverter.cs            |  269 ++
 .../Impl/Common/DelegateTypeDescriptor.cs       |  340 ++
 .../Apache.Ignite.Core/Impl/Common/Fnv1Hash.cs  |   57 +
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  128 +
 .../Impl/Common/FutureConverter.cs              |   62 +
 .../Impl/Common/FutureType.cs                   |   55 +
 .../Impl/Common/IFutureConverter.cs             |   35 +
 .../Impl/Common/IFutureInternal.cs              |   46 +
 .../Impl/Common/IgniteArgumentCheck.cs          |   77 +
 .../Impl/Common/IgniteHome.cs                   |   97 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   96 +
 .../Impl/Common/ResizeableArray.cs              |   64 +
 .../Impl/Common/TypeCaster.cs                   |   79 +
 .../Closure/ComputeAbstractClosureTask.cs       |  101 +
 .../Impl/Compute/Closure/ComputeActionJob.cs    |   82 +
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |   86 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   56 +
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |   75 +
 .../Closure/ComputeReducingClosureTask.cs       |   61 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   48 +
 .../Compute/Closure/IComputeResourceInjector.cs |   31 +
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  300 ++
 .../Impl/Compute/ComputeFunc.cs                 |  118 +
 .../Impl/Compute/ComputeImpl.cs                 |  660 ++++
 .../Impl/Compute/ComputeJob.cs                  |  162 +
 .../Impl/Compute/ComputeJobHolder.cs            |  245 ++
 .../Compute/ComputeJobResultGenericWrapper.cs   |   73 +
 .../Impl/Compute/ComputeJobResultImpl.cs        |   99 +
 .../Impl/Compute/ComputeOutFunc.cs              |  122 +
 .../Impl/Compute/ComputeTaskHolder.cs           |  505 +++
 .../Impl/DataStructures/AtomicLong.cs           |  102 +
 .../Impl/Datastream/DataStreamerBatch.cs        |  270 ++
 .../Impl/Datastream/DataStreamerEntry.cs        |   64 +
 .../Impl/Datastream/DataStreamerImpl.cs         |  840 ++++
 .../Impl/Datastream/DataStreamerRemoveEntry.cs  |   48 +
 .../Impl/Datastream/StreamReceiverHolder.cs     |  144 +
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |  648 ++++
 .../Impl/Events/RemoteListenEventFilter.cs      |   84 +
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  206 +
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   69 +
 .../Impl/Handle/HandleRegistry.cs               |  343 ++
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |   35 +
 .../Apache.Ignite.Core/Impl/IInteropCallback.cs |   34 +
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  529 +++
 .../Impl/IgniteConfigurationEx.cs               |   57 +
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |  286 ++
 .../Apache.Ignite.Core/Impl/IgniteProxy.cs      |  343 ++
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  418 ++
 .../Impl/InteropExceptionHolder.cs              |   85 +
 .../Impl/LifecycleBeanHolder.cs                 |   66 +
 .../Impl/Memory/IPlatformMemory.cs              |   65 +
 .../Impl/Memory/InteropExternalMemory.cs        |   46 +
 .../Impl/Memory/InteropMemoryUtils.cs           |   38 +
 .../Memory/PlatformBigEndianMemoryStream.cs     |  483 +++
 .../Impl/Memory/PlatformMemory.cs               |   78 +
 .../Impl/Memory/PlatformMemoryManager.cs        |  107 +
 .../Impl/Memory/PlatformMemoryPool.cs           |  106 +
 .../Impl/Memory/PlatformMemoryStream.cs         |  727 ++++
 .../Impl/Memory/PlatformMemoryUtils.cs          |  465 +++
 .../Impl/Memory/PlatformPooledMemory.cs         |   66 +
 .../Impl/Memory/PlatformRawMemory.cs            |   89 +
 .../Impl/Memory/PlatformUnpooledMemory.cs       |   52 +
 .../Impl/Messaging/MessageListenerHolder.cs     |  177 +
 .../Impl/Messaging/Messaging.cs                 |  289 ++
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   47 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  737 ++++
 .../Impl/Resource/IResourceInjector.cs          |   27 +
 .../Impl/Resource/ResourceFieldInjector.cs      |   47 +
 .../Impl/Resource/ResourceMethodInjector.cs     |   48 +
 .../Impl/Resource/ResourceProcessor.cs          |  105 +
 .../Impl/Resource/ResourcePropertyInjector.cs   |   47 +
 .../Impl/Resource/ResourceTypeDescriptor.cs     |  291 ++
 .../Impl/Services/ServiceContext.cs             |   60 +
 .../Impl/Services/ServiceDescriptor.cs          |  106 +
 .../Impl/Services/ServiceProxy.cs               |   71 +
 .../Impl/Services/ServiceProxyInvoker.cs        |  141 +
 .../Impl/Services/ServiceProxySerializer.cs     |  140 +
 .../Impl/Services/Services.cs                   |  372 ++
 .../Impl/Transactions/Transaction.cs            |  146 +
 .../Impl/Transactions/TransactionImpl.cs        |  482 +++
 .../Impl/Transactions/TransactionMetricsImpl.cs |   68 +
 .../Impl/Transactions/TransactionsImpl.cs       |  201 +
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |   42 +
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |   99 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        | 1164 ++++++
 .../Impl/Unmanaged/UnmanagedContext.cs          |   53 +
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |   70 +
 .../Impl/Unmanaged/UnmanagedTarget.cs           |   77 +
 .../Impl/Unmanaged/UnmanagedUtils.cs            | 1371 +++++++
 .../Lifecycle/ILifecycleBean.cs                 |   64 +
 .../Lifecycle/LifecycleEventType.cs             |   49 +
 .../Messaging/IMessageListener.cs               |   38 +
 .../Apache.Ignite.Core/Messaging/IMessaging.cs  |  128 +
 .../Properties/AssemblyInfo.cs                  |   46 +
 .../Resource/InstanceResourceAttribute.cs       |   35 +
 .../Resource/StoreSessionResourceAttribute.cs   |   32 +
 .../Apache.Ignite.Core/Services/IService.cs     |   51 +
 .../Services/IServiceContext.cs                 |   69 +
 .../Services/IServiceDescriptor.cs              |   96 +
 .../Apache.Ignite.Core/Services/IServices.cs    |  256 ++
 .../Services/ServiceConfiguration.cs            |   62 +
 .../Services/ServiceInvocationException.cs      |  101 +
 .../Transactions/ITransaction.cs                |  238 ++
 .../Transactions/ITransactionMetrics.cs         |   47 +
 .../Transactions/ITransactions.cs               |   76 +
 .../Transactions/TransactionConcurrency.cs      |   36 +
 .../TransactionHeuristicException.cs            |   72 +
 .../Transactions/TransactionIsolation.cs        |   41 +
 .../TransactionOptimisticException.cs           |   69 +
 .../TransactionRollbackException.cs             |   68 +
 .../Transactions/TransactionState.cs            |   70 +
 .../Transactions/TransactionTimeoutException.cs |   69 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    |  117 +
 modules/platforms/dotnet/Apache.Ignite.sln      |  111 +
 .../dotnet/Apache.Ignite.sln.DotSettings        |    4 +
 modules/platforms/dotnet/Apache.Ignite.slnrel   |   43 +
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   83 +
 .../dotnet/Apache.Ignite/Apache.Ignite.snk      |  Bin 0 -> 596 bytes
 .../platforms/dotnet/Apache.Ignite/App.config   |   56 +
 .../Config/AppSettingsConfigurator.cs           |  113 +
 .../Apache.Ignite/Config/ArgsConfigurator.cs    |  164 +
 .../Apache.Ignite/Config/ConfigValueParser.cs   |   42 +
 .../Apache.Ignite/Config/IConfigurator.cs       |   34 +
 .../dotnet/Apache.Ignite/IgniteRunner.cs        |  171 +
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   35 +
 .../Apache.Ignite/Service/IgniteService.cs      |  219 ++
 .../Apache.Ignite/Service/NativeMethods.cs      |   57 +
 .../Apache.Ignite/Service/ServiceDescription.cs |   32 +
 .../platforms/dotnet/Apache.Ignite_x86.slnrel   |   43 +
 modules/platforms/dotnet/README.txt             |   24 +
 .../dotnet/examples/Apache.Ignite.Examples.sln  |   38 +
 .../Apache.Ignite.Examples.csproj               |   88 +
 .../Apache.Ignite.Examples.snk                  |  Bin 0 -> 596 bytes
 .../examples/Apache.Ignite.Examples/App.config  |   24 +
 .../Compute/ClosureExample.cs                   |   84 +
 .../Compute/TaskExample.cs                      |  141 +
 .../Datagrid/ContinuousQueryExample.cs          |  103 +
 .../Datagrid/CrossPlatformExample.cs            |  205 +
 .../Datagrid/DataStreamerExample.cs             |  102 +
 .../Datagrid/PutGetExample.cs                   |  219 ++
 .../Datagrid/QueryExample.cs                    |  227 ++
 .../Datagrid/StoreExample.cs                    |  115 +
 .../Datagrid/TransactionExample.cs              |  105 +
 .../Events/EventsExample.cs                     |  104 +
 .../Messaging/MessagingExample.cs               |  112 +
 .../Misc/LifecycleExample.cs                    |  109 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Services/IMapService.cs                     |   56 +
 .../Services/ServicesExample.cs                 |   77 +
 .../Apache.Ignite.ExamplesDll.csproj            |   82 +
 .../Apache.Ignite.ExamplesDll.snk               |  Bin 0 -> 596 bytes
 .../Apache.Ignite.ExamplesDll/Binary/Account.cs |   60 +
 .../Apache.Ignite.ExamplesDll/Binary/Address.cs |   81 +
 .../Binary/Employee.cs                          |   93 +
 .../Binary/EmployeeKey.cs                       |   86 +
 .../Binary/Organization.cs                      |   84 +
 .../Binary/OrganizationType.cs                  |   43 +
 .../Compute/AverageSalaryJob.cs                 |   66 +
 .../Compute/AverageSalaryTask.cs                |   85 +
 .../Compute/CharacterCountClosure.cs            |   43 +
 .../Compute/CharacterCountReducer.cs            |   51 +
 .../Datagrid/ContinuousQueryFilter.cs           |   50 +
 .../Datagrid/EmployeeStore.cs                   |  122 +
 .../Datagrid/EmployeeStorePredicate.cs          |   41 +
 .../Events/LocalListener.cs                     |   54 +
 .../Messaging/LocalListener.cs                  |   59 +
 .../Messaging/RemoteOrderedListener.cs          |   54 +
 .../Messaging/RemoteUnorderedListener.cs        |   54 +
 .../Messaging/Topic.cs                          |   28 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Services/MapService.cs                      |  119 +
 .../examples/Config/example-cache-query.xml     |  111 +
 .../examples/Config/example-cache-store.xml     |   59 +
 .../dotnet/examples/Config/example-cache.xml    |   80 +
 .../dotnet/examples/Config/example-compute.xml  |   70 +
 modules/platforms/dotnet/examples/README.txt    |   14 +
 modules/platforms/licenses/apache-2.0.txt       |  202 +
 .../org/apache/ignite/IgniteSpringBean.java     |    7 +
 modules/yardstick/config/ignite-base-config.xml |   37 +-
 .../cache/IgniteSqlQueryPutBenchmark.java       |    5 +
 .../yardstick/cache/model/Organization.java     |   19 +-
 .../ignite/yardstick/cache/model/Person.java    |   24 +-
 .../ignite/yardstick/cache/model/SampleKey.java |   16 +-
 .../yardstick/cache/model/SampleValue.java      |   16 +-
 parent/pom.xml                                  |   34 +-
 pom.xml                                         |   11 -
 1760 files changed, 173956 insertions(+), 140531 deletions(-)
----------------------------------------------------------------------



[05/50] [abbrv] ignite git commit: IGNITE-1968: Fixed missing serialization modes in Java.

Posted by sb...@apache.org.
IGNITE-1968: Fixed missing serialization modes in Java.


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

Branch: refs/heads/master
Commit: 3430586c6ec7b224018b668e0f9e7d8aed012c1d
Parents: 0d56b41
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Nov 20 14:19:01 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Nov 20 14:19:01 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/PortableClassDescriptor.java  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3430586c/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
index bc9d6f4..974f891 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableClassDescriptor.java
@@ -165,6 +165,14 @@ public class PortableClassDescriptor {
             mode = serializer != null ? BinaryWriteMode.PORTABLE : PortableUtils.mode(cls);
 
         switch (mode) {
+            case P_BYTE:
+            case P_BOOLEAN:
+            case P_SHORT:
+            case P_CHAR:
+            case P_INT:
+            case P_LONG:
+            case P_FLOAT:
+            case P_DOUBLE:
             case BYTE:
             case SHORT:
             case INT:
@@ -363,41 +371,49 @@ public class PortableClassDescriptor {
         writer.typeId(typeId);
 
         switch (mode) {
+            case P_BYTE:
             case BYTE:
                 writer.writeByteFieldPrimitive((byte) obj);
 
                 break;
 
+            case P_SHORT:
             case SHORT:
                 writer.writeShortFieldPrimitive((short)obj);
 
                 break;
 
+            case P_INT:
             case INT:
                 writer.writeIntFieldPrimitive((int) obj);
 
                 break;
 
+            case P_LONG:
             case LONG:
                 writer.writeLongFieldPrimitive((long) obj);
 
                 break;
 
+            case P_FLOAT:
             case FLOAT:
                 writer.writeFloatFieldPrimitive((float) obj);
 
                 break;
 
+            case P_DOUBLE:
             case DOUBLE:
                 writer.writeDoubleFieldPrimitive((double) obj);
 
                 break;
 
+            case P_CHAR:
             case CHAR:
                 writer.writeCharFieldPrimitive((char) obj);
 
                 break;
 
+            case P_BOOLEAN:
             case BOOLEAN:
                 writer.writeBooleanFieldPrimitive((boolean) obj);
 


[33/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
index 2de9c62..f03f24f 100644
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
+++ b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
@@ -18,7 +18,7 @@
 -->
 
 <!--
-    XML generated by Apache Ignite Schema Import utility: 02/05/2015
+    XML generated by Apache Ignite Schema Import utility: 11/20/2015
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:util="http://www.springframework.org/schema/util"
@@ -27,149 +27,301 @@
                            http://www.springframework.org/schema/beans/spring-beans.xsd
                            http://www.springframework.org/schema/util
                            http://www.springframework.org/schema/util/spring-util.xsd">
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="OBJECTS"/>
-        <property name="keyType" value="org.apache.ignite.schema.test.model.ObjectsKey"/>
-        <property name="valueType" value="org.apache.ignite.schema.test.model.Objects"/>
-        <property name="keyFields">
+    <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
+        <property name="types">
             <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="PK"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="pk"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="PK"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="pk"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="BOOLCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.BOOLEAN"/>
-                    </property>
-                    <property name="javaName" value="boolcol"/>
-                    <property name="javaType" value="java.lang.Boolean"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="BYTECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TINYINT"/>
-                    </property>
-                    <property name="javaName" value="bytecol"/>
-                    <property name="javaType" value="java.lang.Byte"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="SHORTCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.SMALLINT"/>
-                    </property>
-                    <property name="javaName" value="shortcol"/>
-                    <property name="javaType" value="java.lang.Short"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="INTCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="intcol"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="LONGCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.BIGINT"/>
-                    </property>
-                    <property name="javaName" value="longcol"/>
-                    <property name="javaType" value="java.lang.Long"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="FLOATCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.REAL"/>
-                    </property>
-                    <property name="javaName" value="floatcol"/>
-                    <property name="javaType" value="java.lang.Float"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="DOUBLECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+                    <property name="databaseSchema" value="PUBLIC"/>
+                    <property name="databaseTable" value="OBJECTS"/>
+                    <property name="keyType" value="org.apache.ignite.schema.test.model.ObjectsKey"/>
+                    <property name="valueType" value="org.apache.ignite.schema.test.model.Objects"/>
+                    <property name="keyFields">
+                        <list>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.INTEGER"/>
+                                </property>
+                                <property name="databaseFieldName" value="PK"/>
+                                <property name="javaFieldType" value="int"/>
+                                <property name="javaFieldName" value="pk"/>
+                            </bean>
+                        </list>
+                    </property>
+                    <property name="valueFields">
+                        <list>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.INTEGER"/>
+                                </property>
+                                <property name="databaseFieldName" value="PK"/>
+                                <property name="javaFieldType" value="int"/>
+                                <property name="javaFieldName" value="pk"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.BOOLEAN"/>
+                                </property>
+                                <property name="databaseFieldName" value="BOOLCOL"/>
+                                <property name="javaFieldType" value="java.lang.Boolean"/>
+                                <property name="javaFieldName" value="boolcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.TINYINT"/>
+                                </property>
+                                <property name="databaseFieldName" value="BYTECOL"/>
+                                <property name="javaFieldType" value="java.lang.Byte"/>
+                                <property name="javaFieldName" value="bytecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.SMALLINT"/>
+                                </property>
+                                <property name="databaseFieldName" value="SHORTCOL"/>
+                                <property name="javaFieldType" value="java.lang.Short"/>
+                                <property name="javaFieldName" value="shortcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.INTEGER"/>
+                                </property>
+                                <property name="databaseFieldName" value="INTCOL"/>
+                                <property name="javaFieldType" value="java.lang.Integer"/>
+                                <property name="javaFieldName" value="intcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.BIGINT"/>
+                                </property>
+                                <property name="databaseFieldName" value="LONGCOL"/>
+                                <property name="javaFieldType" value="java.lang.Long"/>
+                                <property name="javaFieldName" value="longcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.REAL"/>
+                                </property>
+                                <property name="databaseFieldName" value="FLOATCOL"/>
+                                <property name="javaFieldType" value="java.lang.Float"/>
+                                <property name="javaFieldName" value="floatcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
+                                </property>
+                                <property name="databaseFieldName" value="DOUBLECOL"/>
+                                <property name="javaFieldType" value="java.lang.Double"/>
+                                <property name="javaFieldName" value="doublecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
+                                </property>
+                                <property name="databaseFieldName" value="DOUBLECOL2"/>
+                                <property name="javaFieldType" value="java.lang.Double"/>
+                                <property name="javaFieldName" value="doublecol2"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DECIMAL"/>
+                                </property>
+                                <property name="databaseFieldName" value="BIGDECIMALCOL"/>
+                                <property name="javaFieldType" value="java.math.BigDecimal"/>
+                                <property name="javaFieldName" value="bigdecimalcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
+                                </property>
+                                <property name="databaseFieldName" value="STRCOL"/>
+                                <property name="javaFieldType" value="java.lang.String"/>
+                                <property name="javaFieldName" value="strcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DATE"/>
+                                </property>
+                                <property name="databaseFieldName" value="DATECOL"/>
+                                <property name="javaFieldType" value="java.sql.Date"/>
+                                <property name="javaFieldName" value="datecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.TIME"/>
+                                </property>
+                                <property name="databaseFieldName" value="TIMECOL"/>
+                                <property name="javaFieldType" value="java.sql.Time"/>
+                                <property name="javaFieldName" value="timecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                                </property>
+                                <property name="databaseFieldName" value="TSCOL"/>
+                                <property name="javaFieldType" value="java.sql.Timestamp"/>
+                                <property name="javaFieldName" value="tscol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.VARBINARY"/>
+                                </property>
+                                <property name="databaseFieldName" value="ARRCOL"/>
+                                <property name="javaFieldType" value="java.lang.Object"/>
+                                <property name="javaFieldName" value="arrcol"/>
+                            </bean>
+                        </list>
+                    </property>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+                    <property name="databaseSchema" value="PUBLIC"/>
+                    <property name="databaseTable" value="PRIMITIVES"/>
+                    <property name="keyType" value="org.apache.ignite.schema.test.model.PrimitivesKey"/>
+                    <property name="valueType" value="org.apache.ignite.schema.test.model.Primitives"/>
+                    <property name="keyFields">
+                        <list>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.INTEGER"/>
+                                </property>
+                                <property name="databaseFieldName" value="PK"/>
+                                <property name="javaFieldType" value="int"/>
+                                <property name="javaFieldName" value="pk"/>
+                            </bean>
+                        </list>
+                    </property>
+                    <property name="valueFields">
+                        <list>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.INTEGER"/>
+                                </property>
+                                <property name="databaseFieldName" value="PK"/>
+                                <property name="javaFieldType" value="int"/>
+                                <property name="javaFieldName" value="pk"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.BOOLEAN"/>
+                                </property>
+                                <property name="databaseFieldName" value="BOOLCOL"/>
+                                <property name="javaFieldType" value="boolean"/>
+                                <property name="javaFieldName" value="boolcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.TINYINT"/>
+                                </property>
+                                <property name="databaseFieldName" value="BYTECOL"/>
+                                <property name="javaFieldType" value="byte"/>
+                                <property name="javaFieldName" value="bytecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.SMALLINT"/>
+                                </property>
+                                <property name="databaseFieldName" value="SHORTCOL"/>
+                                <property name="javaFieldType" value="short"/>
+                                <property name="javaFieldName" value="shortcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.INTEGER"/>
+                                </property>
+                                <property name="databaseFieldName" value="INTCOL"/>
+                                <property name="javaFieldType" value="int"/>
+                                <property name="javaFieldName" value="intcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.BIGINT"/>
+                                </property>
+                                <property name="databaseFieldName" value="LONGCOL"/>
+                                <property name="javaFieldType" value="long"/>
+                                <property name="javaFieldName" value="longcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.REAL"/>
+                                </property>
+                                <property name="databaseFieldName" value="FLOATCOL"/>
+                                <property name="javaFieldType" value="float"/>
+                                <property name="javaFieldName" value="floatcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
+                                </property>
+                                <property name="databaseFieldName" value="DOUBLECOL"/>
+                                <property name="javaFieldType" value="double"/>
+                                <property name="javaFieldName" value="doublecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
+                                </property>
+                                <property name="databaseFieldName" value="DOUBLECOL2"/>
+                                <property name="javaFieldType" value="double"/>
+                                <property name="javaFieldName" value="doublecol2"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DECIMAL"/>
+                                </property>
+                                <property name="databaseFieldName" value="BIGDECIMALCOL"/>
+                                <property name="javaFieldType" value="java.math.BigDecimal"/>
+                                <property name="javaFieldName" value="bigdecimalcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
+                                </property>
+                                <property name="databaseFieldName" value="STRCOL"/>
+                                <property name="javaFieldType" value="java.lang.String"/>
+                                <property name="javaFieldName" value="strcol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.DATE"/>
+                                </property>
+                                <property name="databaseFieldName" value="DATECOL"/>
+                                <property name="javaFieldType" value="java.sql.Date"/>
+                                <property name="javaFieldName" value="datecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.TIME"/>
+                                </property>
+                                <property name="databaseFieldName" value="TIMECOL"/>
+                                <property name="javaFieldType" value="java.sql.Time"/>
+                                <property name="javaFieldName" value="timecol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                                </property>
+                                <property name="databaseFieldName" value="TSCOL"/>
+                                <property name="javaFieldType" value="java.sql.Timestamp"/>
+                                <property name="javaFieldName" value="tscol"/>
+                            </bean>
+                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                <property name="databaseFieldType">
+                                    <util:constant static-field="java.sql.Types.VARBINARY"/>
+                                </property>
+                                <property name="databaseFieldName" value="ARRCOL"/>
+                                <property name="javaFieldType" value="java.lang.Object"/>
+                                <property name="javaFieldName" value="arrcol"/>
+                            </bean>
+                        </list>
                     </property>
-                    <property name="javaName" value="doublecol"/>
-                    <property name="javaType" value="java.lang.Double"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="DOUBLECOL2"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DOUBLE"/>
-                    </property>
-                    <property name="javaName" value="doublecol2"/>
-                    <property name="javaType" value="java.lang.Double"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="BIGDECIMALCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DECIMAL"/>
-                    </property>
-                    <property name="javaName" value="bigdecimalcol"/>
-                    <property name="javaType" value="java.math.BigDecimal"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="STRCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                    <property name="javaName" value="strcol"/>
-                    <property name="javaType" value="java.lang.String"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="DATECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DATE"/>
-                    </property>
-                    <property name="javaName" value="datecol"/>
-                    <property name="javaType" value="java.sql.Date"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="TIMECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TIME"/>
-                    </property>
-                    <property name="javaName" value="timecol"/>
-                    <property name="javaType" value="java.sql.Time"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="TSCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
-                    </property>
-                    <property name="javaName" value="tscol"/>
-                    <property name="javaType" value="java.sql.Timestamp"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ARRCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARBINARY"/>
-                    </property>
-                    <property name="javaName" value="arrcol"/>
-                    <property name="javaType" value="java.lang.Object"/>
                 </bean>
             </list>
         </property>
-        <property name="queryFields">
-            <map>
+    </bean>
+    <bean class="org.apache.ignite.cache.QueryEntity">
+        <property name="keyType" value="org.apache.ignite.schema.test.model.ObjectsKey"/>
+        <property name="valueType" value="org.apache.ignite.schema.test.model.Objects"/>
+        <property name="fields">
+            <util:map map-class="java.util.LinkedHashMap">
                 <entry key="pk" value="int"/>
                 <entry key="boolcol" value="java.lang.Boolean"/>
                 <entry key="bytecol" value="java.lang.Byte"/>
@@ -185,157 +337,29 @@
                 <entry key="timecol" value="java.sql.Time"/>
                 <entry key="tscol" value="java.sql.Timestamp"/>
                 <entry key="arrcol" value="java.lang.Object"/>
-            </map>
-        </property>
-        <property name="ascendingFields">
-            <map>
-                <entry key="pk" value="int"/>
-            </map>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="PRIMITIVES"/>
-        <property name="keyType" value="org.apache.ignite.schema.test.model.PrimitivesKey"/>
-        <property name="valueType" value="org.apache.ignite.schema.test.model.Primitives"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="PK"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="pk"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-            </list>
+            </util:map>
         </property>
-        <property name="valueFields">
+        <property name="indexes">
             <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="PK"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="pk"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="BOOLCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.BOOLEAN"/>
-                    </property>
-                    <property name="javaName" value="boolcol"/>
-                    <property name="javaType" value="boolean"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="BYTECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TINYINT"/>
-                    </property>
-                    <property name="javaName" value="bytecol"/>
-                    <property name="javaType" value="byte"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="SHORTCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.SMALLINT"/>
-                    </property>
-                    <property name="javaName" value="shortcol"/>
-                    <property name="javaType" value="short"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="INTCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="intcol"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="LONGCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.BIGINT"/>
-                    </property>
-                    <property name="javaName" value="longcol"/>
-                    <property name="javaType" value="long"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="FLOATCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.REAL"/>
-                    </property>
-                    <property name="javaName" value="floatcol"/>
-                    <property name="javaType" value="float"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="DOUBLECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DOUBLE"/>
-                    </property>
-                    <property name="javaName" value="doublecol"/>
-                    <property name="javaType" value="double"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="DOUBLECOL2"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DOUBLE"/>
-                    </property>
-                    <property name="javaName" value="doublecol2"/>
-                    <property name="javaType" value="double"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="BIGDECIMALCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DECIMAL"/>
+                <bean class="org.apache.ignite.cache.QueryIndex">
+                    <property name="name" value="PRIMARY_KEY_C"/>
+                    <property name="indexType">
+                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
                     </property>
-                    <property name="javaName" value="bigdecimalcol"/>
-                    <property name="javaType" value="java.math.BigDecimal"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="STRCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                    <property name="javaName" value="strcol"/>
-                    <property name="javaType" value="java.lang.String"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="DATECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.DATE"/>
+                    <property name="fields">
+                        <map>
+                            <entry key="PK" value="true"/>
+                        </map>
                     </property>
-                    <property name="javaName" value="datecol"/>
-                    <property name="javaType" value="java.sql.Date"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="TIMECOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TIME"/>
-                    </property>
-                    <property name="javaName" value="timecol"/>
-                    <property name="javaType" value="java.sql.Time"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="TSCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
-                    </property>
-                    <property name="javaName" value="tscol"/>
-                    <property name="javaType" value="java.sql.Timestamp"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ARRCOL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARBINARY"/>
-                    </property>
-                    <property name="javaName" value="arrcol"/>
-                    <property name="javaType" value="java.lang.Object"/>
                 </bean>
             </list>
         </property>
-        <property name="queryFields">
-            <map>
+    </bean>
+    <bean class="org.apache.ignite.cache.QueryEntity">
+        <property name="keyType" value="org.apache.ignite.schema.test.model.PrimitivesKey"/>
+        <property name="valueType" value="org.apache.ignite.schema.test.model.Primitives"/>
+        <property name="fields">
+            <util:map map-class="java.util.LinkedHashMap">
                 <entry key="pk" value="int"/>
                 <entry key="boolcol" value="boolean"/>
                 <entry key="bytecol" value="byte"/>
@@ -351,12 +375,22 @@
                 <entry key="timecol" value="java.sql.Time"/>
                 <entry key="tscol" value="java.sql.Timestamp"/>
                 <entry key="arrcol" value="java.lang.Object"/>
-            </map>
+            </util:map>
         </property>
-        <property name="ascendingFields">
-            <map>
-                <entry key="pk" value="int"/>
-            </map>
+        <property name="indexes">
+            <list>
+                <bean class="org.apache.ignite.cache.QueryIndex">
+                    <property name="name" value="PRIMARY_KEY_D"/>
+                    <property name="indexType">
+                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
+                    </property>
+                    <property name="fields">
+                        <map>
+                            <entry key="PK" value="true"/>
+                        </map>
+                    </property>
+                </bean>
+            </list>
         </property>
     </bean>
 </beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/yardstick/config/ignite-store-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-store-config.xml b/modules/yardstick/config/ignite-store-config.xml
index 35b8e19..031de91 100644
--- a/modules/yardstick/config/ignite-store-config.xml
+++ b/modules/yardstick/config/ignite-store-config.xml
@@ -35,31 +35,31 @@
         <property name="user" value="sa"/>
     </bean>
 
-    <bean id="sampleTypeMetadata" class="org.apache.ignite.cache.CacheTypeMetadata">
+    <bean id="sampleTypeMetadata" class="org.apache.ignite.cache.store.jdbc.JdbcType">
         <property name="databaseTable" value="SAMPLE"/>
         <property name="keyType" value="org.apache.ignite.yardstick.cache.model.SampleKey"/>
-        <property name="valueType" value="org.apache.ignite.yardstick.cache.model.SampleValue"/>
         <property name="keyFields">
             <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldType">
                         <util:constant static-field="java.sql.Types.INTEGER"/>
                     </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="int"/>
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="javaFieldType" value="int"/>
+                    <property name="javaFieldName" value="id"/>
                 </bean>
             </list>
         </property>
+        <property name="valueType" value="org.apache.ignite.yardstick.cache.model.SampleValue"/>
         <property name="valueFields">
             <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="VALUE"/>
-                    <property name="databaseType">
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldType">
                         <util:constant static-field="java.sql.Types.INTEGER"/>
                     </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="int"/>
+                    <property name="databaseFieldName" value="VALUE"/>
+                    <property name="javaFieldType" value="int"/>
+                    <property name="javaFieldName" value="id"/>
                 </bean>
             </list>
         </property>
@@ -79,18 +79,19 @@
 
                     <property name="swapEnabled" value="false"/>
 
-                    <property name="typeMetadata">
-                        <list>
-                            <ref bean="sampleTypeMetadata"/>
-                        </list>
-                    </property>
-
                     <property name="cacheStoreFactory">
                         <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
                             <property name="dataSourceBean" value="storeDataSource"/>
                             <property name="dialect">
                                 <bean class="org.apache.ignite.cache.store.jdbc.dialect.H2Dialect"/>
                             </property>
+                            <property name="types">
+                                <list>
+                                    <bean parent="sampleTypeMetadata">
+                                        <property name="cacheName" value="atomic"/>
+                                    </bean>
+                                </list>
+                            </property>
                         </bean>
                     </property>
                 </bean>
@@ -104,18 +105,19 @@
 
                     <property name="swapEnabled" value="false"/>
 
-                    <property name="typeMetadata">
-                        <list>
-                            <ref bean="sampleTypeMetadata"/>
-                        </list>
-                    </property>
-
                     <property name="cacheStoreFactory">
                         <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
                             <property name="dataSourceBean" value="storeDataSource"/>
                             <property name="dialect">
                                 <bean class="org.apache.ignite.cache.store.jdbc.dialect.H2Dialect"/>
                             </property>
+                            <property name="types">
+                                <list>
+                                    <bean parent="sampleTypeMetadata">
+                                        <property name="cacheName" value="tx"/>
+                                    </bean>
+                                </list>
+                            </property>
                         </bean>
                     </property>
                 </bean>


[43/50] [abbrv] ignite git commit: Renaming.

Posted by sb...@apache.org.
Renaming.


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

Branch: refs/heads/master
Commit: aee7b759ff363fa9150097fd212b9f40724a8d15
Parents: 8050346
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Mon Nov 23 18:01:53 2015 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Mon Nov 23 18:01:53 2015 +0300

----------------------------------------------------------------------
 .../internal/GridEventConsumeHandler.java       |  6 +--
 .../internal/GridMessageListenHandler.java      |  6 +--
 .../continuous/CacheContinuousQueryHandler.java |  7 ++-
 .../continuous/GridContinuousHandler.java       |  6 +--
 .../continuous/GridContinuousProcessor.java     | 50 ++++++++------------
 ...ContinuousQueryFailoverAbstractSelfTest.java |  2 +-
 .../continuous/GridEventConsumeSelfTest.java    |  2 +-
 7 files changed, 35 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
index 3918976..1869d2e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
@@ -110,17 +110,17 @@ class GridEventConsumeHandler implements GridContinuousHandler {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForEvents() {
+    @Override public boolean isEvents() {
         return true;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForMessaging() {
+    @Override public boolean isMessaging() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForQuery() {
+    @Override public boolean isQuery() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
index aa837b8..6b51107 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
@@ -83,17 +83,17 @@ public class GridMessageListenHandler implements GridContinuousHandler {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForEvents() {
+    @Override public boolean isEvents() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForMessaging() {
+    @Override public boolean isMessaging() {
         return true;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForQuery() {
+    @Override public boolean isQuery() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index b69d4cd..030ab4a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -201,17 +201,17 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForEvents() {
+    @Override public boolean isEvents() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForMessaging() {
+    @Override public boolean isMessaging() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForQuery() {
+    @Override public boolean isQuery() {
         return true;
     }
 
@@ -848,7 +848,6 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler {
 
         /**
          * @param e Entry.
-         * @param topVer Topology version.
          * @return Continuous query entry.
          */
         private CacheContinuousQueryEntry skipEntry(CacheContinuousQueryEntry e) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
index d8698b3..3d6e266 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
@@ -130,17 +130,17 @@ public interface GridContinuousHandler extends Externalizable, Cloneable {
     /**
      * @return {@code True} if for events.
      */
-    public boolean isForEvents();
+    public boolean isEvents();
 
     /**
      * @return {@code True} if for messaging.
      */
-    public boolean isForMessaging();
+    public boolean isMessaging();
 
     /**
      * @return {@code True} if for continuous queries.
      */
-    public boolean isForQuery();
+    public boolean isQuery();
 
     /**
      * @return Cache name if this is a continuous query handler.

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index e218790..00f5e64 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -210,29 +210,25 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
                         if (msg.errs().isEmpty()) {
                             LocalRoutineInfo routine = locInfos.get(msg.routineId());
 
-                            if (routine != null && routine.handler().isForQuery()) {
-                                try {
-                                    Map<Integer, Long> cntrs = msg.updateCounters();
+                            // Update partition counters.
+                            if (routine != null && routine.handler().isQuery()) {
+                                Map<Integer, Long> cntrs = msg.updateCounters();
 
-                                    GridCacheAdapter<Object, Object> interCache =
-                                        ctx.cache().internalCache(routine.handler().cacheName());
+                                GridCacheAdapter<Object, Object> interCache =
+                                    ctx.cache().internalCache(routine.handler().cacheName());
 
-                                    if (interCache != null && cntrs != null && interCache.context() != null
-                                        && !interCache.isLocal() && !CU.clientNode(ctx.grid().localNode())) {
-                                        Map<Integer, Long> map = interCache.context().topology().updateCounters();
+                                if (interCache != null && cntrs != null && interCache.context() != null
+                                    && !interCache.isLocal() && !CU.clientNode(ctx.grid().localNode())) {
+                                    Map<Integer, Long> map = interCache.context().topology().updateCounters();
 
-                                        for (Map.Entry<Integer, Long> e : map.entrySet()) {
-                                            Long cntr0 = cntrs.get(e.getKey());
-                                            Long cntr1 = e.getValue();
+                                    for (Map.Entry<Integer, Long> e : map.entrySet()) {
+                                        Long cntr0 = cntrs.get(e.getKey());
+                                        Long cntr1 = e.getValue();
 
-                                            if (cntr0 == null || cntr1 > cntr0)
-                                                cntrs.put(e.getKey(), cntr1);
-                                        }
+                                        if (cntr0 == null || cntr1 > cntr0)
+                                            cntrs.put(e.getKey(), cntr1);
                                     }
                                 }
-                                catch (Exception e) {
-                                    U.warn(log, "Failed to load update counters.", e);
-                                }
 
                                 routine.handler().updateCounters(msg.updateCounters());
                             }
@@ -496,7 +492,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
             GridContinuousHandler hnd = rmtInfo.hnd;
 
-            if (hnd.isForQuery() && F.eq(ctx.name(), hnd.cacheName()) && rmtInfo.clearDelayedRegister()) {
+            if (hnd.isQuery() && F.eq(ctx.name(), hnd.cacheName()) && rmtInfo.clearDelayedRegister()) {
                 GridContinuousHandler.RegisterStatus status = hnd.register(rmtInfo.nodeId, routineId, this.ctx);
 
                 assert status != GridContinuousHandler.RegisterStatus.DELAYED;
@@ -518,7 +514,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
             GridContinuousHandler hnd = entry.getValue().hnd;
 
-            if (hnd.isForQuery() && F.eq(ctx.name(), hnd.cacheName()))
+            if (hnd.isQuery() && F.eq(ctx.name(), hnd.cacheName()))
                 it.remove();
         }
     }
@@ -888,16 +884,12 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
             }
         }
 
-        try {
-            if (hnd.isForQuery() && ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName()) != null) {
-                Map<Integer, Long> cntrs = ctx.cache().internalCache(hnd.cacheName())
-                    .context().topology().updateCounters();
+        // Load partition counters.
+        if (hnd.isQuery() && ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName()) != null) {
+            Map<Integer, Long> cntrs = ctx.cache().internalCache(hnd.cacheName())
+                .context().topology().updateCounters();
 
-                req.addUpdateCounters(cntrs);
-            }
-        }
-        catch (Exception e) {
-            U.warn(log, "Failed to load partition counters.", e);
+            req.addUpdateCounters(cntrs);
         }
 
         if (err != null)
@@ -1319,7 +1311,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
          * Marks info to be registered when cache is started.
          */
         public void markDelayedRegister() {
-            assert hnd.isForQuery();
+            assert hnd.isQuery();
 
             delayedRegister = true;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
index b311272..08e8adb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
@@ -1327,7 +1327,7 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
         for (Object info : infos.values()) {
             GridContinuousHandler hnd = GridTestUtils.getFieldValue(info, "hnd");
 
-            if (hnd.isForQuery() && hnd.cacheName() == null) {
+            if (hnd.isQuery() && hnd.cacheName() == null) {
                 backupQueue = GridTestUtils.getFieldValue(hnd, "backupQueue");
 
                 break;

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 8f28aef..d239ea8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -163,7 +163,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
         return F.view(U.<Map<UUID, LocalRoutineInfo>>field(proc, "locInfos").values(),
             new IgnitePredicate<LocalRoutineInfo>() {
                 @Override public boolean apply(LocalRoutineInfo info) {
-                    return info.handler().isForEvents();
+                    return info.handler().isEvents();
                 }
             });
     }


[04/50] [abbrv] ignite git commit: Merge branch 'ignite-1282' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1282

Posted by sb...@apache.org.
Merge branch 'ignite-1282' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1282


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

Branch: refs/heads/master
Commit: 6d4ecfde78f94dd52834306d14deeaec63a46359
Parents: 9b6adb2 0d56b41
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 14:04:57 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 14:04:57 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryWriterExImpl.java   | 101 ++++++++++++-------
 .../portable/PortableClassDescriptor.java       |  45 ++++-----
 .../ignite/internal/portable/PortableUtils.java |  32 +-----
 .../builder/BinaryObjectBuilderImpl.java        |   8 +-
 .../streams/PortableAbstractOutputStream.java   |   7 +-
 .../portable/streams/PortableOutputStream.java  |   7 ++
 .../memory/PlatformOutputStreamImpl.java        |   7 +-
 7 files changed, 107 insertions(+), 100 deletions(-)
----------------------------------------------------------------------



[12/50] [abbrv] ignite git commit: debugging slowdowns

Posted by sb...@apache.org.
debugging slowdowns


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

Branch: refs/heads/master
Commit: 5e6d0ffefb7d58cbc21bea651671d4de02abf622
Parents: 8e7e330
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Nov 20 19:03:40 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Nov 20 19:03:40 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtGetFuture.java |  24 +-
 .../distributed/dht/GridDhtLockFuture.java      |  78 +-
 .../colocated/GridDhtColocatedLockFuture.java   | 618 ++++++++--------
 .../distributed/near/GridNearGetFuture.java     |   2 -
 .../distributed/near/GridNearLockFuture.java    | 719 ++++++++++---------
 .../distributed/near/GridNearLockMapping.java   |   6 +-
 6 files changed, 748 insertions(+), 699 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5e6d0ffe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 7108da6..6b696b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.dht;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.UUID;
@@ -37,7 +38,6 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.GridLeanSet;
 import org.apache.ignite.internal.util.future.GridCompoundFuture;
 import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
@@ -83,7 +83,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
     private LinkedHashMap<KeyCacheObject, Boolean> keys;
 
     /** Reserved partitions. */
-    private Collection<GridDhtLocalPartition> parts = new GridLeanSet<>(5);
+    private Collection<GridDhtLocalPartition> parts = new HashSet<>();
 
     /** Future ID. */
     private IgniteUuid futId;
@@ -98,7 +98,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
     private IgniteTxLocalEx tx;
 
     /** Retries because ownership changed. */
-    private Collection<Integer> retries = new GridLeanSet<>();
+    private Collection<Integer> retries;
 
     /** Subject ID. */
     private UUID subjId;
@@ -174,7 +174,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
 
     /** {@inheritDoc} */
     @Override public Collection<Integer> invalidPartitions() {
-        return retries;
+        return retries == null ? Collections.<Integer>emptyList() : retries;
     }
 
     /**
@@ -210,8 +210,12 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
     private void map(final LinkedHashMap<KeyCacheObject, Boolean> keys) {
         GridDhtFuture<Object> fut = cctx.dht().dhtPreloader().request(keys.keySet(), topVer);
 
-        if (!F.isEmpty(fut.invalidPartitions()))
+        if (!F.isEmpty(fut.invalidPartitions())) {
+            if (retries == null)
+                retries = new HashSet<>();
+
             retries.addAll(fut.invalidPartitions());
+        }
 
         add(new GridEmbeddedFuture<>(
             new IgniteBiClosure<Object, Exception, Collection<GridCacheEntryInfo>>() {
@@ -229,9 +233,13 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
                     for (Map.Entry<KeyCacheObject, Boolean> key : keys.entrySet()) {
                         int part = cctx.affinity().partition(key.getKey());
 
-                        if (!retries.contains(part)) {
-                            if (!map(key.getKey(), parts))
+                        if (retries == null || !retries.contains(part)) {
+                            if (!map(key.getKey(), parts)) {
+                                if (retries == null)
+                                    retries = new HashSet<>();
+
                                 retries.add(part);
+                            }
                             else
                                 mappedKeys.put(key.getKey(), key.getValue());
                         }
@@ -441,4 +449,4 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
     private GridDhtCacheAdapter<K, V> cache() {
         return (GridDhtCacheAdapter<K, V>)cctx.cache();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e6d0ffe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index a7978c9..543acb0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -19,13 +19,14 @@ package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.UUID;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
@@ -51,8 +52,6 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.dr.GridDrType;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
-import org.apache.ignite.internal.util.GridConcurrentHashSet;
-import org.apache.ignite.internal.util.GridLeanSet;
 import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -63,7 +62,6 @@ import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.transactions.TransactionIsolation;
 import org.jetbrains.annotations.NotNull;
@@ -123,7 +121,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
     private boolean read;
 
     /** Error. */
-    private AtomicReference<Throwable> err = new AtomicReference<>(null);
+    private Throwable err;
 
     /** Timed out flag. */
     private volatile boolean timedOut;
@@ -142,19 +140,16 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
     private GridDhtTxLocalAdapter tx;
 
     /** All replies flag. */
-    private AtomicBoolean mapped = new AtomicBoolean(false);
+    private boolean mapped;
 
     /** */
-    private Collection<Integer> invalidParts = new GridLeanSet<>();
+    private Collection<Integer> invalidParts;
 
     /** Trackable flag. */
     private boolean trackable = true;
 
-    /** Mutex. */
-    private final Object mux = new Object();
-
     /** Pending locks. */
-    private final Collection<KeyCacheObject> pendingLocks = new GridConcurrentHashSet<>();
+    private final Collection<KeyCacheObject> pendingLocks;
 
     /** TTL for read operation. */
     private long accessTtl;
@@ -231,6 +226,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
         futId = IgniteUuid.randomUuid();
 
         entries = new ArrayList<>(cnt);
+        pendingLocks = U.newHashSet(cnt);
 
         if (log == null)
             log = U.logger(cctx.kernalContext(), logRef, GridDhtLockFuture.class);
@@ -244,7 +240,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
 
     /** {@inheritDoc} */
     @Override public Collection<Integer> invalidPartitions() {
-        return invalidParts;
+        return invalidParts == null ? Collections.<Integer>emptyList() : invalidParts;
     }
 
     /**
@@ -252,6 +248,9 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
      * @param invalidPart Partition to retry.
      */
     void addInvalidPartition(GridCacheContext<?, ?> cacheCtx, int invalidPart) {
+        if (invalidParts == null)
+            invalidParts = new HashSet<>();
+
         invalidParts.add(invalidPart);
 
         // Register invalid partitions with transaction.
@@ -287,10 +286,8 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
     /**
      * @return Entries.
      */
-    public Collection<GridDhtCacheEntry> entriesCopy() {
-        synchronized (mux) {
-            return new ArrayList<>(entries());
-        }
+    public synchronized Collection<GridDhtCacheEntry> entriesCopy() {
+        return new ArrayList<>(entries());
     }
 
     /**
@@ -403,12 +400,12 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
             return null;
         }
 
-        synchronized (mux) {
+        synchronized (this) {
             entries.add(c == null || c.reentry() ? null : entry);
-        }
 
-        if (c != null && !c.reentry())
-            pendingLocks.add(entry.key());
+            if (c != null && !c.reentry())
+                pendingLocks.add(entry.key());
+        }
 
         // Double check if the future has already timed out.
         if (timedOut) {
@@ -615,19 +612,17 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
     }
 
     /**
-     * @param e Error.
-     */
-    public void onError(GridDistributedLockCancelledException e) {
-        if (err.compareAndSet(null, e))
-            onComplete(false);
-    }
-
-    /**
      * @param t Error.
      */
     public void onError(Throwable t) {
-        if (err.compareAndSet(null, t))
-            onComplete(false);
+        synchronized (this) {
+            if (err != null)
+                return;
+
+            err = t;
+        }
+
+        onComplete(false);
     }
 
     /**
@@ -667,7 +662,9 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
             log.debug("Received onOwnerChanged() callback [entry=" + entry + ", owner=" + owner + "]");
 
         if (owner != null && owner.version().equals(lockVer)) {
-            pendingLocks.remove(entry.key());
+            synchronized (this) {
+                pendingLocks.remove(entry.key());
+            }
 
             if (checkLocks())
                 map(entries());
@@ -681,7 +678,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
     /**
      * @return {@code True} if locks have been acquired.
      */
-    private boolean checkLocks() {
+    private synchronized boolean checkLocks() {
         return pendingLocks.isEmpty();
     }
 
@@ -713,7 +710,10 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
         if (isDone() || (err == null && success && !checkLocks()))
             return false;
 
-        this.err.compareAndSet(null, err);
+        synchronized (this) {
+            if (this.err == null)
+                this.err = err;
+        }
 
         return onComplete(success);
     }
@@ -734,10 +734,10 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
         if (tx != null)
             cctx.tm().txContext(tx);
 
-        if (err.get() == null)
+        if (err == null)
             loadMissingFromStore();
 
-        if (super.onDone(success, err.get())) {
+        if (super.onDone(success, err)) {
             if (log.isDebugEnabled())
                 log.debug("Completing future: " + this);
 
@@ -778,11 +778,11 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
      * @param entries Entries.
      */
     private void map(Iterable<GridDhtCacheEntry> entries) {
-        if (!mapped.compareAndSet(false, true)) {
-            if (log.isDebugEnabled())
-                log.debug("Will not map DHT lock future (other thread is mapping): " + this);
+        synchronized (this) {
+            if (mapped)
+                return;
 
-            return;
+            mapped = true;
         }
 
         try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e6d0ffe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index 8245d88..7e17efe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -17,13 +17,13 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht.colocated;
 
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Deque;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.UUID;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
@@ -66,12 +66,10 @@ import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
-import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.transactions.TransactionIsolation;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
-import org.jsr166.ConcurrentLinkedDeque8;
 
 import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ;
 
@@ -113,7 +111,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
     private boolean retval;
 
     /** Error. */
-    private AtomicReference<Throwable> err = new AtomicReference<>(null);
+    private volatile Throwable err;
 
     /** Timeout object. */
     @GridToStringExclude
@@ -130,7 +128,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
     private GridNearTxLocal tx;
 
     /** Topology snapshot to operate on. */
-    private AtomicReference<AffinityTopologyVersion> topVer = new AtomicReference<>();
+    private volatile AffinityTopologyVersion topVer;
 
     /** Map of current values. */
     private Map<KeyCacheObject, IgniteBiTuple<GridCacheVersion, CacheObject>> valMap;
@@ -144,6 +142,9 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
     /** Skip store flag. */
     private final boolean skipStore;
 
+    /** */
+    private Deque<GridNearLockMapping> mappings;
+
     /**
      * @param cctx Registry.
      * @param keys Keys to lock.
@@ -196,7 +197,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
             cctx.time().addTimeoutObject(timeoutObj);
         }
 
-        valMap = new ConcurrentHashMap8<>(keys.size(), 1f);
+        valMap = new ConcurrentHashMap8<>();
     }
 
     /** {@inheritDoc} */
@@ -318,7 +319,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                     false,
                     null);
 
-                cand.topologyVersion(topVer.get());
+                cand.topologyVersion(topVer);
             }
         }
         else {
@@ -338,12 +339,12 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                     false,
                     null);
 
-                cand.topologyVersion(topVer.get());
+                cand.topologyVersion(topVer);
             }
             else
                 cand = cand.reenter();
 
-            cctx.mvcc().addExplicitLock(threadId, cand, topVer.get());
+            cctx.mvcc().addExplicitLock(threadId, cand, topVer);
         }
 
         return cand;
@@ -479,8 +480,9 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
     /**
      * @param t Error.
      */
-    private void onError(Throwable t) {
-        err.compareAndSet(null, t instanceof GridCacheLockTimeoutException ? null : t);
+    private synchronized void onError(Throwable t) {
+        if (err == null && !(t instanceof GridCacheLockTimeoutException))
+            err = t;
     }
 
     /** {@inheritDoc} */
@@ -499,7 +501,8 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
         if (isDone())
             return false;
 
-        this.err.compareAndSet(null, err instanceof GridCacheLockTimeoutException ? null : err);
+        if (err != null)
+            onError(err);
 
         if (err != null)
             success = false;
@@ -525,7 +528,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
         if (tx != null)
             cctx.tm().txContext(tx);
 
-        if (super.onDone(success, err.get())) {
+        if (super.onDone(success, err)) {
             if (log.isDebugEnabled())
                 log.debug("Completing future: " + this);
 
@@ -617,7 +620,10 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
             }
 
             // Continue mapping on the same topology version as it was before.
-            this.topVer.compareAndSet(null, topVer);
+            synchronized (this) {
+                if (this.topVer == null)
+                    this.topVer = topVer;
+            }
 
             map(keys, false, true);
 
@@ -666,13 +672,18 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                     if (tx != null)
                         tx.onRemap(topVer);
 
-                    this.topVer.set(topVer);
+                    synchronized (this) {
+                        this.topVer = topVer;
+                    }
                 }
                 else {
                     if (tx != null)
                         tx.topologyVersion(topVer);
 
-                    this.topVer.compareAndSet(null, topVer);
+                    synchronized (this) {
+                        if (this.topVer == null)
+                            this.topVer = topVer;
+                    }
                 }
 
                 map(keys, remap, false);
@@ -716,242 +727,256 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
      */
     private void map(Collection<KeyCacheObject> keys, boolean remap, boolean topLocked) {
         try {
-            AffinityTopologyVersion topVer = this.topVer.get();
+            map0(
+                keys,
+                remap,
+                topLocked);
+        }
+        catch (IgniteCheckedException ex) {
+            onDone(false, ex);
+        }
+    }
 
-            assert topVer != null;
+    private synchronized void map0(
+        Collection<KeyCacheObject> keys,
+        boolean remap,
+        boolean topLocked
+    ) throws IgniteCheckedException {
+        AffinityTopologyVersion topVer = this.topVer;
 
-            assert topVer.topologyVersion() > 0;
+        assert topVer != null;
 
-            if (CU.affinityNodes(cctx, topVer).isEmpty()) {
-                onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for cache " +
-                    "(all partition nodes left the grid): " + cctx.name()));
+        assert topVer.topologyVersion() > 0;
 
-                return;
-            }
+        if (CU.affinityNodes(cctx, topVer).isEmpty()) {
+            onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for cache " +
+                "(all partition nodes left the grid): " + cctx.name()));
 
-            boolean clientNode = cctx.kernalContext().clientNode();
+            return;
+        }
 
-            assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks()));
+        boolean clientNode = cctx.kernalContext().clientNode();
 
-            // First assume this node is primary for all keys passed in.
-            if (!clientNode && mapAsPrimary(keys, topVer))
-                return;
+        assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks()));
 
-            Deque<GridNearLockMapping> mappings = new ConcurrentLinkedDeque8<>();
+        // First assume this node is primary for all keys passed in.
+        if (!clientNode && mapAsPrimary(keys, topVer))
+            return;
 
-            // Assign keys to primary nodes.
-            GridNearLockMapping map = null;
+        mappings = new ArrayDeque<>();
 
-            for (KeyCacheObject key : keys) {
-                GridNearLockMapping updated = map(key, map, topVer);
+        // Assign keys to primary nodes.
+        GridNearLockMapping map = null;
 
-                // If new mapping was created, add to collection.
-                if (updated != map) {
-                    mappings.add(updated);
+        for (KeyCacheObject key : keys) {
+            GridNearLockMapping updated = map(key, map, topVer);
 
-                    if (tx != null && updated.node().isLocal())
-                        tx.colocatedLocallyMapped(true);
-                }
+            // If new mapping was created, add to collection.
+            if (updated != map) {
+                mappings.add(updated);
 
-                map = updated;
+                if (tx != null && updated.node().isLocal())
+                    tx.colocatedLocallyMapped(true);
             }
 
-            if (isDone()) {
-                if (log.isDebugEnabled())
-                    log.debug("Abandoning (re)map because future is done: " + this);
-
-                return;
-            }
+            map = updated;
+        }
 
+        if (isDone()) {
             if (log.isDebugEnabled())
-                log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
+                log.debug("Abandoning (re)map because future is done: " + this);
+
+            return;
+        }
 
-            boolean hasRmtNodes = false;
+        if (log.isDebugEnabled())
+            log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
 
-            boolean first = true;
+        boolean hasRmtNodes = false;
 
-            // Create mini futures.
-            for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
-                GridNearLockMapping mapping = iter.next();
+        boolean first = true;
 
-                ClusterNode node = mapping.node();
-                Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
+        // Create mini futures.
+        for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
+            GridNearLockMapping mapping = iter.next();
 
-                boolean loc = node.equals(cctx.localNode());
+            ClusterNode node = mapping.node();
+            Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
 
-                assert !mappedKeys.isEmpty();
+            boolean loc = node.equals(cctx.localNode());
 
-                GridNearLockRequest req = null;
+            assert !mappedKeys.isEmpty();
 
-                Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
+            GridNearLockRequest req = null;
 
-                for (KeyCacheObject key : mappedKeys) {
-                    IgniteTxKey txKey = cctx.txKey(key);
+            Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
 
-                    GridDistributedCacheEntry entry = null;
+            for (KeyCacheObject key : mappedKeys) {
+                IgniteTxKey txKey = cctx.txKey(key);
 
-                    if (tx != null) {
-                        IgniteTxEntry txEntry = tx.entry(txKey);
+                GridDistributedCacheEntry entry = null;
 
-                        if (txEntry != null) {
-                            entry = (GridDistributedCacheEntry)txEntry.cached();
+                if (tx != null) {
+                    IgniteTxEntry txEntry = tx.entry(txKey);
 
-                            if (entry != null && !(loc ^ entry.detached())) {
-                                entry = cctx.colocated().entryExx(key, topVer, true);
+                    if (txEntry != null) {
+                        entry = (GridDistributedCacheEntry)txEntry.cached();
 
-                                txEntry.cached(entry);
-                            }
+                        if (entry != null && !(loc ^ entry.detached())) {
+                            entry = cctx.colocated().entryExx(key, topVer, true);
+
+                            txEntry.cached(entry);
                         }
                     }
+                }
 
-                    boolean explicit;
+                boolean explicit;
 
-                    while (true) {
-                        try {
-                            if (entry == null)
-                                entry = cctx.colocated().entryExx(key, topVer, true);
+                while (true) {
+                    try {
+                        if (entry == null)
+                            entry = cctx.colocated().entryExx(key, topVer, true);
 
-                            if (!cctx.isAll(entry, filter)) {
-                                if (log.isDebugEnabled())
-                                    log.debug("Entry being locked did not pass filter (will not lock): " + entry);
+                        if (!cctx.isAll(entry, filter)) {
+                            if (log.isDebugEnabled())
+                                log.debug("Entry being locked did not pass filter (will not lock): " + entry);
 
-                                onComplete(false, false);
+                            onComplete(false, false);
 
-                                return;
-                            }
+                            return;
+                        }
 
-                            assert loc ^ entry.detached() : "Invalid entry [loc=" + loc + ", entry=" + entry + ']';
+                        assert loc ^ entry.detached() : "Invalid entry [loc=" + loc + ", entry=" + entry + ']';
 
-                            GridCacheMvccCandidate cand = addEntry(entry);
+                        GridCacheMvccCandidate cand = addEntry(entry);
 
-                            // Will either return value from dht cache or null if this is a miss.
-                            IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.detached() ? null :
-                                ((GridDhtCacheEntry)entry).versionedValue(topVer);
+                        // Will either return value from dht cache or null if this is a miss.
+                        IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.detached() ? null :
+                            ((GridDhtCacheEntry)entry).versionedValue(topVer);
 
-                            GridCacheVersion dhtVer = null;
+                        GridCacheVersion dhtVer = null;
 
-                            if (val != null) {
-                                dhtVer = val.get1();
+                        if (val != null) {
+                            dhtVer = val.get1();
 
-                                valMap.put(key, val);
-                            }
+                            valMap.put(key, val);
+                        }
 
-                            if (cand != null && !cand.reentry()) {
-                                if (req == null) {
-                                    boolean clientFirst = false;
-
-                                    if (first) {
-                                        clientFirst = clientNode &&
-                                            !topLocked &&
-                                            (tx == null || !tx.hasRemoteLocks());
-
-                                        first = false;
-                                    }
-
-                                    req = new GridNearLockRequest(
-                                        cctx.cacheId(),
-                                        topVer,
-                                        cctx.nodeId(),
-                                        threadId,
-                                        futId,
-                                        lockVer,
-                                        inTx(),
-                                        implicitTx(),
-                                        implicitSingleTx(),
-                                        read,
-                                        retval,
-                                        isolation(),
-                                        isInvalidate(),
-                                        timeout,
-                                        mappedKeys.size(),
-                                        inTx() ? tx.size() : mappedKeys.size(),
-                                        inTx() && tx.syncCommit(),
-                                        inTx() ? tx.subjectId() : null,
-                                        inTx() ? tx.taskNameHash() : 0,
-                                        read ? accessTtl : -1L,
-                                        skipStore,
-                                        clientFirst,
-                                        cctx.deploymentEnabled());
-
-                                    mapping.request(req);
-                                }
+                        if (cand != null && !cand.reentry()) {
+                            if (req == null) {
+                                boolean clientFirst = false;
 
-                                distributedKeys.add(key);
+                                if (first) {
+                                    clientFirst = clientNode &&
+                                        !topLocked &&
+                                        (tx == null || !tx.hasRemoteLocks());
 
-                                if (tx != null)
-                                    tx.addKeyMapping(txKey, mapping.node());
+                                    first = false;
+                                }
 
-                                req.addKeyBytes(
-                                    key,
+                                req = new GridNearLockRequest(
+                                    cctx.cacheId(),
+                                    topVer,
+                                    cctx.nodeId(),
+                                    threadId,
+                                    futId,
+                                    lockVer,
+                                    inTx(),
+                                    implicitTx(),
+                                    implicitSingleTx(),
+                                    read,
                                     retval,
-                                    dhtVer, // Include DHT version to match remote DHT entry.
-                                    cctx);
+                                    isolation(),
+                                    isInvalidate(),
+                                    timeout,
+                                    mappedKeys.size(),
+                                    inTx() ? tx.size() : mappedKeys.size(),
+                                    inTx() && tx.syncCommit(),
+                                    inTx() ? tx.subjectId() : null,
+                                    inTx() ? tx.taskNameHash() : 0,
+                                    read ? accessTtl : -1L,
+                                    skipStore,
+                                    clientFirst,
+                                    cctx.deploymentEnabled());
+
+                                mapping.request(req);
                             }
 
-                            explicit = inTx() && cand == null;
+                            distributedKeys.add(key);
 
-                            if (explicit)
+                            if (tx != null)
                                 tx.addKeyMapping(txKey, mapping.node());
 
-                            break;
+                            req.addKeyBytes(
+                                key,
+                                retval,
+                                dhtVer, // Include DHT version to match remote DHT entry.
+                                cctx);
                         }
-                        catch (GridCacheEntryRemovedException ignored) {
-                            if (log.isDebugEnabled())
-                                log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
 
-                            entry = null;
-                        }
-                    }
+                        explicit = inTx() && cand == null;
 
-                    // Mark mapping explicit lock flag.
-                    if (explicit) {
-                        boolean marked = tx != null && tx.markExplicit(node.id());
+                        if (explicit)
+                            tx.addKeyMapping(txKey, mapping.node());
 
-                        assert tx == null || marked;
+                        break;
                     }
-                }
-
-                if (inTx() && req != null)
-                    req.hasTransforms(tx.hasTransforms());
+                    catch (GridCacheEntryRemovedException ignored) {
+                        if (log.isDebugEnabled())
+                            log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
 
-                if (!distributedKeys.isEmpty()) {
-                    mapping.distributedKeys(distributedKeys);
-
-                    hasRmtNodes |= !mapping.node().isLocal();
+                        entry = null;
+                    }
                 }
-                else {
-                    assert mapping.request() == null;
 
-                    iter.remove();
+                // Mark mapping explicit lock flag.
+                if (explicit) {
+                    boolean marked = tx != null && tx.markExplicit(node.id());
+
+                    assert tx == null || marked;
                 }
             }
 
-            if (hasRmtNodes) {
-                trackable = true;
+            if (inTx() && req != null)
+                req.hasTransforms(tx.hasTransforms());
 
-                if (!remap && !cctx.mvcc().addFuture(this))
-                    throw new IllegalStateException("Duplicate future ID: " + this);
+            if (!distributedKeys.isEmpty()) {
+                mapping.distributedKeys(distributedKeys);
+
+                hasRmtNodes |= !mapping.node().isLocal();
             }
-            else
-                trackable = false;
+            else {
+                assert mapping.request() == null;
 
-            proceedMapping(mappings);
+                iter.remove();
+            }
         }
-        catch (IgniteCheckedException ex) {
-            onDone(false, ex);
+
+        if (hasRmtNodes) {
+            trackable = true;
+
+            if (!remap && !cctx.mvcc().addFuture(this))
+                throw new IllegalStateException("Duplicate future ID: " + this);
         }
+        else
+            trackable = false;
+
+        proceedMapping();
     }
 
     /**
      * Gets next near lock mapping and either acquires dht locks locally or sends near lock request to
      * remote primary node.
      *
-     * @param mappings Queue of mappings.
      * @throws IgniteCheckedException If mapping can not be completed.
      */
-    private void proceedMapping(final Deque<GridNearLockMapping> mappings)
+    private void proceedMapping()
         throws IgniteCheckedException {
-        GridNearLockMapping map = mappings.poll();
+        GridNearLockMapping map;
+
+        synchronized (this) {
+            map = mappings.poll();
+        }
 
         // If there are no more mappings to process, complete the future.
         if (map == null)
@@ -965,9 +990,9 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
             req.filter(filter, cctx);
 
         if (node.isLocal())
-            lockLocally(mappedKeys, req.topologyVersion(), mappings);
+            lockLocally(mappedKeys, req.topologyVersion());
         else {
-            final MiniFuture fut = new MiniFuture(node, mappedKeys, mappings);
+            final MiniFuture fut = new MiniFuture(node, mappedKeys);
 
             req.miniId(fut.futureId());
 
@@ -1016,15 +1041,12 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
 
     /**
      * Locks given keys directly through dht cache.
-     *
-     * @param keys Collection of keys.
+     *  @param keys Collection of keys.
      * @param topVer Topology version to lock on.
-     * @param mappings Optional collection of mappings to proceed locking.
      */
     private void lockLocally(
         final Collection<KeyCacheObject> keys,
-        AffinityTopologyVersion topVer,
-        @Nullable final Deque<GridNearLockMapping> mappings
+        AffinityTopologyVersion topVer
     ) {
         if (log.isDebugEnabled())
             log.debug("Before locally locking keys : " + keys);
@@ -1078,7 +1100,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                     try {
                         // Proceed and add new future (if any) before completing embedded future.
                         if (mappings != null)
-                            proceedMapping(mappings);
+                            proceedMapping();
                     }
                     catch (IgniteCheckedException ex) {
                         onError(ex);
@@ -1101,7 +1123,8 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
      * @return {@code True} if all keys were mapped locally, {@code false} if full mapping should be performed.
      * @throws IgniteCheckedException If key cannot be added to mapping.
      */
-    private boolean mapAsPrimary(Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer) throws IgniteCheckedException {
+    private boolean mapAsPrimary(Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer)
+        throws IgniteCheckedException {
         // Assign keys to primary nodes.
         Collection<KeyCacheObject> distributedKeys = new ArrayList<>(keys.size());
 
@@ -1137,7 +1160,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
                     tx.addKeyMapping(cctx.txKey(key), cctx.localNode());
             }
 
-            lockLocally(distributedKeys, topVer, null);
+            lockLocally(distributedKeys, topVer);
         }
 
         return true;
@@ -1221,7 +1244,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
         ClusterTopologyCheckedException topEx = new ClusterTopologyCheckedException("Failed to acquire lock for keys " +
             "(primary node left grid, retry transaction if possible) [keys=" + keys + ", node=" + nodeId + ']', nested);
 
-        topEx.retryReadyFuture(cctx.shared().nextAffinityReadyFuture(topVer.get()));
+        topEx.retryReadyFuture(cctx.shared().nextAffinityReadyFuture(topVer));
 
         return topEx;
     }
@@ -1275,19 +1298,18 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
         private Deque<GridNearLockMapping> mappings;
 
         /** */
-        private AtomicBoolean rcvRes = new AtomicBoolean(false);
+        private boolean rcvRes;
 
         /**
          * @param node Node.
          * @param keys Keys.
-         * @param mappings Mappings to proceed.
          */
-        MiniFuture(ClusterNode node,
-            Collection<KeyCacheObject> keys,
-            Deque<GridNearLockMapping> mappings) {
+        MiniFuture(
+            ClusterNode node,
+            Collection<KeyCacheObject> keys
+        ) {
             this.node = node;
             this.keys = keys;
-            this.mappings = mappings;
         }
 
         /**
@@ -1312,159 +1334,153 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
         }
 
         /**
-         * @param e Error.
-         */
-        void onResult(Throwable e) {
-            if (rcvRes.compareAndSet(false, true)) {
-                if (log.isDebugEnabled())
-                    log.debug("Failed to get future result [fut=" + this + ", err=" + e + ']');
-
-                // Fail.
-                onDone(e);
-            }
-            else
-                U.warn(log, "Received error after another result has been processed [fut=" +
-                    GridDhtColocatedLockFuture.this + ", mini=" + this + ']', e);
-        }
-
-        /**
          * @param e Node left exception.
          */
         void onResult(ClusterTopologyCheckedException e) {
             if (isDone())
                 return;
 
-            if (rcvRes.compareAndSet(false, true)) {
-                if (log.isDebugEnabled())
-                    log.debug("Remote node left grid while sending or waiting for reply (will fail): " + this);
+            synchronized (this) {
+                if (rcvRes)
+                    return;
+
+                rcvRes = true;
+            }
 
-                if (tx != null)
-                    tx.removeMapping(node.id());
+            if (log.isDebugEnabled())
+                log.debug("Remote node left grid while sending or waiting for reply (will fail): " + this);
 
-                // Primary node left the grid, so fail the future.
-                GridDhtColocatedLockFuture.this.onDone(newTopologyException(e, node.id()));
+            if (tx != null)
+                tx.removeMapping(node.id());
 
-                onDone(true);
-            }
+            // Primary node left the grid, so fail the future.
+            GridDhtColocatedLockFuture.this.onDone(newTopologyException(e, node.id()));
+
+            onDone(true);
         }
 
         /**
          * @param res Result callback.
          */
         void onResult(GridNearLockResponse res) {
-            if (rcvRes.compareAndSet(false, true)) {
-                if (res.error() != null) {
-                    if (log.isDebugEnabled())
-                        log.debug("Finishing mini future with an error due to error in response [miniFut=" + this +
-                            ", res=" + res + ']');
-
-                    // Fail.
-                    if (res.error() instanceof GridCacheLockTimeoutException)
-                        onDone(false);
-                    else
-                        onDone(res.error());
-
+            synchronized (this) {
+                if (rcvRes)
                     return;
-                }
 
-                if (res.clientRemapVersion() != null) {
-                    assert cctx.kernalContext().clientNode();
+                rcvRes = true;
+            }
 
-                    IgniteInternalFuture<?> affFut =
-                        cctx.shared().exchange().affinityReadyFuture(res.clientRemapVersion());
+            if (res.error() != null) {
+                if (log.isDebugEnabled())
+                    log.debug("Finishing mini future with an error due to error in response [miniFut=" + this +
+                        ", res=" + res + ']');
 
-                    if (affFut != null && !affFut.isDone()) {
-                        affFut.listen(new CI1<IgniteInternalFuture<?>>() {
-                            @Override public void apply(IgniteInternalFuture<?> fut) {
-                                try {
-                                    fut.get();
+                // Fail.
+                if (res.error() instanceof GridCacheLockTimeoutException)
+                    onDone(false);
+                else
+                    onDone(res.error());
 
-                                    remap();
-                                }
-                                catch (IgniteCheckedException e) {
-                                    onDone(e);
-                                }
-                                finally {
-                                    cctx.shared().txContextReset();
-                                }
-                            }
-                        });
-                    }
-                    else
-                        remap();
-                }
-                else  {
-                    int i = 0;
+                return;
+            }
 
-                    for (KeyCacheObject k : keys) {
-                        IgniteBiTuple<GridCacheVersion, CacheObject> oldValTup = valMap.get(k);
+            if (res.clientRemapVersion() != null) {
+                assert cctx.kernalContext().clientNode();
 
-                        CacheObject newVal = res.value(i);
+                IgniteInternalFuture<?> affFut =
+                    cctx.shared().exchange().affinityReadyFuture(res.clientRemapVersion());
 
-                        GridCacheVersion dhtVer = res.dhtVersion(i);
+                if (affFut != null && !affFut.isDone()) {
+                    affFut.listen(new CI1<IgniteInternalFuture<?>>() {
+                        @Override public void apply(IgniteInternalFuture<?> fut) {
+                            try {
+                                fut.get();
 
-                        if (newVal == null) {
-                            if (oldValTup != null) {
-                                if (oldValTup.get1().equals(dhtVer))
-                                    newVal = oldValTup.get2();
+                                remap();
+                            }
+                            catch (IgniteCheckedException e) {
+                                onDone(e);
+                            }
+                            finally {
+                                cctx.shared().txContextReset();
                             }
                         }
+                    });
+                }
+                else
+                    remap();
+            }
+            else  {
+                int i = 0;
 
-                        if (inTx()) {
-                            IgniteTxEntry txEntry = tx.entry(cctx.txKey(k));
+                for (KeyCacheObject k : keys) {
+                    IgniteBiTuple<GridCacheVersion, CacheObject> oldValTup = valMap.get(k);
 
-                            // In colocated cache we must receive responses only for detached entries.
-                            assert txEntry.cached().detached() : txEntry;
+                    CacheObject newVal = res.value(i);
 
-                            txEntry.markLocked();
+                    GridCacheVersion dhtVer = res.dhtVersion(i);
 
-                            GridDhtDetachedCacheEntry entry = (GridDhtDetachedCacheEntry)txEntry.cached();
+                    if (newVal == null) {
+                        if (oldValTup != null) {
+                            if (oldValTup.get1().equals(dhtVer))
+                                newVal = oldValTup.get2();
+                        }
+                    }
 
-                            if (res.dhtVersion(i) == null) {
-                                onDone(new IgniteCheckedException("Failed to receive DHT version from remote node " +
-                                    "(will fail the lock): " + res));
+                    if (inTx()) {
+                        IgniteTxEntry txEntry = tx.entry(cctx.txKey(k));
 
-                                return;
-                            }
+                        // In colocated cache we must receive responses only for detached entries.
+                        assert txEntry.cached().detached() : txEntry;
 
-                            // Set value to detached entry.
-                            entry.resetFromPrimary(newVal, dhtVer);
+                        txEntry.markLocked();
 
-                            tx.hasRemoteLocks(true);
+                        GridDhtDetachedCacheEntry entry = (GridDhtDetachedCacheEntry)txEntry.cached();
 
-                            if (log.isDebugEnabled())
-                                log.debug("Processed response for entry [res=" + res + ", entry=" + entry + ']');
-                        }
-                        else
-                            cctx.mvcc().markExplicitOwner(cctx.txKey(k), threadId);
-
-                        if (retval && cctx.events().isRecordable(EVT_CACHE_OBJECT_READ)) {
-                            cctx.events().addEvent(cctx.affinity().partition(k),
-                                k,
-                                tx,
-                                null,
-                                EVT_CACHE_OBJECT_READ,
-                                newVal,
-                                newVal != null,
-                                null,
-                                false,
-                                CU.subjectId(tx, cctx.shared()),
-                                null,
-                                tx == null ? null : tx.resolveTaskName());
+                        if (res.dhtVersion(i) == null) {
+                            onDone(new IgniteCheckedException("Failed to receive DHT version from remote node " +
+                                "(will fail the lock): " + res));
+
+                            return;
                         }
 
-                        i++;
-                    }
+                        // Set value to detached entry.
+                        entry.resetFromPrimary(newVal, dhtVer);
 
-                    try {
-                        proceedMapping(mappings);
+                        tx.hasRemoteLocks(true);
+
+                        if (log.isDebugEnabled())
+                            log.debug("Processed response for entry [res=" + res + ", entry=" + entry + ']');
                     }
-                    catch (IgniteCheckedException e) {
-                        onDone(e);
+                    else
+                        cctx.mvcc().markExplicitOwner(cctx.txKey(k), threadId);
+
+                    if (retval && cctx.events().isRecordable(EVT_CACHE_OBJECT_READ)) {
+                        cctx.events().addEvent(cctx.affinity().partition(k),
+                            k,
+                            tx,
+                            null,
+                            EVT_CACHE_OBJECT_READ,
+                            newVal,
+                            newVal != null,
+                            null,
+                            false,
+                            CU.subjectId(tx, cctx.shared()),
+                            null,
+                            tx == null ? null : tx.resolveTaskName());
                     }
 
-                    onDone(true);
+                    i++;
+                }
+
+                try {
+                    proceedMapping();
                 }
+                catch (IgniteCheckedException e) {
+                    onDone(e);
+                }
+
+                onDone(true);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e6d0ffe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index dfaa44e..4a030b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -21,7 +21,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicReference;
@@ -60,7 +59,6 @@ import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 


[47/50] [abbrv] ignite git commit: IGNITE-1983: .NET: Fixed continuous query tests.

Posted by sb...@apache.org.
IGNITE-1983: .NET: Fixed continuous query tests.


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

Branch: refs/heads/master
Commit: 512fe6b076331a3d187e1e0277f6bd565d8350bf
Parents: dcbfbd2
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Nov 24 11:52:06 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 24 11:52:06 2015 +0300

----------------------------------------------------------------------
 .../Continuous/ContinuousQueryAbstractTest.cs   | 29 ++++++++++++--------
 1 file changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/512fe6b0/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index 720483a..bdca918 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 // Put from local node.
                 int key1 = PrimaryKey(cache1);
                 cache1.GetAndPut(key1, Entry(key1));
-                CheckFilterSingle(key1, null, Entry(key1), !loc);
+                CheckFilterSingle(key1, null, Entry(key1));
                 CheckCallbackSingle(key1, null, Entry(key1));
 
                 // Put from remote node.
@@ -322,7 +322,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 }
                 else
                 {
-                    CheckFilterSingle(key2, null, Entry(key2), true);
+                    CheckFilterSingle(key2, null, Entry(key2));
                     CheckCallbackSingle(key2, null, Entry(key2));
                 }
 
@@ -330,7 +330,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
 
                 // Ignored put from local node.
                 cache1.GetAndPut(key1, Entry(key1 + 1));
-                CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1), !loc);
+                CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1));
                 CheckNoCallback(100);
 
                 // Ignored put from remote node.
@@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 if (loc)
                     CheckNoFilter(100);
                 else
-                    CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1), true);
+                    CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1));
 
                 CheckNoCallback(100);
             }
@@ -621,6 +621,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                     .Deserialize<BinarizableEntry>());
 
                 // 2. Remote put.
+                ClearEvents();
                 cache1.GetAndPut(PrimaryKey(cache2), Entry(2));
 
                 Assert.IsTrue(FILTER_EVTS.TryTake(out filterEvt, 500));
@@ -868,15 +869,10 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         /// <param name="expKey">Expected key.</param>
         /// <param name="expOldVal">Expected old value.</param>
         /// <param name="expVal">Expected value.</param>
-        /// <param name="hasBackup">Whether there is a backup node to check..</param>
-        private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, 
-            bool hasBackup = false)
+        private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
         {
             CheckFilterSingle(expKey, expOldVal, expVal, 1000);
-
-            // Filter is called on each cache node (primary and backup)
-            if (hasBackup)
-                CheckFilterSingle(expKey, expOldVal, expVal, 1000);
+            ClearEvents();
         }
 
         /// <summary>
@@ -895,6 +891,17 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
             Assert.AreEqual(expKey, evt.entry.Key);
             Assert.AreEqual(expOldVal, evt.entry.OldValue);
             Assert.AreEqual(expVal, evt.entry.Value);
+
+            ClearEvents();
+        }
+
+        /// <summary>
+        /// Clears the events collection.
+        /// </summary>
+        private static void ClearEvents()
+        {
+            while (FILTER_EVTS.Count > 0)
+                FILTER_EVTS.Take();
         }
 
         /// <summary>


[13/50] [abbrv] ignite git commit: IGNITE-1282 - Fixed deadlock caused by listener notification from the synchronized block.

Posted by sb...@apache.org.
IGNITE-1282 - Fixed deadlock caused by listener notification from the synchronized block.


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

Branch: refs/heads/master
Commit: 70746cbd17b4c7b4e3e218d288d82b8f4546b568
Parents: a28649e
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 19:11:35 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 19:11:35 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMvccManager.java  | 29 ++++++++++++--------
 .../cache/transactions/IgniteTxEntry.java       |  3 ++
 2 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/70746cbd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index 9104acb..2449df1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -141,18 +141,25 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
                 Collection<GridCacheMvccFuture<?>> futCol = mvccFuts.get(owner.version());
 
                 if (futCol != null) {
+                    ArrayList<GridCacheMvccFuture<?>> futColCp;
+
                     synchronized (futCol) {
-                        for (GridCacheMvccFuture<?> fut : futCol) {
-                            if (!fut.isDone()) {
-                                GridCacheMvccFuture<Boolean> mvccFut = (GridCacheMvccFuture<Boolean>)fut;
-
-                                // Since this method is called outside of entry synchronization,
-                                // we can safely invoke any method on the future.
-                                // Also note that we don't remove future here if it is done.
-                                // The removal is initiated from within future itself.
-                                if (mvccFut.onOwnerChanged(entry, owner))
-                                    return;
-                            }
+                        futColCp = new ArrayList<>(futCol.size());
+
+                        futColCp.addAll(futCol);
+                    }
+
+                    // Must invoke onOwnerChanged outside of synchronization block.
+                    for (GridCacheMvccFuture<?> fut : futColCp) {
+                        if (!fut.isDone()) {
+                            GridCacheMvccFuture<Boolean> mvccFut = (GridCacheMvccFuture<Boolean>)fut;
+
+                            // Since this method is called outside of entry synchronization,
+                            // we can safely invoke any method on the future.
+                            // Also note that we don't remove future here if it is done.
+                            // The removal is initiated from within future itself.
+                            if (mvccFut.onOwnerChanged(entry, owner))
+                                return;
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/70746cbd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index 7436375..fba1513 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -839,6 +839,9 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
         if (this.ctx == null) {
             GridCacheContext<?, ?> cacheCtx = ctx.cacheContext(cacheId);
 
+            assert cacheCtx != null : "Failed to find cache context [cacheId=" + cacheId +
+                ", readyTopVer=" + ctx.exchange().readyAffinityVersion() + ']';
+
             if (cacheCtx.isNear() && !near)
                 cacheCtx = cacheCtx.near().dht().context();
             else if (!cacheCtx.isNear() && near)


[21/50] [abbrv] ignite git commit: Merge branches 'ignite-1.5' and 'ignite-1.5-tx-futs-opts' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5-tx-futs-opts

Posted by sb...@apache.org.
Merge branches 'ignite-1.5' and 'ignite-1.5-tx-futs-opts' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5-tx-futs-opts


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

Branch: refs/heads/master
Commit: 1c8ff109555cdd639ac0c8742093c8faf683b835
Parents: d92de42 457ca6f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Sat Nov 21 17:51:07 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Sat Nov 21 17:51:07 2015 +0300

----------------------------------------------------------------------
 .../internal/direct/DirectByteBufferStream.java | 1499 -----------------
 .../internal/direct/DirectMessageReader.java    |  144 +-
 .../internal/direct/DirectMessageWriter.java    |   65 +-
 .../direct/DirectMessageWriterState.java        |  123 --
 .../direct/state/DirectMessageState.java        |   98 ++
 .../direct/state/DirectMessageStateItem.java    |   28 +
 .../direct/stream/DirectByteBufferStream.java   |  316 ++++
 .../stream/v1/DirectByteBufferStreamImplV1.java | 1360 +++++++++++++++
 .../stream/v2/DirectByteBufferStreamImplV2.java | 1583 ++++++++++++++++++
 .../managers/communication/GridIoManager.java   |   64 +-
 .../processors/cache/GridCacheUtils.java        |   39 +-
 .../CacheDataStructuresManager.java             |    2 +-
 .../GridFutureRemapTimeoutObject.java           |   72 -
 .../dht/GridPartitionedGetFuture.java           |   28 +-
 .../distributed/near/GridNearGetFuture.java     |   28 +-
 .../IgniteTxImplicitSingleStateImpl.java        |   29 +-
 .../IgniteTxRemoteSingleStateImpl.java          |   19 +-
 .../datastructures/DataStructuresProcessor.java |   47 +-
 .../GridAtomicCacheQueueImpl.java               |  126 +-
 .../GridCacheAtomicReferenceImpl.java           |   10 +-
 .../GridCacheCountDownLatchImpl.java            |   15 +-
 .../datastructures/GridCacheQueueAdapter.java   |   32 +-
 .../GridTransactionalCacheQueueImpl.java        |  193 +--
 .../ignite/internal/util/IgniteUtils.java       |   31 +
 .../internal/util/ipc/IpcToNioAdapter.java      |   14 +-
 .../util/nio/GridCommunicationClient.java       |    4 +-
 .../internal/util/nio/GridDirectParser.java     |   37 +-
 .../util/nio/GridNioMessageReaderFactory.java   |   37 +
 .../util/nio/GridNioMessageWriterFactory.java   |   35 +
 .../ignite/internal/util/nio/GridNioServer.java |   47 +-
 .../util/nio/GridShmemCommunicationClient.java  |   12 +-
 .../communication/MessageFormatter.java         |   15 +-
 .../extensions/communication/MessageReader.java |   26 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |    6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   80 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |    2 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   36 +
 .../apache/ignite/stream/StreamTransformer.java |    9 +-
 ...eAbstractDataStructuresFailoverSelfTest.java |  924 +++++-----
 ...rtitionedDataStructuresFailoverSelfTest.java |    7 +-
 ...edOffheapDataStructuresFailoverSelfTest.java |   12 +-
 ...eplicatedDataStructuresFailoverSelfTest.java |    5 -
 ...gniteAtomicLongChangingTopologySelfTest.java |    2 +
 ...GridTcpCommunicationSpiRecoverySelfTest.java |    4 +-
 ...lientDiscoverySpiFailureTimeoutSelfTest.java |    4 +-
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   90 +-
 .../testframework/GridSpiTestContext.java       |   12 +-
 .../testframework/junits/GridAbstractTest.java  |    6 +-
 .../spring/IgniteTransactionHolder.java         |   97 ++
 .../spring/SpringTransactionManager.java        |  522 ++++++
 .../transactions/spring/package-info.java       |   22 +
 .../test/java/config/spring-transactions.xml    |   36 +
 .../testsuites/IgniteSpringTestSuite.java       |    5 +-
 .../GridSpringTransactionManagerSelfTest.java   |  165 ++
 .../spring/GridSpringTransactionService.java    |   68 +
 parent/pom.xml                                  |    4 +-
 56 files changed, 5585 insertions(+), 2711 deletions(-)
----------------------------------------------------------------------



[16/50] [abbrv] ignite git commit: IGNITE-1282 - Fixed queries.

Posted by sb...@apache.org.
IGNITE-1282 - Fixed queries.


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

Branch: refs/heads/master
Commit: 80abb061b8a19b14a3d6e16f3c15de017d7df09a
Parents: f17dfd0
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 20:28:14 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 20:28:14 2015 +0300

----------------------------------------------------------------------
 .../processors/query/GridQueryProcessor.java    | 37 ++++++++++++++++----
 1 file changed, 31 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/80abb061/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 4d1145d..fbe54e0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -45,6 +45,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.binary.BinaryField;
+import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
@@ -1808,6 +1809,9 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         /** Binary field to speed-up deserialization. */
         private volatile BinaryField field;
 
+        /** Flag indicating that we already tried to take a field. */
+        private volatile boolean fieldTaken;
+
         /**
          * Constructor.
          *
@@ -1861,7 +1865,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
             BinaryObject obj0 = (BinaryObject)obj;
 
-            return binaryField(obj0).value(obj0);
+            return fieldValue(obj0);
         }
 
         /**
@@ -1873,18 +1877,39 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         private BinaryField binaryField(BinaryObject obj) {
             BinaryField field0 = field;
 
-            if (field0 == null)
-            {
-                field0 = obj.type().field(propName);
+            if (field0 == null && !fieldTaken) {
+                BinaryType type = obj.type();
+
+                if (type != null) {
+                    field0 = type.field(propName);
+
+                    assert field0 != null;
 
-                assert field0 != null;
+                    field = field0;
+                }
 
-                field = field0;
+                fieldTaken = true;
             }
 
             return field0;
         }
 
+        /**
+         * Gets field value for the given binary object.
+         *
+         * @param obj Binary object.
+         * @return Field value.
+         */
+        @SuppressWarnings("IfMayBeConditional")
+        private Object fieldValue(BinaryObject obj) {
+            BinaryField field = binaryField(obj);
+
+            if (field != null)
+                return field.value(obj);
+            else
+                return obj.field(propName);
+        }
+
         /** {@inheritDoc} */
         @Override public String name() {
             return alias;


[32/50] [abbrv] ignite git commit: IGNITE-1964 .NET: Enum type ID is written if it is registered as portable type.

Posted by sb...@apache.org.
IGNITE-1964 .NET: Enum type ID is written if it is registered as portable type.


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

Branch: refs/heads/master
Commit: 19d2dd0571ba1e92593da50b8b35b35e2fb7b6e7
Parents: 171bbee
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Mon Nov 23 12:08:26 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 23 12:08:26 2015 +0300

----------------------------------------------------------------------
 .../platform/PlatformComputeEchoTask.java       | 18 +++++++
 .../Binary/BinarySelfTest.cs                    | 35 ++++++++++++++
 .../Compute/ComputeApiTest.cs                   | 51 +++++++++++++++-----
 .../Impl/Binary/BinarySystemHandlers.cs         |  2 +-
 .../Impl/Binary/BinaryUtils.cs                  | 36 ++++++++++----
 .../Impl/Binary/BinaryWriter.cs                 | 32 +++++++-----
 6 files changed, 140 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java
index fe4e01c..c464945 100644
--- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java
+++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java
@@ -17,13 +17,17 @@
 
 package org.apache.ignite.platform;
 
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
+import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.compute.ComputeJob;
 import org.apache.ignite.compute.ComputeJobAdapter;
 import org.apache.ignite.compute.ComputeJobResult;
 import org.apache.ignite.compute.ComputeTaskAdapter;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.resources.IgniteInstanceResource;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Collections;
@@ -88,6 +92,9 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter<Integer, Object>
     /** Type: enum array. */
     private static final int TYPE_ENUM_ARRAY = 17;
 
+    /** Type: enum array. */
+    private static final int TYPE_ENUM_FIELD = 18;
+
     /** {@inheritDoc} */
     @Nullable @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
         @Nullable Integer arg) {
@@ -106,6 +113,10 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter<Integer, Object>
         /** Type. */
         private Integer type;
 
+        /** Ignite. */
+        @IgniteInstanceResource
+        private Ignite ignite;
+
         /**
          * Constructor.
          *
@@ -180,6 +191,13 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter<Integer, Object>
                         PlatformComputeEnum.FOO
                     };
 
+                case TYPE_ENUM_FIELD:
+                    IgniteCache<Integer, BinaryObject> cache = ignite.cache(null).withKeepBinary();
+                    BinaryObject obj = cache.get(TYPE_ENUM_FIELD);
+                    PlatformComputeEnum val = obj.field("interopEnum");
+
+                    return val;
+
                 default:
                     throw new IgniteException("Unknown type: " + type);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
index 102afd1..f7455be 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
@@ -486,6 +486,23 @@ namespace Apache.Ignite.Core.Tests.Binary
             Assert.AreEqual(_marsh.Unmarshal<TestEnum>(_marsh.Marshal(val)), val);
         }
 
+        /// <summary>
+        /// Tests the write of registered enum.
+        /// </summary>
+        [Test]
+        public void TestWriteEnumRegistered()
+        {
+            var marsh =
+                new Marshaller(new BinaryConfiguration
+                {
+                    TypeConfigurations = new[] { new BinaryTypeConfiguration(typeof(TestEnum)) }
+                });
+
+            TestEnum val = TestEnum.Val1;
+
+            Assert.AreEqual(marsh.Unmarshal<TestEnum>(marsh.Marshal(val)), val);
+        }
+
         /**
         * <summary>Check write of enum.</summary>
         */
@@ -497,6 +514,24 @@ namespace Apache.Ignite.Core.Tests.Binary
 
             Assert.AreEqual(vals, newVals);
         }
+
+        /// <summary>
+        /// Tests the write of registered enum array.
+        /// </summary>
+        [Test]
+        public void TestWriteEnumArrayRegistered()
+        {
+            var marsh =
+                new Marshaller(new BinaryConfiguration
+                {
+                    TypeConfigurations = new[] { new BinaryTypeConfiguration(typeof(TestEnum)) }
+                });
+
+            TestEnum[] vals = { TestEnum.Val2, TestEnum.Val3 };
+            TestEnum[] newVals = marsh.Unmarshal<TestEnum[]>(marsh.Marshal(vals));
+
+            Assert.AreEqual(vals, newVals);
+        }
         
         /// <summary>
         /// Test object with dates.

http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
index 68616ab..1e999e3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
@@ -105,6 +105,9 @@ namespace Apache.Ignite.Core.Tests.Compute
         /** Type: enum array. */
         private const int EchoTypeEnumArray = 17;
 
+        /** Type: enum field. */
+        private const int EchoTypeEnumField = 18;
+
         /** First node. */
         private IIgnite _grid1;
 
@@ -861,9 +864,9 @@ namespace Apache.Ignite.Core.Tests.Compute
         [Test]
         public void TestEchoTaskEnum()
         {
-            var res = _grid1.GetCompute().ExecuteJavaTask<InteropComputeEnum>(EchoTask, EchoTypeEnum);
+            var res = _grid1.GetCompute().ExecuteJavaTask<PlatformComputeEnum>(EchoTask, EchoTypeEnum);
 
-            Assert.AreEqual(InteropComputeEnum.Bar, res);
+            Assert.AreEqual(PlatformComputeEnum.Bar, res);
         }
 
         /// <summary>
@@ -872,17 +875,34 @@ namespace Apache.Ignite.Core.Tests.Compute
         [Test]
         public void TestEchoTaskEnumArray()
         {
-            var res = _grid1.GetCompute().ExecuteJavaTask<InteropComputeEnum[]>(EchoTask, EchoTypeEnumArray);
+            var res = _grid1.GetCompute().ExecuteJavaTask<PlatformComputeEnum[]>(EchoTask, EchoTypeEnumArray);
 
             Assert.AreEqual(new[]
             {
-                InteropComputeEnum.Bar,
-                InteropComputeEnum.Baz,
-                InteropComputeEnum.Foo
+                PlatformComputeEnum.Bar,
+                PlatformComputeEnum.Baz,
+                PlatformComputeEnum.Foo
             }, res);
         }
 
         /// <summary>
+        /// Tests the echo task reading enum from a binary object field.
+        /// Ensures that Java can understand enums written by .NET.
+        /// </summary>
+        [Test]
+        public void TestEchoTaskEnumField()
+        {
+            var enumVal = PlatformComputeEnum.Baz;
+
+            _grid1.GetCache<int, InteropComputeEnumFieldTest>(null)
+                .Put(EchoTypeEnumField, new InteropComputeEnumFieldTest {InteropEnum = enumVal});
+
+            var res = _grid1.GetCompute().ExecuteJavaTask<PlatformComputeEnum>(EchoTask, EchoTypeEnumField);
+
+            Assert.AreEqual(enumVal, res);
+        }
+
+        /// <summary>
         /// Test for binary argument in Java.
         /// </summary>
         [Test]
@@ -1107,11 +1127,15 @@ namespace Apache.Ignite.Core.Tests.Compute
 
             BinaryConfiguration portCfg = new BinaryConfiguration();
 
-            ICollection<BinaryTypeConfiguration> portTypeCfgs = new List<BinaryTypeConfiguration>();
+            var portTypeCfgs = new List<BinaryTypeConfiguration>
+            {
+                new BinaryTypeConfiguration(typeof (PlatformComputeBinarizable)),
+                new BinaryTypeConfiguration(typeof (PlatformComputeNetBinarizable)),
+                new BinaryTypeConfiguration(JavaBinaryCls),
+                new BinaryTypeConfiguration(typeof(PlatformComputeEnum)),
+                new BinaryTypeConfiguration(typeof(InteropComputeEnumFieldTest))
+            };
 
-            portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(PlatformComputeBinarizable)));
-            portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(PlatformComputeNetBinarizable)));
-            portTypeCfgs.Add(new BinaryTypeConfiguration(JavaBinaryCls));
 
             portCfg.TypeConfigurations = portTypeCfgs;
 
@@ -1294,10 +1318,15 @@ namespace Apache.Ignite.Core.Tests.Compute
         }
     }
 
-    public enum InteropComputeEnum
+    public enum PlatformComputeEnum
     {
         Foo,
         Bar,
         Baz
     }
+
+    public class InteropComputeEnumFieldTest
+    {
+        public PlatformComputeEnum InteropEnum { get; set; }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
index 2c10d6a..b49c29d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs
@@ -631,7 +631,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             ctx.Stream.WriteByte(BinaryUtils.TypeEnum);
 
-            BinaryUtils.WriteEnum(ctx.Stream, (Enum)obj);
+            BinaryUtils.WriteEnum(ctx, obj);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
index a387066..1aed03f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
@@ -1001,11 +1001,14 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// </summary>
         /// <param name="val">Array.</param>
         /// <param name="ctx">Write context.</param>
-        public static void WriteArray(Array val, BinaryWriter ctx)
+        /// <param name="elementType">Type of the array element.</param>
+        public static void WriteArray(Array val, BinaryWriter ctx, int elementType = ObjTypeId)
         {
+            Debug.Assert(val != null && ctx != null);
+
             IBinaryStream stream = ctx.Stream;
 
-            stream.WriteInt(ObjTypeId);
+            stream.WriteInt(elementType);
 
             stream.WriteInt(val.Length);
 
@@ -1291,18 +1294,31 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// <summary>
         /// Write enum.
         /// </summary>
-        /// <param name="stream">Stream.</param>
+        /// <param name="writer">Writer.</param>
         /// <param name="val">Value.</param>
-        public static void WriteEnum(IBinaryStream stream, Enum val)
+        public static void WriteEnum<T>(BinaryWriter writer, T val)
+        {
+            writer.WriteInt(GetEnumTypeId(val.GetType(), writer.Marshaller));
+            writer.WriteInt(TypeCaster<int>.Cast(val));
+        }
+
+        /// <summary>
+        /// Gets the enum type identifier.
+        /// </summary>
+        /// <param name="enumType">The enum type.</param>
+        /// <param name="marshaller">The marshaller.</param>
+        /// <returns>Enum type id.</returns>
+        public static int GetEnumTypeId(Type enumType, Marshaller marshaller)
         {
-            if (Enum.GetUnderlyingType(val.GetType()) == TypInt)
+            if (Enum.GetUnderlyingType(enumType) == TypInt)
             {
-                stream.WriteInt(ObjTypeId);
-                stream.WriteInt((int) (object) val);
+                var desc = marshaller.GetDescriptor(enumType);
+
+                return desc == null ? ObjTypeId : desc.TypeId;
             }
-            else
-                throw new BinaryObjectException("Only Int32 underlying type is supported for enums: " +
-                    val.GetType().Name);
+
+            throw new BinaryObjectException("Only Int32 underlying type is supported for enums: " +
+                enumType.Name);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/19d2dd05/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
index e09a7f4..c00dad6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs
@@ -25,6 +25,7 @@ namespace Apache.Ignite.Core.Impl.Binary
     using Apache.Ignite.Core.Impl.Binary.IO;
     using Apache.Ignite.Core.Impl.Binary.Metadata;
     using Apache.Ignite.Core.Impl.Binary.Structure;
+    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Binary writer implementation.
@@ -792,8 +793,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             WriteFieldId(fieldName, BinaryUtils.TypeEnum);
 
-            _stream.WriteByte(BinaryUtils.TypeEnum);
-            BinaryUtils.WriteEnum(_stream, (Enum)(object)val);
+            WriteEnum(val);
         }
 
         /// <summary>
@@ -804,7 +804,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         public void WriteEnum<T>(T val)
         {
             _stream.WriteByte(BinaryUtils.TypeEnum);
-            BinaryUtils.WriteEnum(_stream, (Enum)(object)val);
+            BinaryUtils.WriteEnum(this, val);
         }
 
         /// <summary>
@@ -820,10 +820,7 @@ namespace Apache.Ignite.Core.Impl.Binary
             if (val == null)
                 WriteNullField();
             else
-            {
-                _stream.WriteByte(BinaryUtils.TypeArrayEnum);
-                BinaryUtils.WriteArray(val, this);
-            }
+                WriteEnumArray0(val);
         }
 
         /// <summary>
@@ -836,10 +833,21 @@ namespace Apache.Ignite.Core.Impl.Binary
             if (val == null)
                 WriteNullRawField();
             else
-            {
-                _stream.WriteByte(BinaryUtils.TypeArrayEnum);
-                BinaryUtils.WriteArray(val, this);
-            }
+                WriteEnumArray0(val);
+        }
+
+        /// <summary>
+        /// Writes the enum array.
+        /// </summary>
+        /// <param name="val">The value.</param>
+        private void WriteEnumArray0<T>(T[] val)
+        {
+            _stream.WriteByte(BinaryUtils.TypeArrayEnum);
+
+            // typeof(T) can yield wrong results (string[] is object[], for example)
+            var elementType = val.GetType().GetElementType();  
+
+            BinaryUtils.WriteArray(val, this, BinaryUtils.GetEnumTypeId(elementType, Marshaller));
         }
 
         /// <summary>
@@ -1048,7 +1056,7 @@ namespace Apache.Ignite.Core.Impl.Binary
                 return;
 
             // Suppose that we faced normal object and perform descriptor lookup.
-            IBinaryTypeDescriptor desc = _marsh.GetDescriptor(type);
+            IBinaryTypeDescriptor desc = type.IsEnum ? null : _marsh.GetDescriptor(type);
 
             if (desc != null)
             {


[11/50] [abbrv] ignite git commit: debugging slowdowns

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5e6d0ffe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 76f2fbe..6f92204 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -17,13 +17,14 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.near;
 
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Queue;
 import java.util.UUID;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
@@ -57,17 +58,14 @@ import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.C2;
 import org.apache.ignite.internal.util.typedef.CI1;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
-import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.transactions.TransactionIsolation;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
-import org.jsr166.ConcurrentLinkedDeque8;
 
 import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ;
 
@@ -109,7 +107,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
     private boolean retval;
 
     /** Error. */
-    private AtomicReference<Throwable> err = new AtomicReference<>(null);
+    private volatile Throwable err;
 
     /** Timed out flag. */
     private volatile boolean timedOut;
@@ -129,8 +127,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
     private GridNearTxLocal tx;
 
     /** Topology snapshot to operate on. */
-    private AtomicReference<AffinityTopologyVersion> topVer =
-        new AtomicReference<>();
+    private volatile AffinityTopologyVersion topVer;
 
     /** Map of current values. */
     private Map<KeyCacheObject, IgniteBiTuple<GridCacheVersion, CacheObject>> valMap;
@@ -138,9 +135,6 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
     /** Trackable flag. */
     private boolean trackable = true;
 
-    /** Mutex. */
-    private final Object mux = new Object();
-
     /** Keys locked so far. */
     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
     @GridToStringExclude
@@ -152,6 +146,10 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
     /** Skip store flag. */
     private final boolean skipStore;
 
+    /** Mappings to proceed. */
+    @GridToStringExclude
+    private Queue<GridNearLockMapping> mappings;
+
     /**
      * @param cctx Registry.
      * @param keys Keys to lock.
@@ -206,7 +204,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
             cctx.time().addTimeoutObject(timeoutObj);
         }
 
-        valMap = new ConcurrentHashMap8<>(keys.size(), 1f);
+        valMap = new ConcurrentHashMap8<>();
     }
 
     /** {@inheritDoc} */
@@ -217,10 +215,8 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
     /**
      * @return Entries.
      */
-    public List<GridDistributedCacheEntry> entriesCopy() {
-        synchronized (mux) {
-            return new ArrayList<>(entries);
-        }
+    public synchronized List<GridDistributedCacheEntry> entriesCopy() {
+        return new ArrayList<>(entries);
     }
 
     /**
@@ -313,6 +309,8 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         GridNearCacheEntry entry,
         UUID dhtNodeId
     ) throws GridCacheEntryRemovedException {
+        assert Thread.holdsLock(this);
+
         // Check if lock acquisition is timed out.
         if (timedOut)
             return null;
@@ -335,9 +333,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
             txEntry.cached(entry);
         }
 
-        synchronized (mux) {
-            entries.add(entry);
-        }
+        entries.add(entry);
 
         if (c == null && timeout < 0) {
             if (log.isDebugEnabled())
@@ -525,7 +521,10 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
      * @param t Error.
      */
     private void onError(Throwable t) {
-        err.compareAndSet(null, t instanceof GridCacheLockTimeoutException ? null : t);
+        synchronized (this) {
+            if (err == null)
+                err = t;
+        }
     }
 
     /**
@@ -572,35 +571,39 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
      */
     private boolean checkLocks() {
         if (!isDone() && initialized() && !hasPending()) {
-            for (int i = 0; i < entries.size(); i++) {
-                while (true) {
-                    GridCacheEntryEx cached = entries.get(i);
+            synchronized (this) {
+                for (int i = 0; i < entries.size(); i++) {
+                    while (true) {
+                        GridCacheEntryEx cached = entries.get(i);
 
-                    try {
-                        if (!locked(cached)) {
-                            if (log.isDebugEnabled())
-                                log.debug("Lock is still not acquired for entry (will keep waiting) [entry=" +
-                                    cached + ", fut=" + this + ']');
+                        try {
+                            if (!locked(cached)) {
+                                if (log.isDebugEnabled())
+                                    log.debug("Lock is still not acquired for entry (will keep waiting) [entry=" +
+                                        cached + ", fut=" + this + ']');
 
-                            return false;
-                        }
+                                return false;
+                            }
 
-                        break;
-                    }
-                    // Possible in concurrent cases, when owner is changed after locks
-                    // have been released or cancelled.
-                    catch (GridCacheEntryRemovedException ignore) {
-                        if (log.isDebugEnabled())
-                            log.debug("Got removed entry in onOwnerChanged method (will retry): " + cached);
+                            break;
+                        }
+                        // Possible in concurrent cases, when owner is changed after locks
+                        // have been released or cancelled.
+                        catch (GridCacheEntryRemovedException ignore) {
+                            if (log.isDebugEnabled())
+                                log.debug("Got removed entry in onOwnerChanged method (will retry): " + cached);
 
-                        // Replace old entry with new one.
-                        entries.set(i, (GridDistributedCacheEntry)cctx.cache().entryEx(cached.key()));
+                            // Replace old entry with new one.
+                            entries.set(
+                                i,
+                                (GridDistributedCacheEntry)cctx.cache().entryEx(cached.key()));
+                        }
                     }
                 }
-            }
 
-            if (log.isDebugEnabled())
-                log.debug("Local lock acquired for entries [fut=" + this + ", entries=" + entries + "]");
+                if (log.isDebugEnabled())
+                    log.debug("Local lock acquired for entries [fut=" + this + ", entries=" + entries + "]");
+            }
 
             onComplete(true, true);
 
@@ -627,7 +630,8 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         if (isDone() || (err == null && success && !checkLocks()))
             return false;
 
-        this.err.compareAndSet(null, err instanceof GridCacheLockTimeoutException ? null : err);
+        if (err != null && !(err instanceof GridCacheLockTimeoutException))
+            onError(err);
 
         if (err != null)
             success = false;
@@ -653,7 +657,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         if (tx != null)
             cctx.tm().txContext(tx);
 
-        if (super.onDone(success, err.get())) {
+        if (super.onDone(success, err)) {
             if (log.isDebugEnabled())
                 log.debug("Completing future: " + this);
 
@@ -730,7 +734,8 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
             }
 
             // Continue mapping on the same topology version as it was before.
-            this.topVer.compareAndSet(null, topVer);
+            if (this.topVer == null)
+                this.topVer = topVer;
 
             map(keys, false, true);
 
@@ -749,7 +754,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
      *
      * @param remap Remap flag.
      */
-    void mapOnTopology(final boolean remap) {
+    synchronized void mapOnTopology(final boolean remap) {
         // We must acquire topology snapshot from the topology version future.
         cctx.topology().readLock();
 
@@ -778,13 +783,14 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
                     if (tx != null)
                         tx.onRemap(topVer);
 
-                    this.topVer.set(topVer);
+                    this.topVer = topVer;
                 }
                 else {
                     if (tx != null)
                         tx.topologyVersion(topVer);
 
-                    this.topVer.compareAndSet(null, topVer);
+                    if (this.topVer == null)
+                        this.topVer = topVer;
                 }
 
                 map(keys, remap, false);
@@ -825,7 +831,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
      */
     private void map(Iterable<KeyCacheObject> keys, boolean remap, boolean topLocked) {
         try {
-            AffinityTopologyVersion topVer = this.topVer.get();
+            AffinityTopologyVersion topVer = this.topVer;
 
             assert topVer != null;
 
@@ -842,204 +848,227 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
 
             assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks()));
 
-            ConcurrentLinkedDeque8<GridNearLockMapping> mappings = new ConcurrentLinkedDeque8<>();
+            synchronized (this) {
+                mappings = new ArrayDeque<>();
 
-            // Assign keys to primary nodes.
-            GridNearLockMapping map = null;
+                // Assign keys to primary nodes.
+                GridNearLockMapping map = null;
 
-            for (KeyCacheObject key : keys) {
-                GridNearLockMapping updated = map(key, map, topVer);
+                for (KeyCacheObject key : keys) {
+                    GridNearLockMapping updated = map(
+                        key,
+                        map,
+                        topVer);
 
-                // If new mapping was created, add to collection.
-                if (updated != map) {
-                    mappings.add(updated);
+                    // If new mapping was created, add to collection.
+                    if (updated != map) {
+                        mappings.add(updated);
 
-                    if (tx != null && updated.node().isLocal())
-                        tx.nearLocallyMapped(true);
+                        if (tx != null && updated.node().isLocal())
+                            tx.nearLocallyMapped(true);
+                    }
+
+                    map = updated;
                 }
 
-                map = updated;
-            }
+                if (isDone()) {
+                    if (log.isDebugEnabled())
+                        log.debug("Abandoning (re)map because future is done: " + this);
 
-            if (isDone()) {
-                if (log.isDebugEnabled())
-                    log.debug("Abandoning (re)map because future is done: " + this);
+                    return;
+                }
 
-                return;
-            }
+                if (log.isDebugEnabled())
+                    log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
 
-            if (log.isDebugEnabled())
-                log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
+                boolean first = true;
 
-            boolean first = true;
+                // Create mini futures.
+                for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
+                    GridNearLockMapping mapping = iter.next();
 
-            // Create mini futures.
-            for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
-                GridNearLockMapping mapping = iter.next();
+                    ClusterNode node = mapping.node();
+                    Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
 
-                ClusterNode node = mapping.node();
-                Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
+                    assert !mappedKeys.isEmpty();
 
-                assert !mappedKeys.isEmpty();
+                    GridNearLockRequest req = null;
 
-                GridNearLockRequest req = null;
+                    Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
 
-                Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
+                    boolean explicit = false;
 
-                boolean explicit = false;
+                    for (KeyCacheObject key : mappedKeys) {
+                        IgniteTxKey txKey = cctx.txKey(key);
 
-                for (KeyCacheObject key : mappedKeys) {
-                    IgniteTxKey txKey = cctx.txKey(key);
+                        while (true) {
+                            GridNearCacheEntry entry = null;
 
-                    while (true) {
-                        GridNearCacheEntry entry = null;
+                            try {
+                                entry = cctx.near().entryExx(
+                                    key,
+                                    topVer);
 
-                        try {
-                            entry = cctx.near().entryExx(key, topVer);
+                                if (!cctx.isAll(
+                                    entry,
+                                    filter)) {
+                                    if (log.isDebugEnabled())
+                                        log.debug("Entry being locked did not pass filter (will not lock): " + entry);
 
-                            if (!cctx.isAll(entry, filter)) {
-                                if (log.isDebugEnabled())
-                                    log.debug("Entry being locked did not pass filter (will not lock): " + entry);
+                                    onComplete(
+                                        false,
+                                        false);
 
-                                onComplete(false, false);
+                                    return;
+                                }
 
-                                return;
-                            }
+                                // Removed exception may be thrown here.
+                                GridCacheMvccCandidate cand = addEntry(
+                                    topVer,
+                                    entry,
+                                    node.id());
 
-                            // Removed exception may be thrown here.
-                            GridCacheMvccCandidate cand = addEntry(topVer, entry, node.id());
+                                if (isDone()) {
+                                    if (log.isDebugEnabled())
+                                        log.debug("Abandoning (re)map because future is done after addEntry attempt " +
+                                            "[fut=" + this + ", entry=" + entry + ']');
 
-                            if (isDone()) {
-                                if (log.isDebugEnabled())
-                                    log.debug("Abandoning (re)map because future is done after addEntry attempt " +
-                                        "[fut=" + this + ", entry=" + entry + ']');
+                                    return;
+                                }
 
-                                return;
-                            }
+                                if (cand != null) {
+                                    if (tx == null && !cand.reentry())
+                                        cctx.mvcc().addExplicitLock(
+                                            threadId,
+                                            cand,
+                                            topVer);
 
-                            if (cand != null) {
-                                if (tx == null && !cand.reentry())
-                                    cctx.mvcc().addExplicitLock(threadId, cand, topVer);
+                                    IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.versionedValue();
 
-                                IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.versionedValue();
+                                    if (val == null) {
+                                        GridDhtCacheEntry dhtEntry = dht().peekExx(key);
 
-                                if (val == null) {
-                                    GridDhtCacheEntry dhtEntry = dht().peekExx(key);
+                                        try {
+                                            if (dhtEntry != null)
+                                                val = dhtEntry.versionedValue(topVer);
+                                        }
+                                        catch (GridCacheEntryRemovedException ignored) {
+                                            assert dhtEntry.obsolete() : dhtEntry;
 
-                                    try {
-                                        if (dhtEntry != null)
-                                            val = dhtEntry.versionedValue(topVer);
+                                            if (log.isDebugEnabled())
+                                                log.debug("Got removed exception for DHT entry in map (will ignore): "
+                                                    + dhtEntry);
+                                        }
                                     }
-                                    catch (GridCacheEntryRemovedException ignored) {
-                                        assert dhtEntry.obsolete() : " Got removed exception for non-obsolete entry: "
-                                            + dhtEntry;
 
-                                        if (log.isDebugEnabled())
-                                            log.debug("Got removed exception for DHT entry in map (will ignore): "
-                                                + dhtEntry);
-                                    }
-                                }
+                                    GridCacheVersion dhtVer = null;
 
-                                GridCacheVersion dhtVer = null;
+                                    if (val != null) {
+                                        dhtVer = val.get1();
 
-                                if (val != null) {
-                                    dhtVer = val.get1();
+                                        valMap.put(
+                                            key,
+                                            val);
+                                    }
 
-                                    valMap.put(key, val);
-                                }
+                                    if (!cand.reentry()) {
+                                        if (req == null) {
+                                            boolean clientFirst = false;
 
-                                if (!cand.reentry()) {
-                                    if (req == null) {
-                                        boolean clientFirst = false;
+                                            if (first) {
+                                                clientFirst = clientNode &&
+                                                    !topLocked &&
+                                                    (tx == null || !tx.hasRemoteLocks());
 
-                                        if (first) {
-                                            clientFirst = clientNode &&
-                                                !topLocked &&
-                                                (tx == null || !tx.hasRemoteLocks());
+                                                first = false;
+                                            }
 
-                                            first = false;
+                                            req = new GridNearLockRequest(
+                                                cctx.cacheId(),
+                                                topVer,
+                                                cctx.nodeId(),
+                                                threadId,
+                                                futId,
+                                                lockVer,
+                                                inTx(),
+                                                implicitTx(),
+                                                implicitSingleTx(),
+                                                read,
+                                                retval,
+                                                isolation(),
+                                                isInvalidate(),
+                                                timeout,
+                                                mappedKeys.size(),
+                                                inTx() ? tx.size() : mappedKeys.size(),
+                                                inTx() && tx.syncCommit(),
+                                                inTx() ? tx.subjectId() : null,
+                                                inTx() ? tx.taskNameHash() : 0,
+                                                read ? accessTtl : -1L,
+                                                skipStore,
+                                                clientFirst,
+                                                cctx.deploymentEnabled());
+
+                                            mapping.request(req);
                                         }
 
-                                        req = new GridNearLockRequest(
-                                            cctx.cacheId(),
-                                            topVer,
-                                            cctx.nodeId(),
-                                            threadId,
-                                            futId,
-                                            lockVer,
-                                            inTx(),
-                                            implicitTx(),
-                                            implicitSingleTx(),
-                                            read,
-                                            retval,
-                                            isolation(),
-                                            isInvalidate(),
-                                            timeout,
-                                            mappedKeys.size(),
-                                            inTx() ? tx.size() : mappedKeys.size(),
-                                            inTx() && tx.syncCommit(),
-                                            inTx() ? tx.subjectId() : null,
-                                            inTx() ? tx.taskNameHash() : 0,
-                                            read ? accessTtl : -1L,
-                                            skipStore,
-                                            clientFirst,
-                                            cctx.deploymentEnabled());
-
-                                        mapping.request(req);
-                                    }
+                                        distributedKeys.add(key);
 
-                                    distributedKeys.add(key);
+                                        if (tx != null)
+                                            tx.addKeyMapping(
+                                                txKey,
+                                                mapping.node());
 
-                                    if (tx != null)
-                                        tx.addKeyMapping(txKey, mapping.node());
+                                        req.addKeyBytes(
+                                            key,
+                                            retval && dhtVer == null,
+                                            dhtVer,
+                                            // Include DHT version to match remote DHT entry.
+                                            cctx);
+                                    }
 
-                                    req.addKeyBytes(
-                                        key,
-                                        retval && dhtVer == null,
-                                        dhtVer, // Include DHT version to match remote DHT entry.
-                                        cctx);
+                                    if (cand.reentry())
+                                        explicit = tx != null && !entry.hasLockCandidate(tx.xidVersion());
                                 }
-
-                                if (cand.reentry())
+                                else
+                                    // Ignore reentries within transactions.
                                     explicit = tx != null && !entry.hasLockCandidate(tx.xidVersion());
-                            }
-                            else
-                                // Ignore reentries within transactions.
-                                explicit = tx != null && !entry.hasLockCandidate(tx.xidVersion());
 
-                            if (explicit)
-                                tx.addKeyMapping(txKey, mapping.node());
+                                if (explicit)
+                                    tx.addKeyMapping(
+                                        txKey,
+                                        mapping.node());
 
-                            break;
-                        }
-                        catch (GridCacheEntryRemovedException ignored) {
-                            assert entry.obsolete() : "Got removed exception on non-obsolete entry: " + entry;
+                                break;
+                            }
+                            catch (GridCacheEntryRemovedException ignored) {
+                                assert entry.obsolete() : "Got removed exception on non-obsolete entry: " + entry;
 
-                            if (log.isDebugEnabled())
-                                log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
+                                if (log.isDebugEnabled())
+                                    log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
+                            }
                         }
-                    }
 
-                    // Mark mapping explicit lock flag.
-                    if (explicit) {
-                        boolean marked = tx != null && tx.markExplicit(node.id());
+                        // Mark mapping explicit lock flag.
+                        if (explicit) {
+                            boolean marked = tx != null && tx.markExplicit(node.id());
 
-                        assert tx == null || marked;
+                            assert tx == null || marked;
+                        }
                     }
-                }
 
-                if (!distributedKeys.isEmpty())
-                    mapping.distributedKeys(distributedKeys);
-                else {
-                    assert mapping.request() == null;
+                    if (!distributedKeys.isEmpty())
+                        mapping.distributedKeys(distributedKeys);
+                    else {
+                        assert mapping.request() == null;
 
-                    iter.remove();
+                        iter.remove();
+                    }
                 }
             }
 
             cctx.mvcc().recheckPendingLocks();
 
-            proceedMapping(mappings);
+            proceedMapping();
         }
         catch (IgniteCheckedException ex) {
             onError(ex);
@@ -1050,13 +1079,16 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
      * Gets next near lock mapping and either acquires dht locks locally or sends near lock request to
      * remote primary node.
      *
-     * @param mappings Queue of mappings.
      * @throws IgniteCheckedException If mapping can not be completed.
      */
     @SuppressWarnings("unchecked")
-    private void proceedMapping(final ConcurrentLinkedDeque8<GridNearLockMapping> mappings)
+    private void proceedMapping()
         throws IgniteCheckedException {
-        GridNearLockMapping map = mappings.poll();
+        GridNearLockMapping map;
+
+        synchronized (this) {
+            map = mappings.poll();
+        }
 
         // If there are no more mappings to process, complete the future.
         if (map == null)
@@ -1139,7 +1171,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
 
                                         // Lock is held at this point, so we can set the
                                         // returned value if any.
-                                        entry.resetFromPrimary(newVal, lockVer, dhtVer, node.id(), topVer.get());
+                                        entry.resetFromPrimary(newVal, lockVer, dhtVer, node.id(), topVer);
 
                                         entry.readyNearLock(lockVer, mappedVer, res.committedVersions(),
                                             res.rolledbackVersions(), res.pending());
@@ -1181,9 +1213,11 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
                                             log.debug("Failed to add candidates because entry was " +
                                                 "removed (will renew).");
 
-                                        // Replace old entry with new one.
-                                        entries.set(i, (GridDistributedCacheEntry)
-                                            cctx.cache().entryEx(entry.key()));
+                                        synchronized (GridNearLockFuture.this) {
+                                            // Replace old entry with new one.
+                                            entries.set(i,
+                                                (GridDistributedCacheEntry)cctx.cache().entryEx(entry.key()));
+                                        }
                                     }
                                 }
 
@@ -1191,7 +1225,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
                             }
 
                             // Proceed and add new future (if any) before completing embedded future.
-                            proceedMapping(mappings);
+                            proceedMapping();
                         }
                         catch (IgniteCheckedException ex) {
                             onError(ex);
@@ -1205,7 +1239,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
                 fut));
         }
         else {
-            final MiniFuture fut = new MiniFuture(node, mappedKeys, mappings);
+            final MiniFuture fut = new MiniFuture(node, mappedKeys);
 
             req.miniId(fut.futureId());
 
@@ -1302,7 +1336,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         ClusterTopologyCheckedException topEx = new ClusterTopologyCheckedException("Failed to acquire lock for keys " +
             "(primary node left grid, retry transaction if possible) [keys=" + keys + ", node=" + nodeId + ']', nested);
 
-        topEx.retryReadyFuture(cctx.shared().nextAffinityReadyFuture(topVer.get()));
+        topEx.retryReadyFuture(cctx.shared().nextAffinityReadyFuture(topVer));
 
         return topEx;
     }
@@ -1354,23 +1388,19 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         @GridToStringInclude
         private Collection<KeyCacheObject> keys;
 
-        /** Mappings to proceed. */
-        @GridToStringExclude
-        private ConcurrentLinkedDeque8<GridNearLockMapping> mappings;
-
         /** */
-        private AtomicBoolean rcvRes = new AtomicBoolean(false);
+        private boolean rcvRes;
 
         /**
          * @param node Node.
          * @param keys Keys.
-         * @param mappings Mappings to proceed.
          */
-        MiniFuture(ClusterNode node, Collection<KeyCacheObject> keys,
-            ConcurrentLinkedDeque8<GridNearLockMapping> mappings) {
+        MiniFuture(
+            ClusterNode node,
+            Collection<KeyCacheObject> keys
+        ) {
             this.node = node;
             this.keys = keys;
-            this.mappings = mappings;
         }
 
         /**
@@ -1395,197 +1425,194 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         }
 
         /**
-         * @param e Error.
-         */
-        void onResult(Throwable e) {
-            if (rcvRes.compareAndSet(false, true)) {
-                if (log.isDebugEnabled())
-                    log.debug("Failed to get future result [fut=" + this + ", err=" + e + ']');
-
-                // Fail.
-                onDone(e);
-            }
-            else
-                U.warn(log, "Received error after another result has been processed [fut=" + GridNearLockFuture.this +
-                    ", mini=" + this + ']', e);
-        }
-
-        /**
          * @param e Node left exception.
          */
         void onResult(ClusterTopologyCheckedException e) {
             if (isDone())
                 return;
 
-            if (rcvRes.compareAndSet(false, true)) {
-                if (log.isDebugEnabled())
-                    log.debug("Remote node left grid while sending or waiting for reply (will fail): " + this);
+            synchronized (this) {
+                if (!rcvRes)
+                    rcvRes = true;
+                else
+                    return;
+            }
 
-                if (tx != null)
-                    tx.removeMapping(node.id());
+            if (log.isDebugEnabled())
+                log.debug("Remote node left grid while sending or waiting for reply (will fail): " + this);
 
-                // Primary node left the grid, so fail the future.
-                GridNearLockFuture.this.onDone(newTopologyException(e, node.id()));
+            if (tx != null)
+                tx.removeMapping(node.id());
 
-                onDone(true);
-            }
+            // Primary node left the grid, so fail the future.
+            GridNearLockFuture.this.onDone(newTopologyException(e, node.id()));
+
+            onDone(true);
         }
 
         /**
          * @param res Result callback.
          */
         void onResult(GridNearLockResponse res) {
-            if (rcvRes.compareAndSet(false, true)) {
-                if (res.error() != null) {
-                    if (log.isDebugEnabled())
-                        log.debug("Finishing mini future with an error due to error in response [miniFut=" + this +
-                            ", res=" + res + ']');
+            synchronized (this) {
+                if (!rcvRes)
+                    rcvRes = true;
+                else
+                    return;
+            }
 
-                    // Fail.
-                    if (res.error() instanceof GridCacheLockTimeoutException)
-                        onDone(false);
-                    else
-                        onDone(res.error());
+            if (res.error() != null) {
+                if (log.isDebugEnabled())
+                    log.debug("Finishing mini future with an error due to error in response [miniFut=" + this +
+                        ", res=" + res + ']');
 
-                    return;
-                }
+                // Fail.
+                if (res.error() instanceof GridCacheLockTimeoutException)
+                    onDone(false);
+                else
+                    onDone(res.error());
 
-                if (res.clientRemapVersion() != null) {
-                    assert cctx.kernalContext().clientNode();
+                return;
+            }
 
-                    IgniteInternalFuture<?> affFut =
-                        cctx.shared().exchange().affinityReadyFuture(res.clientRemapVersion());
+            if (res.clientRemapVersion() != null) {
+                assert cctx.kernalContext().clientNode();
 
-                    if (affFut != null && !affFut.isDone()) {
-                        affFut.listen(new CI1<IgniteInternalFuture<?>>() {
-                            @Override public void apply(IgniteInternalFuture<?> fut) {
-                                try {
-                                    fut.get();
+                IgniteInternalFuture<?> affFut =
+                    cctx.shared().exchange().affinityReadyFuture(res.clientRemapVersion());
 
-                                    remap();
-                                }
-                                catch (IgniteCheckedException e) {
-                                    onDone(e);
-                                }
-                                finally {
-                                    cctx.shared().txContextReset();
-                                }
+                if (affFut != null && !affFut.isDone()) {
+                    affFut.listen(new CI1<IgniteInternalFuture<?>>() {
+                        @Override public void apply(IgniteInternalFuture<?> fut) {
+                            try {
+                                fut.get();
+
+                                remap();
                             }
-                        });
-                    }
-                    else
-                        remap();
+                            catch (IgniteCheckedException e) {
+                                onDone(e);
+                            }
+                            finally {
+                                cctx.shared().txContextReset();
+                            }
+                        }
+                    });
                 }
-                else {
-                    int i = 0;
+                else
+                    remap();
+            }
+            else {
+                int i = 0;
 
-                    AffinityTopologyVersion topVer = GridNearLockFuture.this.topVer.get();
+                AffinityTopologyVersion topVer = GridNearLockFuture.this.topVer;
 
-                    for (KeyCacheObject k : keys) {
-                        while (true) {
-                            GridNearCacheEntry entry = cctx.near().entryExx(k, topVer);
+                for (KeyCacheObject k : keys) {
+                    while (true) {
+                        GridNearCacheEntry entry = cctx.near().entryExx(k, topVer);
 
-                            try {
-                                if (res.dhtVersion(i) == null) {
-                                    onDone(new IgniteCheckedException("Failed to receive DHT version from remote node " +
-                                        "(will fail the lock): " + res));
+                        try {
+                            if (res.dhtVersion(i) == null) {
+                                onDone(new IgniteCheckedException("Failed to receive DHT version from remote node " +
+                                    "(will fail the lock): " + res));
 
-                                    return;
-                                }
+                                return;
+                            }
 
-                                IgniteBiTuple<GridCacheVersion, CacheObject> oldValTup = valMap.get(entry.key());
+                            IgniteBiTuple<GridCacheVersion, CacheObject> oldValTup = valMap.get(entry.key());
 
-                                CacheObject oldVal = entry.rawGet();
-                                boolean hasOldVal = false;
-                                CacheObject newVal = res.value(i);
+                            CacheObject oldVal = entry.rawGet();
+                            boolean hasOldVal = false;
+                            CacheObject newVal = res.value(i);
 
-                                boolean readRecordable = false;
+                            boolean readRecordable = false;
 
-                                if (retval) {
-                                    readRecordable = cctx.events().isRecordable(EVT_CACHE_OBJECT_READ);
+                            if (retval) {
+                                readRecordable = cctx.events().isRecordable(EVT_CACHE_OBJECT_READ);
 
-                                    if (readRecordable)
-                                        hasOldVal = entry.hasValue();
-                                }
+                                if (readRecordable)
+                                    hasOldVal = entry.hasValue();
+                            }
 
-                                GridCacheVersion dhtVer = res.dhtVersion(i);
-                                GridCacheVersion mappedVer = res.mappedVersion(i);
+                            GridCacheVersion dhtVer = res.dhtVersion(i);
+                            GridCacheVersion mappedVer = res.mappedVersion(i);
 
-                                if (newVal == null) {
-                                    if (oldValTup != null) {
-                                        if (oldValTup.get1().equals(dhtVer))
-                                            newVal = oldValTup.get2();
+                            if (newVal == null) {
+                                if (oldValTup != null) {
+                                    if (oldValTup.get1().equals(dhtVer))
+                                        newVal = oldValTup.get2();
 
-                                        oldVal = oldValTup.get2();
-                                    }
+                                    oldVal = oldValTup.get2();
                                 }
+                            }
 
-                                // Lock is held at this point, so we can set the
-                                // returned value if any.
-                                entry.resetFromPrimary(newVal, lockVer, dhtVer, node.id(), topVer);
+                            // Lock is held at this point, so we can set the
+                            // returned value if any.
+                            entry.resetFromPrimary(newVal, lockVer, dhtVer, node.id(), topVer);
 
-                                if (inTx()) {
-                                    tx.hasRemoteLocks(true);
+                            if (inTx()) {
+                                tx.hasRemoteLocks(true);
 
-                                    if (implicitTx() && tx.onePhaseCommit()) {
-                                        boolean pass = res.filterResult(i);
+                                if (implicitTx() && tx.onePhaseCommit()) {
+                                    boolean pass = res.filterResult(i);
 
-                                        tx.entry(cctx.txKey(k)).filters(pass ? CU.empty0() : CU.alwaysFalse0Arr());
-                                    }
+                                    tx.entry(cctx.txKey(k)).filters(pass ? CU.empty0() : CU.alwaysFalse0Arr());
                                 }
+                            }
 
-                                entry.readyNearLock(lockVer,
-                                    mappedVer,
-                                    res.committedVersions(),
-                                    res.rolledbackVersions(),
-                                    res.pending());
-
-                                if (retval) {
-                                    if (readRecordable)
-                                        cctx.events().addEvent(
-                                            entry.partition(),
-                                            entry.key(),
-                                            tx,
-                                            null,
-                                            EVT_CACHE_OBJECT_READ,
-                                            newVal,
-                                            newVal != null,
-                                            oldVal,
-                                            hasOldVal,
-                                            CU.subjectId(tx, cctx.shared()),
-                                            null,
-                                            inTx() ? tx.resolveTaskName() : null);
-
-                                    if (cctx.cache().configuration().isStatisticsEnabled())
-                                        cctx.cache().metrics0().onRead(false);
-                                }
+                            entry.readyNearLock(lockVer,
+                                mappedVer,
+                                res.committedVersions(),
+                                res.rolledbackVersions(),
+                                res.pending());
+
+                            if (retval) {
+                                if (readRecordable)
+                                    cctx.events().addEvent(
+                                        entry.partition(),
+                                        entry.key(),
+                                        tx,
+                                        null,
+                                        EVT_CACHE_OBJECT_READ,
+                                        newVal,
+                                        newVal != null,
+                                        oldVal,
+                                        hasOldVal,
+                                        CU.subjectId(tx, cctx.shared()),
+                                        null,
+                                        inTx() ? tx.resolveTaskName() : null);
+
+                                if (cctx.cache().configuration().isStatisticsEnabled())
+                                    cctx.cache().metrics0().onRead(false);
+                            }
 
-                                if (log.isDebugEnabled())
-                                    log.debug("Processed response for entry [res=" + res + ", entry=" + entry + ']');
+                            if (log.isDebugEnabled())
+                                log.debug("Processed response for entry [res=" + res + ", entry=" + entry + ']');
 
-                                break; // Inner while loop.
-                            }
-                            catch (GridCacheEntryRemovedException ignored) {
-                                if (log.isDebugEnabled())
-                                    log.debug("Failed to add candidates because entry was removed (will renew).");
+                            break; // Inner while loop.
+                        }
+                        catch (GridCacheEntryRemovedException ignored) {
+                            if (log.isDebugEnabled())
+                                log.debug("Failed to add candidates because entry was removed (will renew).");
 
+                            synchronized (GridNearLockFuture.this) {
                                 // Replace old entry with new one.
-                                entries.set(i, (GridDistributedCacheEntry)cctx.cache().entryEx(entry.key()));
+                                entries.set(i,
+                                    (GridDistributedCacheEntry)cctx.cache().entryEx(entry.key()));
                             }
                         }
-
-                        i++;
                     }
 
-                    try {
-                        proceedMapping(mappings);
-                    }
-                    catch (IgniteCheckedException e) {
-                        onDone(e);
-                    }
+                    i++;
+                }
 
-                    onDone(true);
+                try {
+                    proceedMapping();
+                }
+                catch (IgniteCheckedException e) {
+                    onDone(e);
                 }
+
+                onDone(true);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e6d0ffe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockMapping.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockMapping.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockMapping.java
index b4f689c..6c8e388 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockMapping.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockMapping.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.near;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.LinkedList;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -35,7 +35,7 @@ public class GridNearLockMapping {
 
     /** Collection of mapped keys. */
     @GridToStringInclude
-    private Collection<KeyCacheObject> mappedKeys = new LinkedList<>();
+    private final Collection<KeyCacheObject> mappedKeys = new ArrayList<>();
 
     /** Near lock request. */
     @GridToStringExclude
@@ -115,4 +115,4 @@ public class GridNearLockMapping {
     public String toString() {
         return S.toString(GridNearLockMapping.class, this);
     }
-}
\ No newline at end of file
+}


[34/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index f6432a7..8af9443 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -30,7 +30,9 @@ import org.apache.ignite.cache.store.GridCacheBalancingStoreSelfTest;
 import org.apache.ignite.cache.store.GridCacheLoadOnlyStoreAdapterSelfTest;
 import org.apache.ignite.cache.store.StoreResourceInjectionSelfTest;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreMultitreadedSelfTest;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreOptimizedMarshallerSelfTest;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreTest;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStorePortableMarshallerSelfTest;
 import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreMultithreadedSelfTest;
 import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheAffinityCallSelfTest;
@@ -139,7 +141,7 @@ public class IgniteCacheTestSuite extends TestSuite {
     }
 
     /**
-     * @param ignoredTests
+     * @param ignoredTests Tests to ignore.
      * @return Test suite.
      * @throws Exception Thrown in case of the failure.
      */
@@ -211,6 +213,8 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheJdbcBlobStoreSelfTest.class);
         suite.addTestSuite(GridCacheJdbcBlobStoreMultithreadedSelfTest.class);
         suite.addTestSuite(CacheJdbcPojoStoreTest.class);
+        suite.addTestSuite(CacheJdbcPojoStoreOptimizedMarshallerSelfTest.class);
+        suite.addTestSuite(CacheJdbcPojoStorePortableMarshallerSelfTest.class);
         suite.addTestSuite(CacheJdbcPojoStoreMultitreadedSelfTest.class);
         suite.addTestSuite(GridCacheBalancingStoreSelfTest.class);
         suite.addTestSuite(GridCacheAffinityApiSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/README.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/README.txt b/modules/schema-import/README.txt
index 9b0a44d..d4f2dbf 100644
--- a/modules/schema-import/README.txt
+++ b/modules/schema-import/README.txt
@@ -17,19 +17,19 @@ Use Schema Import Utility for generation of type mapping and domain model in Jav
 
 For example you may use the following script for create sample type 'Person' in your RDBMS system:
 
-create table PERSON(id integer not null, firstName varchar(50), lastName varchar(50), PRIMARY KEY(id));
+create table PERSON(id integer not null PRIMARY KEY, first_name varchar(50), last_name varchar(50), salary double);
 
-insert into PERSON(id, first_name, last_name) values(1, 'Johannes', 'Kepler');
-insert into PERSON(id, first_name, last_name) values(2, 'Galileo', 'Galilei');
-insert into PERSON(id, first_name, last_name) values(3, 'Henry', 'More');
-insert into PERSON(id, first_name, last_name) values(4, 'Polish', 'Brethren');
-insert into PERSON(id, first_name, last_name) values(5, 'Robert', 'Boyle');
-insert into PERSON(id, first_name, last_name) values(6, 'Isaac', 'Newton');
+insert into PERSON(id, first_name, first_name, salary) values(1, 'Johannes', 'Kepler', 1000);
+insert into PERSON(id, first_name, first_name, salary) values(2, 'Galileo', 'Galilei', 1200);
+insert into PERSON(id, first_name, first_name, salary) values(3, 'Henry', 'More', 1150);
+insert into PERSON(id, first_name, first_name, salary) values(4, 'Polish', 'Brethren', 2000);
+insert into PERSON(id, first_name, first_name, salary) values(5, 'Robert', 'Boyle', 2500);
+insert into PERSON(id, first_name, first_name, salary) values(6, 'Isaac', 'Newton', 1300);
 
 The Ignite Schema Import utility generates the following artifacts:
- # Java POJO key and value classes
- # XML CacheTypeMetadata configuration
- # Java configuration snippet (alternative to XML)
+ # Java POJO key and value classes (enter "org.apache.ignite.schema" package name before generation).
+ # XML CacheTypeMetadata configuration.
+ # Java configuration snippet (alternative to XML).
 
 After you exit from the wizard, you should:
  # Copy generated POJO java classes to you project source folder.
@@ -42,6 +42,9 @@ After you exit from the wizard, you should:
 
 Example of spring configuration:
 
+<!-- Sample data source. -->
+<bean id="myDataSource" class="org.h2.jdbcx.JdbcDataSource"/>
+
 <bean class="org.apache.ignite.configuration.IgniteConfiguration">
     ...
     <!-- Cache configuration. -->
@@ -52,67 +55,63 @@ Example of spring configuration:
 
                 <!-- Cache store. -->
                 <property name="cacheStoreFactory">
-                    <bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
-                        <constructor-arg>
-                            <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
-                                <property name="dataSource">
-                                    <!-- TODO: Need specify connection pooling DataSource to your RDBMS system. -->
-                                    ...
-                                </property>
-                            </bean>
-                        </constructor-arg>
-                    </bean>
-                </property>
-
-                <!-- Type mapping description. -->
-                <property name="typeMetadata">
-                    <list>
-                        <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-                            <property name="databaseTable" value="PERSON"/>
-                            <property name="keyType" value="org.apache.ignite.examples.datagrid.store.model.PersonKey"/>
-                            <property name="valueType" value="org.apache.ignite.examples.datagrid.store.Person"/>
-                            <property name="keyFields">
-                                <list>
-                                    <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                                        <property name="databaseName" value="ID"/>
-                                        <property name="databaseType">
-                                            <util:constant static-field="java.sql.Types.BIGINT"/>
-                                        </property>
-                                        <property name="javaName" value="id"/>
-                                        <property name="javaType" value="long"/>
-                                    </bean>
-                                </list>
-                            </property>
-                            <property name="valueFields">
+                    <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
+                        <property name="dataSourceBean" value="myDataSource"/>
+                        <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
+                            <property name="dataSourceBean" value="myDataSource" />
+                            <property name="types">
                                 <list>
-                                    <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                                        <property name="databaseName" value="ID"/>
-                                        <property name="databaseType">
-                                            <util:constant static-field="java.sql.Types.BIGINT"/>
+                                    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+                                        <property name="cacheName" value="myCache" />
+                                        <property name="databaseSchema" value="MY_DB_SCHEMA" />
+                                        <property name="databaseTable" value="PERSON" />
+                                        <property name="keyType" value="java.lang.Integer" />
+                                        <property name="keyFields">
+                                            <list>
+                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                                    <property name="databaseFieldType" >
+                                                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                                                    </property>
+                                                    <property name="databaseFieldName" value="ID" />
+                                                    <property name="javaFieldType" value="java.lang.Integer" />
+                                                    <property name="javaFieldName" value="id" />
+                                                </bean>
+                                            </list>
                                         </property>
-                                        <property name="javaName" value="id"/>
-                                        <property name="javaType" value="long"/>
-                                    </bean>
-                                    <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                                        <property name="databaseName" value="FIRST_NAME"/>
-                                        <property name="databaseType">
-                                            <util:constant static-field="java.sql.Types.VARCHAR"/>
+                                        <property name="valueType" value="my.company.Person" />
+                                        <property name="valueFields">
+                                            <list>
+                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                                    <property name="databaseFieldType" >
+                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                                                    </property>
+                                                    <property name="databaseFieldName" value="first_name" />
+                                                    <property name="javaFieldType" value="java.lang.String" />
+                                                    <property name="javaFieldName" value="firstName" />
+                                                </bean>
+                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                                    <property name="databaseFieldType" >
+                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                                                    </property>
+                                                    <property name="databaseFieldName" value="last_name" />
+                                                    <property name="javaFieldType" value="java.lang.String" />
+                                                    <property name="javaFieldName" value="lastName" />
+                                                </bean>
+                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                                                    <property name="databaseFieldType" >
+                                                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                                                    </property>
+                                                    <property name="databaseFieldName" value="salary" />
+                                                    <property name="javaFieldType" value="java.lang.Double" />
+                                                    <property name="javaFieldName" value="salary" />
+                                                </bean>
+                                            </list>
                                         </property>
-                                        <property name="javaName" value="firstName"/>
-                                        <property name="javaType" value="java.lang.String"/>
-                                    </bean>
-                                    <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                                        <property name="databaseName" value="LAST_NAME"/>
-                                        <property name="databaseType">
-                                            <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                        </property>
-                                        <property name="javaName" value="lastName"/>
-                                        <property name="javaType" value="java.lang.String"/>
                                     </bean>
                                 </list>
                             </property>
                         </bean>
-                    </list>
+                    </bean>
                 </property>
                 ...
             </bean>
@@ -127,44 +126,46 @@ IgniteConfiguration cfg = new IgniteConfiguration();
 ...
 CacheConfiguration ccfg = new CacheConfiguration<>();
 
-DataSource dataSource = null; // TODO: Need specify connection pooling DataSource to your RDBMS system.
-
-// Create store.
-CacheJdbcPojoStore store = new CacheJdbcPojoStore();
-store.setDataSource(dataSource);
-
 // Create store factory.
-ccfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory<>(store));
-
-// Configure cache to use store.
-ccfg.setReadThrough(true);
-ccfg.setWriteThrough(true);
+CacheJdbcPojoStoreFactory storeFactory = new CacheJdbcPojoStoreFactory();
+storeFactory.setDataSourceBean("myDataSource");
 
 // Configure cache types.
-Collection<CacheTypeMetadata> meta = new ArrayList<>();
+Collection<JdbcType> jdbcTypes = new ArrayList<>();
 
 // PERSON type mapping.
-CacheTypeMetadata tm = new CacheTypeMetadata();
+JdbcType jdbcType = new JdbcType();
+
+jdbcType.setCacheName(CACHE_NAME);
 
-tm.setDatabaseTable("PERSON");
+jdbcType.setDatabaseSchema("MY_DB_SCHEMA");
+jdbcType.setDatabaseTable("PERSON");
 
-tm.setKeyType("java.lang.Long");
-tm.setValueType("org.apache.ignite.examples.datagrid.store.Person");
+jdbcType.setKeyType("java.lang.Integer");
+jdbcType.setValueType("my.company.Person");
 
 // Key fields for PERSONS.
-tm.setKeyFields(F.asList(new CacheTypeFieldMetadata("ID", Types.BIGINT, "id", Long.class)));
+jdbcType.setKeyFields(F.asArray(new JdbcType(Types.INTEGER, "ID", Integer.class, "id")));
 
 // Value fields for PERSONS.
-tm.setValueFields(F.asList(
-    new CacheTypeFieldMetadata("ID", Types.BIGINT, "id", long.class),
-    new CacheTypeFieldMetadata("FIRST_NAME", Types.VARCHAR, "firstName", String.class),
-    new CacheTypeFieldMetadata("LAST_NAME", Types.VARCHAR, "lastName", String.class)
+jdbcType.setValueFields(F.asArray(
+    new JdbcType(Types.INTEGER, "ID", int.class, "id"),
+    new JdbcType(Types.VARCHAR, "first_name", String.class, "firstName"),
+    new JdbcType(Types.VARCHAR, "last_name", String.class, "lastName"),
+    new JdbcType(Types.DOUBLE, "salary", Double.class, "salary")
 ));
-...
-ccfg.setTypeMetadata(tm);
+
+storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[]));
+
+// Configure cache to use store.
+ccfg.setReadThrough(true);
+ccfg.setWriteThrough(true);
+ccfg.setCacheStoreFactory(storeFactory);
 
 cfg.setCacheConfiguration(ccfg);
+
 ...
+
 // Start Ignite node.
 Ignition.start(cfg);
 
@@ -183,6 +184,7 @@ Performance optimization.
 
 1. Use DataSource with connection pool.
 2. Enable write-behind feature by default write-behind is disabled.
+   Note, write-behind should not be used with TRANSACTIONAL caches.
 
 Example of spring configuration:
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
index f1119cf..283ccc1 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
@@ -33,7 +33,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.regex.Pattern;
-import org.apache.ignite.schema.model.IndexItem;
+
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.schema.model.PojoDescriptor;
 import org.apache.ignite.schema.model.PojoField;
 import org.apache.ignite.schema.ui.ConfirmCallable;
@@ -53,11 +55,9 @@ public class CodeGenerator {
     private static final String TAB2 = TAB + TAB;
     /** */
     private static final String TAB3 = TAB + TAB + TAB;
-    /** */
-    private static final String TAB4 = TAB + TAB + TAB + TAB;
 
     /** Java key words. */
-    private static final Set<String> javaKeywords = new HashSet<>(Arrays.asList(
+    private static final Set<String> JAVA_KEYWORDS = new HashSet<>(Arrays.asList(
         "abstract",     "assert",        "boolean",      "break",           "byte",
         "case",         "catch",         "char",         "class",           "const",
         "continue",     "default",       "do",           "double",          "else",
@@ -71,6 +71,12 @@ public class CodeGenerator {
         "void",         "volatile",      "while"
     ));
 
+    /** java.lang.*  */
+    private  static final String JAVA_LANG_PKG = "java.lang.";
+
+    /** java.util.*  */
+    private  static final String JAVA_UTIL_PKG = "java.util.";
+
     /** Regexp to validate java identifier. */
     private static final Pattern VALID_JAVA_IDENTIFIER =
         Pattern.compile("\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*");
@@ -98,7 +104,7 @@ public class CodeGenerator {
             if (part.isEmpty())
                 throw new IllegalStateException(msg + " could not has empty parts!");
 
-            if (javaKeywords.contains(part))
+            if (JAVA_KEYWORDS.contains(part))
                 throw new IllegalStateException(msg + " could not contains reserved keyword:" +
                     " [type = " + type + ", identifier=" + identifier + ", keyword=" + part + "]");
 
@@ -160,16 +166,6 @@ public class CodeGenerator {
     }
 
     /**
-     * Add line to source code with four indents.
-     *
-     * @param src Source code.
-     * @param line Code line.
-     */
-    private static void add4(Collection<String> src, String line) {
-        src.add(TAB4 + line);
-    }
-
-    /**
      * @param str Source string.
      * @return String with first letters in upper case.
      */
@@ -278,11 +274,15 @@ public class CodeGenerator {
         boolean constructor, boolean includeKeys, ConfirmCallable askOverwrite) throws IOException {
         String type = key ? pojo.keyClassName() : pojo.valueClassName();
 
-        File out = new File(pkgFolder, type + ".java");
-
         checkValidJavaIdentifier(pkg, true, "Package", type);
+
         checkValidJavaIdentifier(type, false, "Type", type);
 
+        if (!pkgFolder.exists() && !pkgFolder.mkdirs())
+            throw new IOException("Failed to create folders for package: " + pkg);
+
+        File out = new File(pkgFolder, type + ".java");
+
         if (out.exists()) {
             MessageBox.Result choice = askOverwrite.confirm(out.getName());
 
@@ -529,9 +529,6 @@ public class CodeGenerator {
         boolean includeKeys, ConfirmCallable askOverwrite) throws IOException {
         File pkgFolder = new File(outFolder, pkg.replace('.', File.separatorChar));
 
-        if (!pkgFolder.exists() && !pkgFolder.mkdirs())
-            throw new IOException("Failed to create folders for package: " + pkg);
-
         generateCode(pojo, true, pkg, pkgFolder, constructor, false, askOverwrite);
 
         generateCode(pojo, false, pkg, pkgFolder, constructor, includeKeys, askOverwrite);
@@ -548,12 +545,13 @@ public class CodeGenerator {
         for (PojoField field : fields) {
             String javaTypeName = field.javaTypeName();
 
-            if (javaTypeName.startsWith("java.lang."))
-                javaTypeName = javaTypeName.substring(10);
+            if (javaTypeName.startsWith(JAVA_LANG_PKG))
+                javaTypeName = javaTypeName.substring(JAVA_LANG_PKG.length());
+            else  if (javaTypeName.startsWith(JAVA_UTIL_PKG))
+                javaTypeName = javaTypeName.substring(JAVA_UTIL_PKG.length());
 
-            add2(src, owner + ".add(new CacheTypeFieldMetadata(\"" + field.dbName() + "\", " +
-                "Types." + field.dbTypeName() + ", \"" +
-                field.javaName() + "\", " + javaTypeName + ".class));");
+            add2(src, owner + ".add(new JdbcTypeField(Types." + field.dbTypeName() + ", \"" + field.dbName() + "\", " +
+                    javaTypeName + ".class, \"" + field.javaName() + "\"));");
         }
     }
 
@@ -562,26 +560,24 @@ public class CodeGenerator {
      *
      * @param src Source code lines.
      * @param fields List of fields to add.
-     * @param varName Variable name to generate.
-     * @param mtdName Method name to generate.
      * @param comment Commentary text.
      * @param first {@code true} if variable should be declared.
      * @return {@code false} if variable was declared.
      */
-    private static boolean addQueryFields(Collection<String> src, Collection<PojoField> fields, String varName,
-        String mtdName, String comment, boolean first) {
+    private static boolean addQueryFields(Collection<String> src, Collection<PojoField> fields, String comment,
+        boolean first) {
         if (fields.isEmpty())
             return first;
 
         add2(src, comment);
-        add2(src, (first ? "Map<String, Class<?>> " : "") + varName + " = new LinkedHashMap<>();");
+        add2(src, (first ? "LinkedHashMap<String, String> " : "") + "fields = new LinkedHashMap<>();");
         add0(src, "");
 
         for (PojoField field : fields)
-            add2(src, varName + ".put(\"" + field.javaName() + "\", " + javaTypeName(field) + ".class);");
+            add2(src, "fields.put(\"" + field.javaName() + "\", \"" + javaTypeName(field) + "\");");
 
         add0(src, "");
-        add2(src, "type." + mtdName + "(" + varName + ");");
+        add2(src, "qryEntity.setFields(fields);");
         add0(src, "");
 
         return false;
@@ -615,118 +611,146 @@ public class CodeGenerator {
 
         Collection<String> src = new ArrayList<>(256);
 
-        header(src, pkg, "org.apache.ignite.cache.*;org.apache.ignite.cache.store.*;" +
-                "org.apache.ignite.configuration.*;org.apache.ignite.lang.*;;" +
-                "javax.cache.configuration.*;java.sql.*;java.util.*",
+        header(src, pkg, "java.sql.*;java.util.*;" +
+            "org.apache.ignite.cache.*;org.apache.ignite.cache.store.jdbc.*;" +
+            "org.apache.ignite.configuration.*;" + pkg + ".*",
             "CacheConfig", "CacheConfig");
 
         add1(src, "/**");
         add1(src, "* Configure cache.");
         add1(src, "*");
-        add1(src, "* @param name Cache name.");
+        add1(src, "* @param cacheName Cache name.");
         add1(src, "* @param storeFactory Cache store factory.");
         add1(src, "*/");
-        add1(src, "public static <K, V> CacheConfiguration<K, V> cache(String name," +
-            " Factory<CacheStore<K, V>> storeFactory) {");
+        add1(src, "public static <K, V> CacheConfiguration<K, V> cache(String cacheName," +
+            " CacheJdbcPojoStoreFactory<K, V> storeFactory) {");
         add2(src, "if (storeFactory == null)");
         add3(src, " throw new IllegalArgumentException(\"Cache store factory cannot be null.\");");
         add0(src, "");
-        add2(src, "CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(name);");
+        add2(src, "CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(cacheName);");
         add0(src, "");
         add2(src, "ccfg.setCacheStoreFactory(storeFactory);");
         add2(src, "ccfg.setReadThrough(true);");
         add2(src, "ccfg.setWriteThrough(true);");
         add0(src, "");
 
-        add2(src, "// Configure cache types. ");
-        add2(src, "Collection<CacheTypeMetadata> meta = new ArrayList<>();");
+        add2(src, "// Configure JDBC types. ");
+        add2(src, "Collection<JdbcType> jdbcTypes = new ArrayList<>();");
         add0(src, "");
 
         boolean first = true;
-        boolean firstAsc = true;
-        boolean firstDesc = true;
-        boolean firstGrps = true;
-        boolean firstGrp = true;
 
         for (PojoDescriptor pojo : pojos) {
             String tbl = pojo.table();
 
             add2(src, "// " + tbl + ".");
-            add2(src, (first ? "CacheTypeMetadata " : "") + "type = new CacheTypeMetadata();");
-            add0(src, "");
-            add2(src, "meta.add(type);");
+            add2(src, (first ? "JdbcType " : "") + "jdbcType = new JdbcType();");
             add0(src, "");
 
+            add2(src, "jdbcType.setCacheName(cacheName);");
+
             // Database info.
-            add2(src, "type.setDatabaseSchema(\"" + pojo.schema() + "\");");
-            add2(src, "type.setDatabaseTable(\"" + tbl + "\");");
+            add2(src, "jdbcType.setDatabaseSchema(\"" + pojo.schema() + "\");");
+            add2(src, "jdbcType.setDatabaseTable(\"" + tbl + "\");");
 
             // Java info.
-            add2(src, "type.setKeyType(" + pojo.keyClassName() + ".class.getName());");
-            add2(src, "type.setValueType(" + pojo.valueClassName() + ".class.getName());");
+            add2(src, "jdbcType.setKeyType(" + pojo.keyClassName() + ".class.getName());");
+            add2(src, "jdbcType.setValueType(" + pojo.valueClassName() + ".class.getName());");
             add0(src, "");
 
             // Key fields.
             add2(src, "// Key fields for " + tbl + ".");
-            add2(src, (first ? "Collection<CacheTypeFieldMetadata> " : "") + "keys = new ArrayList<>();");
+            add2(src, (first ? "Collection<JdbcTypeField> " : "") + "keys = new ArrayList<>();");
             addFields(src, "keys", pojo.keyFields());
-            add2(src, "type.setKeyFields(keys);");
+            add2(src, "jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));");
             add0(src, "");
 
             // Value fields.
             add2(src, "// Value fields for " + tbl + ".");
-            add2(src, (first ? "Collection<CacheTypeFieldMetadata> " : "") + "vals = new ArrayList<>();");
+            add2(src, (first ? "Collection<JdbcTypeField> " : "") + "vals = new ArrayList<>();");
             addFields(src, "vals", pojo.valueFields(includeKeys));
-            add2(src, "type.setValueFields(vals);");
+            add2(src, "jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));");
             add0(src, "");
 
-            // Query fields.
-            addQueryFields(src, pojo.fields(), "qryFlds", "setQueryFields", "// Query fields for " + tbl + ".", first);
+            add2(src, "jdbcTypes.add(jdbcType);");
+            add0(src, "");
 
-            // Ascending fields.
-            firstAsc = addQueryFields(src, pojo.ascendingFields(), "ascFlds", "setAscendingFields",
-                "// Ascending fields for " + tbl + ".", firstAsc);
+            first = false;
+        }
 
-            // Descending fields.
-            firstDesc = addQueryFields(src, pojo.descendingFields(), "descFlds", "setDescendingFields",
-                "// Descending fields for " + tbl + ".", firstDesc);
+        add2(src, "storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));");
+        add0(src, "");
 
-            // Groups.
-            Map<String, Map<String, IndexItem>> groups = pojo.groups();
+        // Queries entities.
+        add2(src, "// Configure query entities. ");
+        add2(src, "Collection<QueryEntity> qryEntities = new ArrayList<>();");
+        add0(src, "");
 
-            if (!groups.isEmpty()) {
-                add2(src, "// Groups for " + tbl + ".");
-                add2(src, (firstGrps ? "Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> " : "") +
-                    "grps = new LinkedHashMap<>();");
-                add0(src, "");
+        first = true;
+        boolean firstIdxs = true;
+        boolean firstIdx = true;
 
-                firstGrps = false;
+        for (PojoDescriptor pojo : pojos) {
+            String tbl = pojo.table();
 
-                for (Map.Entry<String, Map<String, IndexItem>> group : groups.entrySet()) {
-                    add2(src, (firstGrp ? "LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>> " : "") +
-                        "grpItems = new LinkedHashMap<>();");
-                    add0(src, "");
+            add2(src, (first ? "QueryEntity " : "") + "qryEntity = new QueryEntity();");
+            add0(src, "");
+            add2(src, "qryEntity.setKeyType(" + pojo.keyClassName() + ".class.getName());");
+            add2(src, "qryEntity.setValueType(" + pojo.valueClassName() + ".class.getName());");
+            add0(src, "");
+
+            // Query fields.
+            addQueryFields(src, pojo.fields(), "// Query fields for " + tbl + ".", first);
 
-                    for (Map.Entry<String, IndexItem> grpItem : group.getValue().entrySet()) {
-                        IndexItem idxCol = grpItem.getValue();
+            // Indexes.
+            Collection<QueryIndex> idxs = pojo.indexes();
 
-                        add2(src, "grpItems.put(\"" + grpItem.getKey() + "\", " +
-                            "new IgniteBiTuple<Class<?>, Boolean>(" + javaTypeName(idxCol.type()) + ".class, " +
-                            idxCol.descending() + "));");
+            if (!idxs.isEmpty()) {
+                add2(src, "// Indexes for " + tbl + ".");
+                add2(src, (firstIdxs ? "Collection<QueryIndex> " : "") + "idxs = new ArrayList<>();");
+                add0(src, "");
+
+                firstIdxs = false;
+
+                for (QueryIndex idx : idxs) {
+                    if (idx.getFields().size() == 1) {
+                        Map.Entry<String, Boolean> fld = F.first(idx.getFields().entrySet());
+
+                        add2(src, "idxs.add(new QueryIndex(\"" + fld.getKey() + "\", " + fld.getValue() + ", \"" +
+                            idx.getName()  + "\"));");
+                        add0(src, "");
                     }
+                    else {
+                        add2(src, (firstIdx ? "QueryIndex " : "") + "idx = new QueryIndex();");
+                        add0(src, "");
 
-                    add0(src, "");
-                    add2(src, "grps.put(\"" + group.getKey() + "\", grpItems);");
-                    add0(src, "");
+                        add2(src, "idx.setName(\"" + idx.getName() + "\");");
+                        add0(src, "");
 
-                    firstGrp = false;
+                        add2(src, (firstIdx ? "LinkedHashMap<String, Boolean> " : "") +
+                            "idxFlds = new LinkedHashMap<>();");
+                        add0(src, "");
+
+                        for (Map.Entry<String, Boolean> idxFld : idx.getFields().entrySet())
+                            add2(src, "idxFlds.put(\"" + idxFld.getKey()  + "\", " + idxFld.getValue() + ");");
+
+                        add0(src, "");
+
+                        add2(src, "idx.setFields(idxFlds);");
+                        add0(src, "");
+
+                        add2(src, "idxs.add(idx);");
+                        add0(src, "");
+
+                        firstIdx = false;
+                    }
                 }
 
-                add2(src, "type.setGroups(grps);");
+                add2(src, "qryEntity.setIndexes(idxs);");
                 add0(src, "");
             }
 
-            add2(src, "ccfg.setTypeMetadata(meta);");
+            add2(src, "ccfg.setQueryEntities(qryEntities);");
             add0(src, "");
 
             first = false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
index bc9bab7..547e7b0 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
@@ -35,10 +35,11 @@ import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
-import org.apache.ignite.cache.CacheTypeFieldMetadata;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.lang.IgniteBiTuple;
-import org.apache.ignite.schema.model.IndexItem;
+import org.apache.ignite.cache.QueryEntity;
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
+import org.apache.ignite.cache.store.jdbc.JdbcType;
+import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
 import org.apache.ignite.schema.model.PojoDescriptor;
 import org.apache.ignite.schema.model.PojoField;
 import org.apache.ignite.schema.ui.ConfirmCallable;
@@ -166,20 +167,20 @@ public class XmlGenerator {
      * @param name Property name.
      * @param fields Collection of POJO fields.
      */
-    private static void addFields(Document doc, Node parent, String name, Collection<PojoField> fields) {
+    private static void addJdbcFields(Document doc, Node parent, String name, Collection<PojoField> fields) {
         if (!fields.isEmpty()) {
             Element prop = addProperty(doc, parent, name, null);
 
             Element list = addElement(doc, prop, "list");
 
             for (PojoField field : fields) {
-                Element item = addBean(doc, list, CacheTypeFieldMetadata.class);
+                Element item = addBean(doc, list, JdbcTypeField.class);
 
-                addProperty(doc, item, "databaseName", field.dbName());
-                Element dbType = addProperty(doc, item, "databaseType", null);
+                Element dbType = addProperty(doc, item, "databaseFieldType", null);
                 addElement(doc, dbType, "util:constant", "static-field", "java.sql.Types." + field.dbTypeName());
-                addProperty(doc, item, "javaName", field.javaName());
-                addProperty(doc, item, "javaType", field.javaTypeName());
+                addProperty(doc, item, "databaseFieldName", field.dbName());
+                addProperty(doc, item, "javaFieldType", field.javaTypeName());
+                addProperty(doc, item, "javaFieldName", field.javaName());
             }
         }
     }
@@ -189,14 +190,13 @@ public class XmlGenerator {
      *
      * @param doc XML document.
      * @param parent Parent XML node.
-     * @param name Property name.
      * @param fields Map with fields.
      */
-    private static void addQueryFields(Document doc, Node parent, String name, Collection<PojoField> fields) {
+    private static void addQueryFields(Document doc, Node parent, Collection<PojoField> fields) {
         if (!fields.isEmpty()) {
-            Element prop = addProperty(doc, parent, name, null);
+            Element prop = addProperty(doc, parent, "fields", null);
 
-            Element map = addElement(doc, prop, "map");
+            Element map = addElement(doc, prop, "util:map", "map-class", "java.util.LinkedHashMap");
 
             for (PojoField field : fields)
                 addElement(doc, map, "entry", "key", field.javaName(), "value", field.javaTypeName());
@@ -208,47 +208,45 @@ public class XmlGenerator {
      *
      * @param doc XML document.
      * @param parent Parent XML node.
-     * @param groups Map with indexes.
+     * @param idxs Indexes.
      */
-    private static void addQueryGroups(Document doc, Node parent,
-        Map<String, Map<String, IndexItem>> groups) {
-        if (!groups.isEmpty()) {
-            Element prop = addProperty(doc, parent, "groups", null);
+    private static void addQueryIndexes(Document doc, Node parent, Collection<QueryIndex> idxs) {
+        if (!idxs.isEmpty()) {
+            Element prop = addProperty(doc, parent, "indexes", null);
 
-            Element map = addElement(doc, prop, "map");
+            Element list = addElement(doc, prop, "list");
 
-            for (Map.Entry<String, Map<String, IndexItem>> group : groups.entrySet()) {
-                Element entry1 = addElement(doc, map, "entry", "key", group.getKey());
+            for (QueryIndex idx : idxs) {
+                Element idxBean = addBean(doc, list, QueryIndex.class);
 
-                Element val1 = addElement(doc, entry1, "map");
+                addProperty(doc, idxBean, "name", idx.getName());
 
-                Map<String, IndexItem> grpItems = group.getValue();
+                Element idxType = addProperty(doc, idxBean, "indexType", null);
+                addElement(doc, idxType, "util:constant", "static-field", "org.apache.ignite.cache.QueryIndexType." + idx.getIndexType());
 
-                for (Map.Entry<String, IndexItem> grpItem : grpItems.entrySet()) {
-                    Element entry2 = addElement(doc, val1, "entry", "key", grpItem.getKey());
+                Element flds = addProperty(doc, idxBean, "fields", null);
 
-                    Element val2 = addBean(doc, entry2, IgniteBiTuple.class);
+                Element fldsMap = addElement(doc, flds, "map");
 
-                    IndexItem idxCol = grpItem.getValue();
+                Map<String, Boolean> idxFlds = idx.getFields();
 
-                    addElement(doc, val2, "constructor-arg", null, null, "value", idxCol.type());
-                    addElement(doc, val2, "constructor-arg", null, null, "value", String.valueOf(idxCol.descending()));
-                }
+                for (Map.Entry<String, Boolean> fld : idxFlds.entrySet())
+                    addElement(doc, fldsMap, "entry", "key", fld.getKey(), "value", fld.getValue().toString());
             }
         }
     }
 
     /**
-     * Add element with type metadata to XML document.
+     * Add element with JDBC POJO store factory to XML document.
      *
      * @param doc XML document.
      * @param parent Parent XML node.
      * @param pkg Package fo types.
      * @param pojo POJO descriptor.
      */
-    private static void addTypeMetadata(Document doc, Node parent, String pkg, PojoDescriptor pojo,
+    private static void addJdbcPojoStoreFactory(Document doc, Node parent, String pkg, PojoDescriptor pojo,
         boolean includeKeys) {
-        Element bean = addBean(doc, parent, CacheTypeMetadata.class);
+        Element bean = addBean(doc, parent, JdbcType.class);
 
         addProperty(doc, bean, "databaseSchema", pojo.schema());
 
@@ -258,17 +256,29 @@ public class XmlGenerator {
 
         addProperty(doc, bean, "valueType", pkg + "." + pojo.valueClassName());
 
-        addFields(doc, bean, "keyFields", pojo.keyFields());
+        addJdbcFields(doc, bean, "keyFields", pojo.keyFields());
 
-        addFields(doc, bean, "valueFields", pojo.valueFields(includeKeys));
+        addJdbcFields(doc, bean, "valueFields", pojo.valueFields(includeKeys));
+    }
 
-        addQueryFields(doc, bean, "queryFields", pojo.fields());
+    /**
+     * Add element with query entity to XML document.
+     *
+     * @param doc XML document.
+     * @param parent Parent XML node.
+     * @param pkg Package fo types.
+     * @param pojo POJO descriptor.
+     */
+    private static void addQueryEntity(Document doc, Node parent, String pkg, PojoDescriptor pojo) {
+        Element bean = addBean(doc, parent, QueryEntity.class);
+
+        addProperty(doc, bean, "keyType", pkg + "." + pojo.keyClassName());
 
-        addQueryFields(doc, bean, "ascendingFields", pojo.ascendingFields());
+        addProperty(doc, bean, "valueType", pkg + "." + pojo.valueClassName());
 
-        addQueryFields(doc, bean, "descendingFields", pojo.descendingFields());
+        addQueryFields(doc, bean, pojo.fields());
 
-        addQueryGroups(doc, bean, pojo.groups());
+        addQueryIndexes(doc, bean, pojo.indexes());
     }
 
     /**
@@ -333,8 +343,15 @@ public class XmlGenerator {
                 "http://www.springframework.org/schema/util " +
                 "http://www.springframework.org/schema/util/spring-util.xsd");
 
+            Element factoryBean = addBean(doc, beans, CacheJdbcPojoStoreFactory.class);
+            Element typesElem = addProperty(doc, factoryBean, "types", null);
+            Element typesItemsElem = addElement(doc, typesElem, "list");
+
+            for (PojoDescriptor pojo : pojos)
+                addJdbcPojoStoreFactory(doc, typesItemsElem, pkg, pojo, includeKeys);
+
             for (PojoDescriptor pojo : pojos)
-                addTypeMetadata(doc, beans, pkg, pojo, includeKeys);
+                addQueryEntity(doc, beans, pkg, pojo);
 
             TransformerFactory transformerFactory = TransformerFactory.newInstance();
 
@@ -361,4 +378,4 @@ public class XmlGenerator {
             throw new IllegalStateException(e);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/model/IndexItem.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/IndexItem.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/IndexItem.java
deleted file mode 100644
index d51ec8f..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/IndexItem.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.model;
-
-/**
- * Index item descriptor.
- */
-public class IndexItem {
-    /** Column type. */
-    private final String type;
-
-    /** Sort direction. */
-    private final Boolean desc;
-
-    /**
-     * Constructor.
-     *
-     * @param type Column type.
-     * @param desc Sort direction.
-     */
-    public IndexItem(String type, Boolean desc) {
-        this.type = type;
-        this.desc = desc;
-    }
-
-    /**
-     * @return Column type.
-     */
-    public String type() {
-        return type;
-    }
-
-    /**
-     * @return Sort direction.
-     */
-    public Boolean descending() {
-        return desc;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
index d84643b..5053b07 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
@@ -21,12 +21,8 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleStringProperty;
@@ -35,6 +31,7 @@ import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
+import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.schema.parser.DbColumn;
 import org.apache.ignite.schema.parser.DbTable;
 
@@ -99,9 +96,6 @@ public class PojoDescriptor {
     /** Java class fields. */
     private final ObservableList<PojoField> fields;
 
-    /** Fields map for quick access. */
-    private final Map<String, PojoField> fieldsMap;
-
     /**
      * Constructor of POJO descriptor.
      *
@@ -125,8 +119,6 @@ public class PojoDescriptor {
 
         List<PojoField> flds = new ArrayList<>(cols.size());
 
-        fieldsMap = new HashMap<>(cols.size());
-
         for (DbColumn col : cols) {
             String colName = col.name();
 
@@ -137,8 +129,6 @@ public class PojoDescriptor {
             fld.owner(this);
 
             flds.add(fld);
-
-            fieldsMap.put(colName, fld);
         }
 
         fields = FXCollections.observableList(flds);
@@ -308,64 +298,12 @@ public class PojoDescriptor {
     }
 
     /**
-     * @return Ascending fields.
-     */
-    public Collection<PojoField> ascendingFields() {
-        Collection<PojoField> res = new ArrayList<>();
-
-        Set<String> asc = tbl.ascendingColumns();
-
-        for (PojoField field : fields)
-            if (field.use() && asc.contains(field.dbName()))
-                res.add(field);
-
-        return res;
-    }
-
-    /**
-     * @return Descending fields.
-     */
-    public Collection<PojoField> descendingFields() {
-        Collection<PojoField> res = new ArrayList<>();
-
-        Set<String> desc = tbl.descendingColumns();
-
-        for (PojoField field : fields)
-            if (field.use() && desc.contains(field.dbName()))
-                res.add(field);
-
-        return res;
-    }
-
-    /**
-     * Gets indexes groups.
+     * Gets indexes indexes.
      *
-     * @return Map with indexes.
+     * @return Collection with indexes.
      */
-    public Map<String, Map<String, IndexItem>> groups() {
-        Map<String, Map<String, Boolean>> idxs = tbl.indexes();
-
-        Map<String, Map<String, IndexItem>> groups = new LinkedHashMap<>(idxs.size());
-
-        for (Map.Entry<String, Map<String, Boolean>> idx : idxs.entrySet()) {
-            Map<String, Boolean> idxCols = idx.getValue();
-
-            if (idxCols.size() > 1) {
-                String idxName = idx.getKey();
-
-                Map<String, IndexItem> grp = new LinkedHashMap<>();
-
-                groups.put(idxName, grp);
-
-                for (Map.Entry<String, Boolean> idxCol : idxCols.entrySet()) {
-                    PojoField fld = fieldsMap.get(idxCol.getKey());
-
-                    grp.put(fld.javaName(), new IndexItem(fld.javaTypeName(), idxCol.getValue()));
-                }
-            }
-        }
-
-        return groups;
+    public Collection<QueryIndex> indexes() {
+        return tbl.indexes();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
index 1dc66f2..7de2247 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
@@ -55,8 +55,8 @@ public class SchemaDescriptor {
         return selected;
     }
 
-    @Override
-    public String toString() {
+    /** {@inheritDoc} */
+    @Override public String toString() {
         return schema;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
index 3ecee53..b68f90d 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
@@ -30,6 +30,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
+import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.schema.model.PojoDescriptor;
 import org.apache.ignite.schema.model.SchemaDescriptor;
 import org.apache.ignite.schema.parser.dialect.DB2MetadataDialect;
@@ -59,7 +60,7 @@ public class DatabaseMetadataParser {
                 return new OracleMetadataDialect();
             else if (dbProductName.startsWith("DB2/"))
                 return new DB2MetadataDialect();
-            else if (dbProductName.equals("MySQL"))
+            else if ("MySQL".equals(dbProductName))
                 return new MySQLMetadataDialect();
             else
                 return new JdbcMetadataDialect();
@@ -76,7 +77,7 @@ public class DatabaseMetadataParser {
      *
      * @param conn Connection to database.
      * @return List of schema descriptors.
-     * @throws SQLException If shemas loading failed.
+     * @throws SQLException If schemas loading failed.
      */
     public static ObservableList<SchemaDescriptor> schemas(Connection conn) throws SQLException  {
         List<String> dbSchemas = dialect(conn).schemas(conn);
@@ -93,7 +94,7 @@ public class DatabaseMetadataParser {
      * Parse database metadata.
      *
      * @param conn Connection to database.
-     * @param schemas Collention of schema names to load.
+     * @param schemas Collection of schema names to load.
      * @param tblsOnly If {@code true} then process tables only else process tables and views.
      * @return Collection of POJO descriptors.
      * @throws SQLException If parsing failed.
@@ -114,8 +115,7 @@ public class DatabaseMetadataParser {
 
             if (parent == null) {
                 parent = new PojoDescriptor(null, new DbTable(schema, "", Collections.<DbColumn>emptyList(),
-                    Collections.<String>emptySet(), Collections.<String>emptySet(),
-                    Collections.<String, Map<String, Boolean>>emptyMap()));
+                    Collections.<QueryIndex>emptyList()));
 
                 children = new ArrayList<>();
 
@@ -148,4 +148,4 @@ public class DatabaseMetadataParser {
 
         return FXCollections.observableList(res);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DbTable.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DbTable.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DbTable.java
index c54bfd8..39f6f7b 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DbTable.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DbTable.java
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.schema.parser;
 
+import org.apache.ignite.cache.QueryIndex;
+
 import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
 
 /**
  * Database table.
@@ -34,14 +34,8 @@ public class DbTable {
     /** Columns. */
     private final Collection<DbColumn> cols;
 
-    /** Columns in ascending order. */
-    private final Set<String> ascCols;
-
-    /** Columns in descending order. */
-    private final Set<String> descCols;
-
     /** Indexes. */
-    private final Map<String, Map<String, Boolean>> idxs;
+    private final Collection<QueryIndex> idxs;
 
     /**
      * Default columns.
@@ -49,17 +43,12 @@ public class DbTable {
      * @param schema Schema name.
      * @param tbl Table name.
      * @param cols Columns.
-     * @param ascCols Columns in ascending order.
-     * @param descCols Columns in descending order.
      * @param idxs Indexes;
      */
-    public DbTable(String schema, String tbl, Collection<DbColumn> cols, Set<String> ascCols, Set<String> descCols,
-        Map<String, Map<String, Boolean>> idxs) {
+    public DbTable(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex> idxs) {
         this.schema = schema;
         this.tbl = tbl;
         this.cols = cols;
-        this.ascCols = ascCols;
-        this.descCols = descCols;
         this.idxs = idxs;
     }
 
@@ -85,23 +74,9 @@ public class DbTable {
     }
 
     /**
-     * @return Fields in ascending order
-     */
-    public Set<String> ascendingColumns() {
-        return ascCols;
-    }
-
-    /**
-     * @return Fields in descending order
-     */
-    public Set<String> descendingColumns() {
-        return descCols;
-    }
-
-    /**
      * @return Indexes.
      */
-    public Map<String, Map<String, Boolean>> indexes() {
+    public Collection<QueryIndex> indexes() {
         return idxs;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
index 5d3a0fd..bdf309b 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
@@ -21,10 +21,10 @@ import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
+
+import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.schema.parser.DbColumn;
 import org.apache.ignite.schema.parser.DbTable;
 
@@ -45,7 +45,7 @@ public abstract class DatabaseMetadataDialect {
      * Gets tables from database.
      *
      * @param conn Database connection.
-     * @param schemas Collention of schema names to load.
+     * @param schemas Collection of schema names to load.
      * @param tblsOnly If {@code true} then gets only tables otherwise gets tables and views.
      * @return Collection of table descriptors.
      * @throws SQLException If failed to get tables.
@@ -69,27 +69,7 @@ public abstract class DatabaseMetadataDialect {
      * @param idxs Table indexes.
      * @return New {@code DbTable} instance.
      */
-    protected DbTable table(String schema, String tbl, Collection<DbColumn> cols, Map<String, Map<String, Boolean>>idxs) {
-        Set<String> ascCols = new HashSet<>();
-
-        Set<String> descCols = new HashSet<>();
-
-        for (Map<String, Boolean> idx : idxs.values()) {
-            if (idx.size() == 1)
-                for (Map.Entry<String, Boolean> idxCol : idx.entrySet()) {
-                    String colName = idxCol.getKey();
-
-                    Boolean desc = idxCol.getValue();
-
-                    if (desc != null) {
-                        if (desc)
-                            descCols.add(colName);
-                        else
-                            ascCols.add(colName);
-                    }
-                }
-        }
-
-        return new DbTable(schema, tbl, cols, ascCols, descCols, idxs);
+    protected DbTable table(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex>idxs) {
+        return new DbTable(schema, tbl, cols, idxs);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
index 6f41195..45f0f9f 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
@@ -28,6 +28,9 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.QueryIndexType;
 import org.apache.ignite.schema.parser.DbColumn;
 import org.apache.ignite.schema.parser.DbTable;
 
@@ -115,7 +118,7 @@ public class JdbcMetadataDialect extends DatabaseMetadataDialect {
 
         Collection<DbTable> tbls = new ArrayList<>();
 
-        if (schemas.size() == 0)
+        if (schemas.isEmpty())
             schemas.add(null);
 
         for (String toSchema: schemas) {
@@ -154,7 +157,7 @@ public class JdbcMetadataDialect extends DatabaseMetadataDialect {
                         }
                     }
 
-                    Map<String, Map<String, Boolean>> idxs = new LinkedHashMap<>();
+                    Map<String, QueryIndex> idxs = new LinkedHashMap<>();
 
                     try (ResultSet idxRs = dbMeta.getIndexInfo(tblCatalog, tblSchema, tblName, false, true)) {
                         while (idxRs.next()) {
@@ -165,27 +168,30 @@ public class JdbcMetadataDialect extends DatabaseMetadataDialect {
                             if (idxName == null || colName == null)
                                 continue;
 
-                            Map<String, Boolean> idx = idxs.get(idxName);
+                            QueryIndex idx = idxs.get(idxName);
 
                             if (idx == null) {
-                                idx = new LinkedHashMap<>();
+                                idx = new QueryIndex();
+                                idx.setName(idxName);
+                                idx.setIndexType(QueryIndexType.SORTED);
+                                idx.setFields(new LinkedHashMap<String, Boolean>());
 
                                 idxs.put(idxName, idx);
                             }
 
                             String askOrDesc = idxRs.getString(IDX_ASC_OR_DESC_IDX);
 
-                            Boolean desc = askOrDesc != null ? "D".equals(askOrDesc) : null;
+                            Boolean asc = askOrDesc == null || "A".equals(askOrDesc);
 
-                            idx.put(colName, desc);
+                            idx.getFields().put(colName, asc);
                         }
                     }
 
-                    tbls.add(table(schema, tblName, cols, idxs));
+                    tbls.add(table(schema, tblName, cols, idxs.values()));
                 }
             }
         }
 
         return tbls;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
index cf7e979..0d4e8d6 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
@@ -31,6 +31,9 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.QueryIndexType;
 import org.apache.ignite.schema.parser.DbColumn;
 import org.apache.ignite.schema.parser.DbTable;
 
@@ -252,12 +255,12 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
      * @param stmt Prepared SQL statement to execute.
      * @param owner DB owner.
      * @param tbl Table name.
-     * @return Index columns.
+     * @return Indexes.
      * @throws SQLException If failed to retrieve indexes columns.
      */
-    private Map<String, Map<String, Boolean>> indexes(PreparedStatement stmt, String owner, String tbl)
+    private Collection<QueryIndex> indexes(PreparedStatement stmt, String owner, String tbl)
         throws SQLException {
-        Map<String, Map<String, Boolean>> idxs = new LinkedHashMap<>();
+        Map<String, QueryIndex> idxs = new LinkedHashMap<>();
 
         stmt.setString(1, owner);
         stmt.setString(2, tbl);
@@ -266,10 +269,13 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
             while (idxsRs.next()) {
                 String idxName = idxsRs.getString(IDX_NAME_IDX);
 
-                Map<String, Boolean> idx = idxs.get(idxName);
+                QueryIndex idx = idxs.get(idxName);
 
                 if (idx == null) {
-                    idx = new LinkedHashMap<>();
+                    idx = new QueryIndex();
+                    idx.setName(idxName);
+                    idx.setIndexType(QueryIndexType.SORTED);
+                    idx.setFields(new LinkedHashMap<String, Boolean>());
 
                     idxs.put(idxName, idx);
                 }
@@ -278,11 +284,11 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
 
                 String col = expr == null ? idxsRs.getString(IDX_COL_NAME_IDX) : expr.replaceAll("\"", "");
 
-                idx.put(col, "DESC".equals(idxsRs.getString(IDX_COL_DESCEND_IDX)));
+                idx.getFields().put(col, !"DESC".equals(idxsRs.getString(IDX_COL_DESCEND_IDX)));
             }
         }
 
-        return idxs;
+        return idxs.values();
     }
 
     /** {@inheritDoc} */
@@ -294,7 +300,7 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
 
         PreparedStatement idxStmt = conn.prepareStatement(SQL_INDEXES);
 
-        if (schemas.size() == 0)
+        if (schemas.isEmpty())
             schemas.add(null);
 
         Set<String> sysSchemas = systemSchemas();
@@ -307,7 +313,7 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
                 Collection<DbColumn> cols = new ArrayList<>();
 
                 Set<String> pkCols = Collections.emptySet();
-                Map<String, Map<String, Boolean>> idxs = Collections.emptyMap();
+                Collection<QueryIndex> idxs = Collections.emptyList();
 
                 String sql = String.format(SQL_COLUMNS,
                         tblsOnly ? "INNER JOIN all_tables b on a.table_name = b.table_name and a.owner = b.owner" : "",

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
index 29c8a49..a1e34a1 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
@@ -34,8 +34,8 @@ public abstract class ModalDialog extends Stage {
     protected ModalDialog(Stage owner, int width, int height) {
         this.owner = owner;
 
-        this.setWidth(width);
-        this.setHeight(height);
+        setWidth(width);
+        setHeight(height);
     }
 
     /**
@@ -47,4 +47,4 @@ public abstract class ModalDialog extends Stage {
 
         showAndWait();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
index 4f419e6..495c316 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
@@ -313,6 +313,7 @@ public class SchemaImportApp extends Application {
     /** */
     private ProgressIndicator pi;
 
+    /** */
     private ObservableList<SchemaDescriptor> schemas = FXCollections.emptyObservableList();
 
     /** List with POJOs descriptors. */
@@ -425,7 +426,7 @@ public class SchemaImportApp extends Application {
             if (schema.selected().getValue())
                 selSchemas.add(schema.schema());
 
-        if (selSchemas.size() == 0)
+        if (selSchemas.isEmpty())
             if (!MessageBox.confirmDialog(owner, "No schemas selected.\nExtract tables for all available schemas?"))
                 return;
 
@@ -944,8 +945,8 @@ public class SchemaImportApp extends Application {
         schemaPnl.wrap();
 
         schemaPnl.add(button("Load schemas", "Load schemas for specified database", new EventHandler<ActionEvent>() {
-            @Override
-            public void handle(ActionEvent evt) {
+            /** {@inheritDoc} */
+            @Override public void handle(ActionEvent evt) {
                 loadSchemas();
             }
         }));
@@ -1827,8 +1828,8 @@ public class SchemaImportApp extends Application {
      * Special list view cell to select loaded schemas.
      */
     private static class SchemaCell implements Callback<SchemaDescriptor, ObservableValue<Boolean>> {
-        @Override
-        public ObservableValue<Boolean> call(SchemaDescriptor item) {
+        /** {@inheritDoc} */
+        @Override public ObservableValue<Boolean> call(SchemaDescriptor item) {
             return item.selected();
         }
     }
@@ -1947,4 +1948,4 @@ public class SchemaImportApp extends Application {
             }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
index 8c2b046..bf0f94a 100644
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
+++ b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
@@ -48,7 +48,7 @@ public abstract class AbstractSchemaImportTest extends TestCase {
     protected static final String OUT_DIR_PATH = System.getProperty("java.io.tmpdir") + "/ignite-schema-import/out";
 
     /** Auto confirmation of file conflicts. */
-    protected ConfirmCallable askOverwrite = new ConfirmCallable(null, "") {
+    protected final ConfirmCallable askOverwrite = new ConfirmCallable(null, "") {
         @Override public MessageBox.Result confirm(String msg) {
             return YES_TO_ALL;
         }
@@ -141,4 +141,4 @@ public abstract class AbstractSchemaImportTest extends TestCase {
             return false;
         }
     }
-}
\ No newline at end of file
+}


[49/50] [abbrv] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5'

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c88ab6ff/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/c88ab6ff/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
index 79e9801,4d9456a..d4a4c62
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
@@@ -74,16 -79,22 +78,26 @@@ public class IgniteCacheP2pUnmarshallin
                  private void readObject(ObjectInputStream is) throws IOException {
                      throw new IOException();
                  }
 +
 +                private void writeObject(ObjectOutputStream os) throws IOException {
 +                    throw new IOException();
 +                }
              })).getAll();
  
-             fail("Request unmarshalling failed, but error response was not sent.");
+             assertTrue("Request unmarshalling failed, but error response was not sent.", portableMarshaller());
          }
          catch (Exception e) {
-             // No-op.
+             assertFalse("Unexpected exception: " + e, portableMarshaller());
          }
      }
+ 
+     /**
+      * @return {@code True} if portable marshaller is configured.
+      */
+     private boolean portableMarshaller() {
+         IgniteEx kernal = (IgniteEx)ignite(0);
+ 
+         return !OptimizedMarshaller.class.getSimpleName().equals(kernal.context().config().getMarshaller().getClass()
+             .getSimpleName());
+     }
  }


[22/50] [abbrv] ignite git commit: Fixed NPE in GridNioServer

Posted by sb...@apache.org.
Fixed NPE in GridNioServer


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

Branch: refs/heads/master
Commit: 5d224f192cee59b9f7dee2a0741c5b334657b845
Parents: 457ca6f
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Sat Nov 21 13:14:52 2015 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Sat Nov 21 13:14:52 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/util/nio/GridNioServer.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5d224f19/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index 384ee1a..c0f5cfc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -997,7 +997,7 @@ public class GridNioServer<T> {
 
                         finished = msg.writeTo(buf, writer);
 
-                        if (finished)
+                        if (finished && writer != null)
                             writer.reset();
                     }
 
@@ -1019,7 +1019,7 @@ public class GridNioServer<T> {
 
                         finished = msg.writeTo(buf, writer);
 
-                        if (finished)
+                        if (finished && writer != null)
                             writer.reset();
                     }
 


[23/50] [abbrv] ignite git commit: Merge branch ignite-1282 into ignite-1.5

Posted by sb...@apache.org.
Merge branch ignite-1282 into ignite-1.5


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

Branch: refs/heads/master
Commit: 13e11b32b0d4abc9a5ea9fffe6b2c56561a4f56c
Parents: 5d224f1 df859c0
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Sun Nov 22 01:44:35 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Sun Nov 22 01:44:35 2015 +0300

----------------------------------------------------------------------
 .gitignore                                      |    6 +
 assembly/release-fabric-base.xml                |   94 +
 .../config/binary/example-ignite-binary.xml     |   44 +
 examples/config/example-default.xml             |   76 +
 examples/config/example-ignite.xml              |   56 +-
 .../apache/ignite/examples/binary/Address.java  |   72 +
 .../apache/ignite/examples/binary/Employee.java |   93 +
 .../ignite/examples/binary/EmployeeKey.java     |   90 +
 .../binary/ExampleBinaryNodeStartup.java        |   36 +
 .../ignite/examples/binary/Organization.java    |   93 +
 .../examples/binary/OrganizationType.java       |   32 +
 ...ComputeClientBinaryTaskExecutionExample.java |  153 +
 .../binary/computegrid/ComputeClientTask.java   |  116 +
 .../binary/computegrid/package-info.java        |   21 +
 .../CacheClientBinaryPutGetExample.java         |  230 ++
 .../datagrid/CacheClientBinaryQueryExample.java |  330 ++
 .../examples/binary/datagrid/package-info.java  |   21 +
 .../ignite/examples/binary/package-info.java    |   21 +
 .../CacheClientPortableExampleTest.java         |   46 +
 .../ComputeClientPortableExampleTest.java       |   37 +
 .../testsuites/IgniteExamplesSelfTestSuite.java |    6 +
 .../ignite/codegen/MessageCodeGenerator.java    |   11 +-
 modules/core/pom.xml                            |   21 +
 ...processors.platform.PlatformBootstrapFactory |    2 +
 .../src/main/java/org/apache/ignite/Ignite.java |    7 +
 .../java/org/apache/ignite/IgniteBinary.java    |  357 ++
 .../java/org/apache/ignite/IgniteCache.java     |   41 +
 .../org/apache/ignite/IgniteDataStreamer.java   |   16 +
 .../org/apache/ignite/binary/BinaryField.java   |   46 +
 .../apache/ignite/binary/BinaryIdMapper.java    |   54 +
 .../binary/BinaryInvalidTypeException.java      |   58 +
 .../org/apache/ignite/binary/BinaryObject.java  |  149 +
 .../ignite/binary/BinaryObjectBuilder.java      |  135 +
 .../ignite/binary/BinaryObjectException.java    |   57 +
 .../apache/ignite/binary/BinaryRawReader.java   |  240 ++
 .../apache/ignite/binary/BinaryRawWriter.java   |  225 ++
 .../org/apache/ignite/binary/BinaryReader.java  |  290 ++
 .../apache/ignite/binary/BinarySerializer.java  |   47 +
 .../org/apache/ignite/binary/BinaryType.java    |   68 +
 .../ignite/binary/BinaryTypeConfiguration.java  |  112 +
 .../org/apache/ignite/binary/BinaryWriter.java  |  273 ++
 .../org/apache/ignite/binary/Binarylizable.java |   48 +
 .../org/apache/ignite/binary/package-info.java  |   22 +
 .../ignite/cache/CacheKeyConfiguration.java     |   92 +
 .../apache/ignite/cache/CacheTypeMetadata.java  |   67 +-
 .../org/apache/ignite/cache/QueryEntity.java    |  217 ++
 .../org/apache/ignite/cache/QueryIndex.java     |  192 +
 .../org/apache/ignite/cache/QueryIndexType.java |   38 +
 .../configuration/BinaryConfiguration.java      |  139 +
 .../configuration/CacheConfiguration.java       |  692 +++-
 .../configuration/IgniteConfiguration.java      |   75 +-
 .../configuration/PlatformConfiguration.java    |   25 +
 .../ignite/internal/GridKernalContextImpl.java  |    4 +-
 .../org/apache/ignite/internal/IgniteEx.java    |    9 -
 .../apache/ignite/internal/IgniteKernal.java    |   39 +-
 .../ignite/internal/IgniteNodeAttributes.java   |    6 +
 .../internal/client/GridClientCompute.java      |    2 +-
 .../impl/connection/GridClientConnection.java   |    2 +-
 .../GridClientConnectionManagerAdapter.java     |    2 +-
 .../connection/GridClientNioTcpConnection.java  |    6 +-
 .../communication/GridIoMessageFactory.java     |    4 +-
 .../swapspace/GridSwapSpaceManager.java         |   34 -
 .../portable/BinaryCachingMetadataHandler.java  |   70 +
 .../internal/portable/BinaryEnumCache.java      |   69 +
 .../internal/portable/BinaryFieldAccessor.java  |  805 ++++
 .../internal/portable/BinaryFieldImpl.java      |  116 +
 .../portable/BinaryInternalIdMapper.java        |  161 +
 .../internal/portable/BinaryMetadata.java       |  166 +
 .../portable/BinaryMetadataCollector.java       |  277 ++
 .../portable/BinaryMetadataHandler.java         |   44 +
 .../portable/BinaryNoopMetadataHandler.java     |   53 +
 .../internal/portable/BinaryObjectEx.java       |  245 ++
 .../internal/portable/BinaryObjectImpl.java     |  581 +++
 .../portable/BinaryObjectOffheapImpl.java       |  436 +++
 .../internal/portable/BinaryRawReaderEx.java    |   33 +
 .../internal/portable/BinaryRawWriterEx.java    |   60 +
 .../internal/portable/BinaryReaderExImpl.java   | 2748 +++++++++++++
 .../internal/portable/BinaryReaderHandles.java  |  108 +
 .../portable/BinaryThreadLocalContext.java      |   69 +
 .../internal/portable/BinaryTypeImpl.java       |   81 +
 .../internal/portable/BinaryWriteMode.java      |  178 +
 .../internal/portable/BinaryWriterExImpl.java   | 1817 +++++++++
 .../internal/portable/BinaryWriterHandles.java  |  101 +
 .../portable/BinaryWriterSchemaHolder.java      |  148 +
 .../portable/GridPortableMarshaller.java        |   67 +-
 .../portable/PortableClassDescriptor.java       | 1003 ++---
 .../internal/portable/PortableContext.java      |  542 +--
 .../portable/PortableMetaDataCollector.java     |  258 --
 .../portable/PortableMetaDataHandler.java       |   44 -
 .../internal/portable/PortableMetaDataImpl.java |  150 -
 .../internal/portable/PortableObjectEx.java     |  214 -
 .../internal/portable/PortableObjectImpl.java   |  391 --
 .../portable/PortableObjectOffheapImpl.java     |  243 --
 .../portable/PortablePositionReadable.java      |   47 +
 .../internal/portable/PortablePrimitives.java   |  779 +---
 .../internal/portable/PortableRawReaderEx.java  |   33 -
 .../internal/portable/PortableRawWriterEx.java  |   60 -
 .../portable/PortableReaderContext.java         |   82 -
 .../internal/portable/PortableReaderExImpl.java | 3157 ---------------
 .../internal/portable/PortableSchema.java       |  466 +++
 .../portable/PortableSchemaRegistry.java        |  172 +
 .../PortableThreadLocalMemoryAllocator.java     |  162 -
 .../ignite/internal/portable/PortableUtils.java |  651 +++-
 .../internal/portable/PortableWriterExImpl.java | 1854 ---------
 .../internal/portable/api/IgnitePortables.java  |  362 --
 .../internal/portable/api/PortableBuilder.java  |  136 -
 .../portable/api/PortableException.java         |   57 -
 .../internal/portable/api/PortableIdMapper.java |   54 -
 .../api/PortableInvalidClassException.java      |   58 -
 .../portable/api/PortableMarshalAware.java      |   48 -
 .../portable/api/PortableMarshaller.java        |  357 --
 .../internal/portable/api/PortableMetadata.java |   60 -
 .../internal/portable/api/PortableObject.java   |  152 -
 .../portable/api/PortableProtocolVersion.java   |   41 -
 .../portable/api/PortableRawReader.java         |  234 --
 .../portable/api/PortableRawWriter.java         |  219 --
 .../internal/portable/api/PortableReader.java   |  284 --
 .../portable/api/PortableSerializer.java        |   47 -
 .../portable/api/PortableTypeConfiguration.java |  195 -
 .../internal/portable/api/PortableWriter.java   |  266 --
 .../builder/BinaryObjectBuilderImpl.java        |  577 +++
 .../portable/builder/PortableBuilderEnum.java   |    8 +-
 .../portable/builder/PortableBuilderImpl.java   |  533 ---
 .../portable/builder/PortableBuilderReader.java |  214 +-
 .../PortableBuilderSerializationAware.java      |    2 +-
 .../builder/PortableBuilderSerializer.java      |   36 +-
 .../builder/PortableEnumArrayLazyValue.java     |   12 +-
 .../portable/builder/PortableLazyArrayList.java |    8 +-
 .../builder/PortableLazyLinkedList.java         |    8 +-
 .../portable/builder/PortableLazyMap.java       |    8 +-
 .../portable/builder/PortableLazyMapEntry.java  |    2 +-
 .../portable/builder/PortableLazySet.java       |    8 +-
 .../builder/PortableModifiableLazyValue.java    |    2 +-
 .../builder/PortableObjectArrayLazyValue.java   |    8 +-
 .../builder/PortablePlainLazyValue.java         |    2 +-
 .../builder/PortablePlainPortableObject.java    |   22 +-
 .../portable/builder/PortableValueWithType.java |   13 +-
 .../streams/PortableAbstractInputStream.java    |   48 +-
 .../streams/PortableAbstractOutputStream.java   |   44 +-
 .../streams/PortableHeapInputStream.java        |   34 +-
 .../streams/PortableHeapOutputStream.java       |  106 +-
 .../portable/streams/PortableInputStream.java   |   12 +-
 .../streams/PortableMemoryAllocator.java        |   67 +-
 .../streams/PortableMemoryAllocatorChunk.java   |  117 +
 .../streams/PortableOffheapInputStream.java     |   17 +-
 .../streams/PortableOffheapOutputStream.java    |   59 +-
 .../portable/streams/PortableOutputStream.java  |   94 +
 .../streams/PortableSimpleMemoryAllocator.java  |   66 -
 .../affinity/GridAffinityAssignmentCache.java   |    3 +-
 .../affinity/GridAffinityProcessor.java         |    5 +-
 .../processors/cache/CacheInvokeEntry.java      |   11 +-
 .../processors/cache/CacheLazyEntry.java        |   23 +-
 .../internal/processors/cache/CacheObject.java  |   11 +-
 .../processors/cache/CacheObjectAdapter.java    |    2 +-
 .../cache/CacheObjectByteArrayImpl.java         |    7 +-
 .../processors/cache/CacheObjectContext.java    |  128 +-
 .../processors/cache/CacheObjectImpl.java       |    5 +
 .../processors/cache/CacheOperationContext.java |   22 +-
 .../processors/cache/GridCacheAdapter.java      |   98 +-
 .../cache/GridCacheConcurrentMap.java           |   10 +-
 .../processors/cache/GridCacheContext.java      |   14 +-
 .../processors/cache/GridCacheEntryEx.java      |   15 +-
 .../processors/cache/GridCacheEventManager.java |   31 +-
 .../cache/GridCacheEvictionManager.java         |    5 +-
 .../processors/cache/GridCacheMapEntry.java     |  157 +-
 .../processors/cache/GridCacheMvccManager.java  |   29 +-
 .../processors/cache/GridCacheProcessor.java    |    7 +
 .../processors/cache/GridCacheProxyImpl.java    |    4 +-
 .../processors/cache/GridCacheReturn.java       |   27 +-
 .../processors/cache/GridCacheSwapManager.java  |   37 +-
 .../processors/cache/GridCacheUtils.java        |    3 +
 .../processors/cache/IgniteCacheProxy.java      |   11 +-
 .../processors/cache/IgniteInternalCache.java   |    6 +-
 .../processors/cache/KeyCacheObjectImpl.java    |    5 +
 .../CacheDataStructuresManager.java             |    4 +-
 .../GridDistributedCacheAdapter.java            |   40 +-
 .../distributed/GridDistributedCacheEntry.java  |    9 +-
 .../distributed/GridDistributedLockRequest.java |   17 +
 .../GridDistributedTxPrepareRequest.java        |    3 +-
 .../GridDistributedTxRemoteAdapter.java         |    3 +
 .../distributed/dht/GridDhtCacheEntry.java      |    5 +-
 .../distributed/dht/GridDhtLocalPartition.java  |    3 +-
 .../distributed/dht/GridDhtLockFuture.java      |   10 +-
 .../distributed/dht/GridDhtLockRequest.java     |    3 +
 .../dht/GridDhtTransactionalCacheAdapter.java   |   21 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   17 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   15 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   12 +-
 .../dht/GridPartitionedGetFuture.java           |    6 +-
 .../dht/GridPartitionedSingleGetFuture.java     |   14 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   74 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |    6 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |   42 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   15 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |   68 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |    5 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   31 +-
 .../colocated/GridDhtColocatedLockFuture.java   |   14 +-
 .../dht/preloader/GridDhtForceKeysFuture.java   |    2 +-
 .../dht/preloader/GridDhtPartitionDemander.java |    2 +-
 .../distributed/near/GridNearAtomicCache.java   |    4 +
 .../distributed/near/GridNearCacheEntry.java    |   17 +-
 .../distributed/near/GridNearGetFuture.java     |   55 +-
 .../distributed/near/GridNearLockFuture.java    |   14 +-
 .../distributed/near/GridNearLockRequest.java   |    2 +
 .../near/GridNearTransactionalCache.java        |    8 +-
 .../cache/distributed/near/GridNearTxLocal.java |    9 +-
 .../distributed/near/GridNearTxRemote.java      |   12 +-
 .../cache/local/GridLocalCacheEntry.java        |   16 +-
 .../cache/local/GridLocalLockFuture.java        |    3 +-
 .../local/atomic/GridLocalAtomicCache.java      |  108 +-
 .../CacheDefaultPortableAffinityKeyMapper.java  |    8 +-
 .../portable/CacheObjectBinaryProcessor.java    |   97 +
 .../CacheObjectBinaryProcessorImpl.java         |  848 ++++
 .../portable/CacheObjectPortableContext.java    |  133 -
 .../portable/CacheObjectPortableProcessor.java  |  103 -
 .../CacheObjectPortableProcessorImpl.java       | 1035 -----
 .../cache/portable/IgniteBinaryImpl.java        |  165 +
 .../cache/portable/IgnitePortablesImpl.java     |  177 -
 .../cache/portable/PortableMetaDataKey.java     |   82 -
 .../cache/portable/PortableMetadataKey.java     |   82 +
 .../cache/query/GridCacheQueryManager.java      |  298 +-
 .../cache/query/GridCacheQueryRequest.java      |    4 +-
 .../continuous/CacheContinuousQueryEvent.java   |   10 +-
 .../cache/store/CacheOsStoreManager.java        |    4 +-
 .../store/GridCacheStoreManagerAdapter.java     |   47 +-
 .../transactions/IgniteTransactionsImpl.java    |   10 +-
 .../cache/transactions/IgniteTxAdapter.java     |    5 +-
 .../cache/transactions/IgniteTxEntry.java       |   57 +-
 .../transactions/IgniteTxLocalAdapter.java      |  145 +-
 .../cache/transactions/IgniteTxLocalEx.java     |    1 +
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |    6 +
 .../IgniteCacheObjectProcessorImpl.java         |    9 +
 .../processors/cacheobject/NoOpBinary.java      |   75 +
 .../datastreamer/DataStreamProcessor.java       |    1 +
 .../datastreamer/DataStreamerEntry.java         |    6 +-
 .../datastreamer/DataStreamerImpl.java          |   16 +-
 .../datastreamer/DataStreamerRequest.java       |   58 +-
 .../datastreamer/DataStreamerUpdateJob.java     |   10 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   26 +-
 .../processors/hadoop/HadoopJobProperty.java    |    2 +-
 .../platform/PlatformAbstractBootstrap.java     |   48 +
 .../PlatformAbstractConfigurationClosure.java   |   61 +
 .../platform/PlatformAbstractPredicate.java     |   67 +
 .../platform/PlatformAbstractTarget.java        |  320 ++
 .../processors/platform/PlatformBootstrap.java  |   35 +
 .../platform/PlatformBootstrapFactory.java      |   37 +
 .../platform/PlatformConfiguration.java         |   25 -
 .../platform/PlatformConfigurationEx.java       |   48 +
 .../processors/platform/PlatformContext.java    |   26 +-
 .../platform/PlatformContextImpl.java           |  616 +++
 .../platform/PlatformExtendedException.java     |    4 +-
 .../processors/platform/PlatformIgnition.java   |  189 +
 .../platform/PlatformNoopProcessor.java         |    6 +
 .../processors/platform/PlatformProcessor.java  |   11 +
 .../platform/PlatformProcessorImpl.java         |  374 ++
 .../platform/cache/PlatformCache.java           | 1090 ++++++
 .../cache/PlatformCacheEntryFilterImpl.java     |  106 +
 .../cache/PlatformCacheEntryProcessorImpl.java  |  220 ++
 .../platform/cache/PlatformCacheIterator.java   |   72 +
 .../PlatformCachePartialUpdateException.java    |   59 +
 .../cache/affinity/PlatformAffinity.java        |  297 ++
 .../query/PlatformAbstractQueryCursor.java      |  192 +
 .../query/PlatformContinuousQueryImpl.java      |  235 ++
 .../PlatformContinuousQueryRemoteFilter.java    |  188 +
 .../cache/query/PlatformFieldsQueryCursor.java  |   49 +
 .../cache/query/PlatformQueryCursor.java        |   45 +
 .../cache/store/PlatformCacheStoreCallback.java |   61 +
 .../platform/cluster/PlatformClusterGroup.java  |  335 ++
 .../cluster/PlatformClusterNodeFilterImpl.java  |   78 +
 .../platform/compute/PlatformAbstractJob.java   |  156 +
 .../platform/compute/PlatformAbstractTask.java  |  206 +
 .../PlatformBalancingMultiClosureTask.java      |   83 +
 ...tformBalancingSingleClosureAffinityTask.java |   88 +
 .../PlatformBalancingSingleClosureTask.java     |   81 +
 .../PlatformBroadcastingMultiClosureTask.java   |   87 +
 .../PlatformBroadcastingSingleClosureTask.java  |   84 +
 .../platform/compute/PlatformClosureJob.java    |  104 +
 .../platform/compute/PlatformCompute.java       |  332 ++
 .../platform/compute/PlatformFullJob.java       |  220 ++
 .../platform/compute/PlatformFullTask.java      |  192 +
 .../platform/cpp/PlatformCppBootstrap.java      |   31 +
 .../cpp/PlatformCppBootstrapFactory.java        |   39 +
 .../cpp/PlatformCppConfigurationClosure.java    |  114 +
 .../cpp/PlatformCppConfigurationEx.java         |   82 +
 .../datastreamer/PlatformDataStreamer.java      |  227 ++
 .../PlatformStreamReceiverImpl.java             |  119 +
 .../datastructures/PlatformAtomicLong.java      |  149 +
 .../dotnet/PlatformDotNetBootstrap.java         |   31 +
 .../dotnet/PlatformDotNetBootstrapFactory.java  |   39 +
 .../dotnet/PlatformDotNetCacheStore.java        |  484 +++
 .../dotnet/PlatformDotNetConfiguration.java     |  119 -
 .../PlatformDotNetConfigurationClosure.java     |  258 ++
 .../dotnet/PlatformDotNetConfigurationEx.java   |   91 +
 .../PlatformDotNetPortableConfiguration.java    |  228 --
 ...PlatformDotNetPortableTypeConfiguration.java |  248 --
 .../platform/dotnet/PlatformDotNetService.java  |   27 +
 .../dotnet/PlatformDotNetServiceImpl.java       |   47 +
 .../events/PlatformEventFilterListenerImpl.java |  186 +
 .../platform/events/PlatformEvents.java         |  396 ++
 .../lifecycle/PlatformLifecycleBean.java        |   75 +
 .../platform/memory/PlatformAbstractMemory.java |  121 +
 .../PlatformBigEndianInputStreamImpl.java       |  136 +
 .../PlatformBigEndianOutputStreamImpl.java      |  196 +
 .../platform/memory/PlatformExternalMemory.java |   55 +
 .../memory/PlatformInputStreamImpl.java         |  351 ++
 .../memory/PlatformMemoryManagerImpl.java       |   85 +
 .../platform/memory/PlatformMemoryPool.java     |  140 +
 .../platform/memory/PlatformMemoryUtils.java    |  467 +++
 .../memory/PlatformOutputStreamImpl.java        |  342 ++
 .../platform/memory/PlatformPooledMemory.java   |   64 +
 .../platform/memory/PlatformUnpooledMemory.java |   51 +
 .../messaging/PlatformMessageFilterImpl.java    |  110 +
 .../messaging/PlatformMessageLocalFilter.java   |  102 +
 .../platform/messaging/PlatformMessaging.java   |  166 +
 .../services/PlatformAbstractService.java       |  230 ++
 .../platform/services/PlatformServices.java     |  275 ++
 .../transactions/PlatformTransactions.java      |  259 ++
 .../platform/utils/PlatformFutureUtils.java     |  397 ++
 .../platform/utils/PlatformReaderBiClosure.java |   34 +
 .../platform/utils/PlatformReaderClosure.java   |   34 +
 .../platform/utils/PlatformUtils.java           |  809 ++++
 .../platform/utils/PlatformWriterBiClosure.java |   34 +
 .../platform/utils/PlatformWriterClosure.java   |   33 +
 .../processors/query/GridQueryIndexing.java     |   18 +-
 .../processors/query/GridQueryProcessor.java    |  674 ++--
 .../client/message/GridClientTaskRequest.java   |    6 +-
 .../ignite/internal/util/GridEnumCache.java     |   56 -
 .../ignite/internal/util/IgniteUtils.java       |   34 +-
 .../marshaller/portable/BinaryMarshaller.java   |  146 +
 .../marshaller/portable/package-info.java       |   22 +
 .../platform/cpp/PlatformCppConfiguration.java  |   47 +
 .../ignite/platform/cpp/package-info.java       |   22 +
 .../PlatformDotNetBinaryConfiguration.java      |  170 +
 .../PlatformDotNetBinaryTypeConfiguration.java  |  171 +
 .../dotnet/PlatformDotNetCacheStoreFactory.java |  117 +
 .../dotnet/PlatformDotNetConfiguration.java     |   97 +
 .../dotnet/PlatformDotNetLifecycleBean.java     |   86 +
 .../ignite/platform/dotnet/package-info.java    |   22 +
 .../apache/ignite/platform/package-info.java    |   22 +
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   51 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |    2 +
 .../apache/ignite/spi/swapspace/SwapKey.java    |    9 +-
 .../resources/META-INF/classnames.properties    |  268 +-
 .../portable/BinaryFieldsAbstractSelfTest.java  |  719 ++++
 .../portable/BinaryFieldsHeapSelfTest.java      |   32 +
 .../portable/BinaryFieldsOffheapSelfTest.java   |   61 +
 .../BinaryFooterOffsetsAbstractSelfTest.java    |  206 +
 .../BinaryFooterOffsetsHeapSelfTest.java        |   32 +
 .../BinaryFooterOffsetsOffheapSelfTest.java     |   61 +
 .../portable/BinaryMarshallerSelfTest.java      | 3671 ++++++++++++++++++
 .../BinaryObjectBuilderAdditionalSelfTest.java  | 1292 ++++++
 .../portable/BinaryObjectBuilderSelfTest.java   | 1069 +++++
 .../GridPortableAffinityKeySelfTest.java        |  225 ++
 ...idPortableMarshallerCtxDisabledSelfTest.java |  248 ++
 .../portable/GridPortableMetaDataSelfTest.java  |  372 ++
 .../portable/GridPortableWildcardsSelfTest.java |  465 +++
 .../portable/TestCachingMetadataHandler.java    |   45 +
 .../GridBinaryMarshalerAwareTestClass.java      |   67 +
 .../mutabletest/GridPortableTestClasses.java    |  443 +++
 .../portable/mutabletest/package-info.java      |   22 +
 .../BinaryFieldsHeapNonCompactSelfTest.java     |   30 +
 .../BinaryFieldsOffheapNonCompactSelfTest.java  |   30 +
 ...naryFooterOffsetsHeapNonCompactSelfTest.java |   30 +
 ...yFooterOffsetsOffheapNonCompactSelfTest.java |   30 +
 .../BinaryMarshallerNonCompactSelfTest.java     |   30 +
 ...jectBuilderAdditionalNonCompactSelfTest.java |   30 +
 .../BinaryObjectBuilderNonCompactSelfTest.java  |   30 +
 .../ignite/internal/portable/package-info.java  |   22 +
 .../portable/test/GridPortableTestClass1.java   |   28 +
 .../portable/test/GridPortableTestClass2.java   |   24 +
 .../internal/portable/test/package-info.java    |   22 +
 .../test/subpackage/GridPortableTestClass3.java |   24 +
 .../portable/test/subpackage/package-info.java  |   22 +
 .../cache/CacheNearReaderUpdateTest.java        |   62 +-
 .../cache/GridCacheAbstractSelfTest.java        |    9 +-
 ...heOffHeapTieredEvictionAbstractSelfTest.java |    2 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   13 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |   30 +-
 ...IgniteCacheAbstractExecutionContextTest.java |    5 +
 ...tractDistributedByteArrayValuesSelfTest.java |    4 +
 ...naryObjectsAbstractDataStreamerSelfTest.java |  192 +
 ...aryObjectsAbstractMultiThreadedSelfTest.java |  233 ++
 .../GridCacheBinaryObjectsAbstractSelfTest.java |  981 +++++
 ...ntNodeBinaryObjectMetadataMultinodeTest.java |  295 ++
 ...CacheClientNodeBinaryObjectMetadataTest.java |  221 ++
 .../GridCachePortableStoreAbstractSelfTest.java |  300 ++
 .../GridCachePortableStoreObjectsSelfTest.java  |   55 +
 ...GridCachePortableStorePortablesSelfTest.java |   66 +
 ...ridPortableCacheEntryMemorySizeSelfTest.java |   48 +
 ...leDuplicateIndexObjectsAbstractSelfTest.java |  161 +
 .../DataStreamProcessorPortableSelfTest.java    |   71 +
 .../GridDataStreamerImplSelfTest.java           |  345 ++
 ...ridCacheAffinityRoutingPortableSelfTest.java |   54 +
 ...lyPortableDataStreamerMultiNodeSelfTest.java |   29 +
 ...rtableDataStreamerMultithreadedSelfTest.java |   47 +
 ...artitionedOnlyPortableMultiNodeSelfTest.java |   28 +
 ...tionedOnlyPortableMultithreadedSelfTest.java |   47 +
 ...AtomicNearDisabledOffheapTieredSelfTest.java |   29 +
 ...BinaryObjectsAtomicNearDisabledSelfTest.java |   51 +
 ...inaryObjectsAtomicOffheapTieredSelfTest.java |   29 +
 .../GridCacheBinaryObjectsAtomicSelfTest.java   |   51 +
 ...tionedNearDisabledOffheapTieredSelfTest.java |   30 +
 ...yObjectsPartitionedNearDisabledSelfTest.java |   51 +
 ...ObjectsPartitionedOffheapTieredSelfTest.java |   30 +
 ...idCacheBinaryObjectsPartitionedSelfTest.java |   51 +
 .../GridCacheMemoryModePortableSelfTest.java    |   36 +
 ...acheOffHeapTieredAtomicPortableSelfTest.java |   48 +
 ...eapTieredEvictionAtomicPortableSelfTest.java |   96 +
 ...heOffHeapTieredEvictionPortableSelfTest.java |   96 +
 .../GridCacheOffHeapTieredPortableSelfTest.java |   48 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 +
 ...xObjectPartitionedTransactionalSelfTest.java |   41 +
 ...sNearPartitionedByteArrayValuesSelfTest.java |   41 +
 ...sPartitionedOnlyByteArrayValuesSelfTest.java |   42 +
 ...ridCacheBinaryObjectsReplicatedSelfTest.java |   51 +
 ...idCacheBinaryObjectsAtomicLocalSelfTest.java |   32 +
 ...BinaryObjectsLocalOffheapTieredSelfTest.java |   29 +
 .../GridCacheBinaryObjectsLocalSelfTest.java    |   51 +
 .../CacheVersionedEntryAbstractTest.java        |    2 +-
 .../continuous/GridEventConsumeSelfTest.java    |  111 +-
 .../DataStreamProcessorSelfTest.java            |    8 +
 .../loadtests/hashmap/GridHashMapLoadTest.java  |    3 +-
 .../platform/PlatformComputeBinarizable.java    |   42 +
 .../PlatformComputeBinarizableArgTask.java      |  119 +
 .../platform/PlatformComputeBroadcastTask.java  |   73 +
 .../platform/PlatformComputeDecimalTask.java    |  106 +
 .../platform/PlatformComputeEchoTask.java       |  188 +
 .../ignite/platform/PlatformComputeEnum.java    |   28 +
 .../PlatformComputeJavaBinarizable.java         |   39 +
 .../platform/PlatformEventsWriteEventTask.java  |  144 +
 .../ignite/platform/PlatformMaxMemoryTask.java  |   57 +
 .../ignite/platform/PlatformMinMemoryTask.java  |   57 +
 .../lifecycle/PlatformJavaLifecycleBean.java    |   47 +
 .../lifecycle/PlatformJavaLifecycleTask.java    |   65 +
 .../file/GridFileSwapSpaceSpiSelfTest.java      |   11 +-
 .../testframework/junits/GridAbstractTest.java  |    4 +-
 .../ignite/testframework/junits/IgniteMock.java |    6 +
 .../multijvm/IgniteCacheProcessProxy.java       |    7 +-
 .../junits/multijvm/IgniteProcessProxy.java     |    4 +-
 .../IgnitePortableCacheFullApiTestSuite.java    |   37 +
 .../IgnitePortableCacheTestSuite.java           |  103 +
 .../IgnitePortableObjectsTestSuite.java         |  110 +
 .../ignite/portable/test1/1.1/test1-1.1.jar     |  Bin 0 -> 2548 bytes
 .../ignite/portable/test1/1.1/test1-1.1.pom     |    9 +
 .../portable/test1/maven-metadata-local.xml     |   12 +
 .../ignite/portable/test2/1.1/test2-1.1.jar     |  Bin 0 -> 1361 bytes
 .../ignite/portable/test2/1.1/test2-1.1.pom     |    9 +
 .../portable/test2/maven-metadata-local.xml     |   12 +
 .../HadoopDefaultMapReducePlannerSelfTest.java  |    6 -
 .../processors/query/h2/IgniteH2Indexing.java   |   25 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    |    8 +-
 .../query/h2/opt/GridLuceneIndex.java           |    4 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |    3 +-
 ...CacheOffheapTieredMultithreadedSelfTest.java |   25 +-
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |   22 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   22 +-
 .../query/IgniteSqlSplitterSelfTest.java        |   54 +
 .../h2/GridIndexingSpiAbstractSelfTest.java     |    7 +-
 .../IgnitePortableCacheQueryTestSuite.java      |  117 +
 modules/platform/licenses/apache-2.0.txt        |  202 -
 modules/platform/pom.xml                        |   80 -
 modules/platform/src/main/cpp/README.txt        |  103 -
 .../platform/src/main/cpp/common/Makefile.am    |   45 -
 .../platform/src/main/cpp/common/configure.ac   |   62 -
 .../src/main/cpp/common/ignite-common.pc.in     |    9 -
 .../src/main/cpp/common/include/Makefile.am     |   22 -
 .../common/include/ignite/common/concurrent.h   |  210 -
 .../cpp/common/include/ignite/common/exports.h  |  145 -
 .../cpp/common/include/ignite/common/java.h     |  652 ----
 .../cpp/common/os/linux/include/Makefile.am     |   21 -
 .../os/linux/include/ignite/common/common.h     |   81 -
 .../linux/include/ignite/common/concurrent_os.h |  394 --
 .../src/main/cpp/common/os/linux/src/common.cpp |   59 -
 .../cpp/common/os/linux/src/concurrent_os.cpp   |  175 -
 .../os/win/include/ignite/common/common.h       |   56 -
 .../win/include/ignite/common/concurrent_os.h   |  406 --
 .../src/main/cpp/common/os/win/src/common.cpp   |   65 -
 .../cpp/common/os/win/src/concurrent_os.cpp     |  151 -
 .../src/main/cpp/common/project/README.TXT      |    1 -
 .../src/main/cpp/common/project/vs/README.TXT   |    1 -
 .../main/cpp/common/project/vs/common.vcxproj   |  202 -
 .../common/project/vs/common.vcxproj.filters    |   54 -
 .../src/main/cpp/common/project/vs/module.def   |   99 -
 .../src/main/cpp/common/project/vs/targetver.h  |   25 -
 .../src/main/cpp/common/src/concurrent.cpp      |   94 -
 .../src/main/cpp/common/src/exports.cpp         |  413 --
 .../platform/src/main/cpp/common/src/java.cpp   | 2205 -----------
 .../platform/src/main/cpp/core-test/Makefile.am |   49 -
 .../main/cpp/core-test/config/cache-query.xml   |   91 -
 .../main/cpp/core-test/config/cache-test.xml    |  129 -
 .../src/main/cpp/core-test/configure.ac         |   62 -
 .../src/main/cpp/core-test/include/Makefile.am  |   22 -
 .../include/ignite/portable_test_defs.h         |  320 --
 .../include/ignite/portable_test_utils.h        |  516 ---
 .../cpp/core-test/include/teamcity_messages.h   |   55 -
 .../src/main/cpp/core-test/project/README.TXT   |    1 -
 .../main/cpp/core-test/project/vs/README.TXT    |    1 -
 .../cpp/core-test/project/vs/core-test.vcxproj  |  174 -
 .../project/vs/core-test.vcxproj.filters        |   68 -
 .../main/cpp/core-test/src/cache_query_test.cpp |  656 ----
 .../src/main/cpp/core-test/src/cache_test.cpp   |  486 ---
 .../main/cpp/core-test/src/concurrent_test.cpp  |  186 -
 .../cpp/core-test/src/handle_registry_test.cpp  |  176 -
 .../main/cpp/core-test/src/ignition_test.cpp    |  102 -
 .../src/portable_reader_writer_raw_test.cpp     | 1532 --------
 .../src/portable_reader_writer_test.cpp         | 1951 ----------
 .../cpp/core-test/src/portable_session_test.cpp |  257 --
 .../cpp/core-test/src/portable_test_defs.cpp    |   65 -
 .../main/cpp/core-test/src/teamcity_boost.cpp   |  159 -
 .../cpp/core-test/src/teamcity_messages.cpp     |  150 -
 modules/platform/src/main/cpp/core/Makefile.am  |   66 -
 modules/platform/src/main/cpp/core/configure.ac |   62 -
 modules/platform/src/main/cpp/core/ignite.pc.in |    9 -
 .../src/main/cpp/core/include/Makefile.am       |   61 -
 .../main/cpp/core/include/ignite/cache/cache.h  | 1153 ------
 .../cpp/core/include/ignite/cache/cache_entry.h |  118 -
 .../core/include/ignite/cache/cache_peek_mode.h |   71 -
 .../cpp/core/include/ignite/cache/query/query.h |   27 -
 .../include/ignite/cache/query/query_argument.h |  125 -
 .../include/ignite/cache/query/query_cursor.h   |  191 -
 .../include/ignite/cache/query/query_scan.h     |  151 -
 .../core/include/ignite/cache/query/query_sql.h |  253 --
 .../include/ignite/cache/query/query_text.h     |  159 -
 .../src/main/cpp/core/include/ignite/guid.h     |  112 -
 .../src/main/cpp/core/include/ignite/ignite.h   |  154 -
 .../core/include/ignite/ignite_configuration.h  |   92 -
 .../main/cpp/core/include/ignite/ignite_error.h |  260 --
 .../src/main/cpp/core/include/ignite/ignition.h |  195 -
 .../core/include/ignite/impl/cache/cache_impl.h |  418 --
 .../ignite/impl/cache/query/query_impl.h        |  115 -
 .../core/include/ignite/impl/handle_registry.h  |  202 -
 .../include/ignite/impl/ignite_environment.h    |  130 -
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  146 -
 .../core/include/ignite/impl/interop/interop.h  |   25 -
 .../ignite/impl/interop/interop_input_stream.h  |  234 --
 .../ignite/impl/interop/interop_memory.h        |  280 --
 .../ignite/impl/interop/interop_output_stream.h |  234 --
 .../cpp/core/include/ignite/impl/operations.h   |  452 ---
 .../ignite/impl/portable/portable_common.h      |  146 -
 .../ignite/impl/portable/portable_id_resolver.h |  106 -
 .../impl/portable/portable_metadata_handler.h   |  102 -
 .../impl/portable/portable_metadata_manager.h   |  120 -
 .../impl/portable/portable_metadata_snapshot.h  |  122 -
 .../impl/portable/portable_metadata_updater.h   |   53 -
 .../portable/portable_metadata_updater_impl.h   |   65 -
 .../ignite/impl/portable/portable_reader_impl.h | 1130 ------
 .../ignite/impl/portable/portable_utils.h       |  344 --
 .../ignite/impl/portable/portable_writer_impl.h |  859 ----
 .../cpp/core/include/ignite/portable/portable.h |   29 -
 .../include/ignite/portable/portable_consts.h   |  106 -
 .../ignite/portable/portable_containers.h       |  525 ---
 .../ignite/portable/portable_raw_reader.h       |  324 --
 .../ignite/portable/portable_raw_writer.h       |  300 --
 .../include/ignite/portable/portable_reader.h   |  355 --
 .../include/ignite/portable/portable_type.h     |  293 --
 .../include/ignite/portable/portable_writer.h   |  335 --
 .../main/cpp/core/os/linux/include/Makefile.am  |   20 -
 .../core/os/linux/include/ignite/impl/utils.h   |  155 -
 .../main/cpp/core/os/linux/src/impl/utils.cpp   |  439 ---
 .../cpp/core/os/win/include/ignite/impl/utils.h |  155 -
 .../src/main/cpp/core/os/win/src/impl/utils.cpp |  453 ---
 .../src/main/cpp/core/project/README.TXT        |    1 -
 .../src/main/cpp/core/project/vs/README.TXT     |    1 -
 .../src/main/cpp/core/project/vs/core.vcxproj   |  272 --
 .../cpp/core/project/vs/core.vcxproj.filters    |  246 --
 modules/platform/src/main/cpp/core/src/guid.cpp |   65 -
 .../platform/src/main/cpp/core/src/ignite.cpp   |   43 -
 .../src/main/cpp/core/src/ignite_error.cpp      |  222 --
 .../platform/src/main/cpp/core/src/ignition.cpp |  468 ---
 .../main/cpp/core/src/impl/cache/cache_impl.cpp |  388 --
 .../core/src/impl/cache/query/query_impl.cpp    |  193 -
 .../main/cpp/core/src/impl/handle_registry.cpp  |  234 --
 .../cpp/core/src/impl/ignite_environment.cpp    |  167 -
 .../src/main/cpp/core/src/impl/ignite_impl.cpp  |   42 -
 .../src/impl/interop/interop_input_stream.cpp   |  215 -
 .../core/src/impl/interop/interop_memory.cpp    |  182 -
 .../src/impl/interop/interop_output_stream.cpp  |  215 -
 .../impl/portable/portable_metadata_handler.cpp |   78 -
 .../impl/portable/portable_metadata_manager.cpp |  201 -
 .../portable/portable_metadata_snapshot.cpp     |   70 -
 .../impl/portable/portable_metadata_updater.cpp |   32 -
 .../portable/portable_metadata_updater_impl.cpp |   94 -
 .../src/impl/portable/portable_reader_impl.cpp  |  683 ----
 .../core/src/impl/portable/portable_utils.cpp   |  214 -
 .../src/impl/portable/portable_writer_impl.cpp  |  600 ---
 .../core/src/portable/portable_containers.cpp   |   76 -
 .../core/src/portable/portable_raw_reader.cpp   |  135 -
 .../core/src/portable/portable_raw_writer.cpp   |  147 -
 .../cpp/core/src/portable/portable_reader.cpp   |  142 -
 .../cpp/core/src/portable/portable_type.cpp     |   51 -
 .../cpp/core/src/portable/portable_writer.cpp   |  154 -
 .../platform/src/main/cpp/project/vs/ignite.sln |   48 -
 .../Apache.Ignite.Core.csproj                   |  376 --
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |   67 -
 .../Cache/CacheEntryProcessorException.cs       |   79 -
 .../Apache.Ignite.Core/Cache/CacheException.cs  |   68 -
 .../Cache/CachePartialUpdateException.cs        |  119 -
 .../Apache.Ignite.Core/Cache/CachePeekMode.cs   |   68 -
 .../Cache/Event/CacheEntryEventType.cs          |   41 -
 .../Cache/Event/ICacheEntryEvent.cs             |   40 -
 .../Cache/Event/ICacheEntryEventFilter.cs       |   31 -
 .../Cache/Event/ICacheEntryEventListener.cs     |   33 -
 .../Cache/Expiry/ExpiryPolicy.cs                |   89 -
 .../Cache/Expiry/IExpiryPolicy.cs               |   59 -
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  542 ---
 .../Apache.Ignite.Core/Cache/ICacheAffinity.cs  |  161 -
 .../Apache.Ignite.Core/Cache/ICacheEntry.cs     |   37 -
 .../Cache/ICacheEntryFilter.cs                  |   34 -
 .../Cache/ICacheEntryProcessor.cs               |   45 -
 .../Cache/ICacheEntryProcessorResult.cs         |   40 -
 .../Apache.Ignite.Core/Cache/ICacheLock.cs      |   58 -
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |  486 ---
 .../Cache/IMutableCacheEntry.cs                 |   47 -
 .../Cache/Query/Continuous/ContinuousQuery.cs   |  170 -
 .../Query/Continuous/IContinuousQueryHandle.cs  |   51 -
 .../Cache/Query/IQueryCursor.cs                 |   40 -
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   82 -
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |   77 -
 .../Cache/Query/SqlFieldsQuery.cs               |   81 -
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |  119 -
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |  104 -
 .../Store/CacheParallelLoadStoreAdapter.cs      |  205 -
 .../Cache/Store/CacheStoreAdapter.cs            |  146 -
 .../Cache/Store/CacheStoreException.cs          |   66 -
 .../Cache/Store/ICacheStore.cs                  |  184 -
 .../Cache/Store/ICacheStoreSession.cs           |   42 -
 .../Cluster/ClusterGroupEmptyException.cs       |   70 -
 .../Cluster/ClusterTopologyException.cs         |   69 -
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |   80 -
 .../Apache.Ignite.Core/Cluster/IClusterGroup.cs |  229 --
 .../Cluster/IClusterMetrics.cs                  |  515 ---
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |  138 -
 .../Cluster/IClusterNodeFilter.cs               |   32 -
 .../Common/AsyncSupportedAttribute.cs           |   33 -
 .../Apache.Ignite.Core/Common/IAsyncSupport.cs  |   52 -
 .../dotnet/Apache.Ignite.Core/Common/IFuture.cs |  115 -
 .../Common/IgniteException.cs                   |   66 -
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |  138 -
 .../ComputeExecutionRejectedException.cs        |   69 -
 .../Compute/ComputeJobAdapter.cs                |  122 -
 .../Compute/ComputeJobFailoverException.cs      |   72 -
 .../Compute/ComputeJobResultPolicy.cs           |   45 -
 .../Compute/ComputeTaskAdapter.cs               |   93 -
 .../Compute/ComputeTaskCancelledException.cs    |   69 -
 .../ComputeTaskNoResultCacheAttribute.cs        |   35 -
 .../Compute/ComputeTaskSplitAdapter.cs          |   95 -
 .../Compute/ComputeTaskTimeoutException.cs      |   67 -
 .../Compute/ComputeUserUndeclaredException.cs   |   70 -
 .../Apache.Ignite.Core/Compute/ICompute.cs      |  274 --
 .../Apache.Ignite.Core/Compute/IComputeFunc.cs  |   55 -
 .../Apache.Ignite.Core/Compute/IComputeJob.cs   |   58 -
 .../Compute/IComputeJobResult.cs                |   73 -
 .../Compute/IComputeReducer.cs                  |   39 -
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |  132 -
 .../Datastream/IDataStreamer.cs                 |  206 -
 .../Datastream/IStreamReceiver.cs               |   38 -
 .../Datastream/StreamTransformer.cs             |   73 -
 .../Datastream/StreamVisitor.cs                 |   55 -
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |  176 -
 .../Events/CacheQueryExecutedEvent.cs           |   97 -
 .../Events/CacheQueryReadEvent.cs               |  134 -
 .../Events/CacheRebalancingEvent.cs             |   98 -
 .../Events/CheckpointEvent.cs                   |   50 -
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   80 -
 .../Apache.Ignite.Core/Events/EventBase.cs      |  160 -
 .../Apache.Ignite.Core/Events/EventReader.cs    |   72 -
 .../Apache.Ignite.Core/Events/EventType.cs      |  514 ---
 .../dotnet/Apache.Ignite.Core/Events/IEvent.cs  |   74 -
 .../Apache.Ignite.Core/Events/IEventFilter.cs   |   36 -
 .../dotnet/Apache.Ignite.Core/Events/IEvents.cs |  182 -
 .../Apache.Ignite.Core/Events/JobEvent.cs       |  100 -
 .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs |   50 -
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |   91 -
 .../main/dotnet/Apache.Ignite.Core/IIgnite.cs   |  168 -
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  140 -
 .../main/dotnet/Apache.Ignite.Core/Ignition.cs  |  657 ----
 .../Impl/Cache/CacheAffinityImpl.cs             |  275 --
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |  126 -
 .../Impl/Cache/CacheEntryFilterHolder.cs        |  147 -
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  145 -
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   65 -
 .../Cache/CacheEntryProcessorResultHolder.cs    |  127 -
 .../Impl/Cache/CacheEnumerable.cs               |   82 -
 .../Impl/Cache/CacheEnumerator.cs               |  117 -
 .../Impl/Cache/CacheEnumeratorProxy.cs          |  156 -
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  940 -----
 .../Apache.Ignite.Core/Impl/Cache/CacheLock.cs  |  171 -
 .../Impl/Cache/CacheMetricsImpl.cs              |  248 --
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   63 -
 .../Impl/Cache/CacheProxyImpl.cs                |  499 ---
 .../Impl/Cache/Event/CacheEntryCreateEvent.cs   |   74 -
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |   74 -
 .../Impl/Cache/Event/CacheEntryUpdateEvent.cs   |   79 -
 .../Impl/Cache/MutableCacheEntry.cs             |  163 -
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 --
 .../Query/Continuous/ContinuousQueryFilter.cs   |  125 -
 .../Continuous/ContinuousQueryFilterHolder.cs   |  118 -
 .../Continuous/ContinuousQueryHandleImpl.cs     |  216 --
 .../Query/Continuous/ContinuousQueryUtils.cs    |  115 -
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   54 -
 .../Impl/Cache/Query/QueryCursor.cs             |   50 -
 .../Impl/Cache/Store/CacheStore.cs              |  263 --
 .../Impl/Cache/Store/CacheStoreSession.cs       |   53 -
 .../Impl/Cache/Store/CacheStoreSessionProxy.cs  |   63 -
 .../Impl/Cluster/ClusterGroupImpl.cs            |  577 ---
 .../Impl/Cluster/ClusterMetricsImpl.cs          |  292 --
 .../Impl/Cluster/ClusterNodeImpl.cs             |  221 --
 .../Impl/Cluster/IClusterGroupEx.cs             |   35 -
 .../Impl/Collections/CollectionExtensions.cs    |   45 -
 .../Impl/Collections/MultiValueDictionary.cs    |  143 -
 .../Impl/Collections/ReadOnlyCollection.cs      |  102 -
 .../Impl/Collections/ReadOnlyDictionary.cs      |  149 -
 .../Impl/Common/AsyncResult.cs                  |   71 -
 .../Impl/Common/CompletedAsyncResult.cs         |   70 -
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   70 -
 .../Impl/Common/DelegateConverter.cs            |  253 --
 .../Impl/Common/DelegateTypeDescriptor.cs       |  314 --
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  286 --
 .../Impl/Common/FutureConverter.cs              |   62 -
 .../Impl/Common/FutureType.cs                   |   52 -
 .../Impl/Common/IFutureConverter.cs             |   34 -
 .../Impl/Common/IFutureInternal.cs              |   46 -
 .../Impl/Common/IgniteArgumentCheck.cs          |   76 -
 .../Impl/Common/LoadedAssembliesResolver.cs     |   96 -
 .../Impl/Common/PortableResultWrapper.cs        |   68 -
 .../Impl/Common/TypeCaster.cs                   |   72 -
 .../Closure/ComputeAbstractClosureTask.cs       |  101 -
 .../Impl/Compute/Closure/ComputeActionJob.cs    |   83 -
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |   89 -
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   56 -
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |   76 -
 .../Closure/ComputeReducingClosureTask.cs       |   61 -
 .../Compute/Closure/ComputeSingleClosureTask.cs |   48 -
 .../Compute/Closure/IComputeResourceInjector.cs |   31 -
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  213 -
 .../Impl/Compute/ComputeAsync.cs                |  261 --
 .../Impl/Compute/ComputeFunc.cs                 |  119 -
 .../Impl/Compute/ComputeImpl.cs                 |  645 ---
 .../Impl/Compute/ComputeJob.cs                  |  163 -
 .../Impl/Compute/ComputeJobHolder.cs            |  246 --
 .../Compute/ComputeJobResultGenericWrapper.cs   |   70 -
 .../Impl/Compute/ComputeJobResultImpl.cs        |   96 -
 .../Impl/Compute/ComputeOutFunc.cs              |  123 -
 .../Impl/Compute/ComputeTaskHolder.cs           |  484 ---
 .../Impl/Datastream/DataStreamerBatch.cs        |  269 --
 .../Impl/Datastream/DataStreamerEntry.cs        |   64 -
 .../Impl/Datastream/DataStreamerImpl.cs         |  832 ----
 .../Impl/Datastream/DataStreamerRemoveEntry.cs  |   48 -
 .../Impl/Datastream/StreamReceiverHolder.cs     |  144 -
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |  498 ---
 .../Impl/Events/EventsAsync.cs                  |  158 -
 .../Impl/Events/RemoteListenEventFilter.cs      |   85 -
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  204 -
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   69 -
 .../Impl/Handle/HandleRegistry.cs               |  340 --
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |   35 -
 .../Apache.Ignite.Core/Impl/IInteropCallback.cs |   34 -
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  549 ---
 .../Impl/IgniteConfigurationEx.cs               |   57 -
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |  490 ---
 .../Apache.Ignite.Core/Impl/IgniteProxy.cs      |  351 --
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  438 ---
 .../Impl/Interop/InteropDotNetConfiguration.cs  |   62 -
 .../InteropDotNetPortableConfiguration.cs       |  127 -
 .../InteropDotNetPortableTypeConfiguration.cs   |  151 -
 .../Impl/InteropExceptionHolder.cs              |   85 -
 .../Impl/LifecycleBeanHolder.cs                 |   66 -
 .../Impl/Memory/IPlatformMemory.cs              |   65 -
 .../Impl/Memory/InteropExternalMemory.cs        |   46 -
 .../Impl/Memory/InteropMemoryUtils.cs           |   38 -
 .../Memory/PlatformBigEndianMemoryStream.cs     |  483 ---
 .../Impl/Memory/PlatformMemory.cs               |   78 -
 .../Impl/Memory/PlatformMemoryManager.cs        |  107 -
 .../Impl/Memory/PlatformMemoryPool.cs           |  106 -
 .../Impl/Memory/PlatformMemoryStream.cs         |  677 ----
 .../Impl/Memory/PlatformMemoryUtils.cs          |  463 ---
 .../Impl/Memory/PlatformPooledMemory.cs         |   70 -
 .../Impl/Memory/PlatformRawMemory.cs            |   89 -
 .../Impl/Memory/PlatformUnpooledMemory.cs       |   52 -
 .../Impl/Messaging/MessageFilterHolder.cs       |  179 -
 .../Impl/Messaging/Messaging.cs                 |  262 --
 .../Impl/Messaging/MessagingAsync.cs            |   68 -
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   47 -
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  715 ----
 .../Portable/IPortableSystemTypeSerializer.cs   |   34 -
 .../Impl/Portable/IPortableTypeDescriptor.cs    |  124 -
 .../Impl/Portable/IPortableWriteAware.cs        |   34 -
 .../Impl/Portable/Io/IPortableStream.cs         |  320 --
 .../Impl/Portable/Io/PortableAbstractStream.cs  | 1298 -------
 .../Impl/Portable/Io/PortableHeapStream.cs      |  447 ---
 .../Impl/Portable/Io/PortableStreamAdapter.cs   |  114 -
 .../Metadata/IPortableMetadataHandler.cs        |   41 -
 .../Metadata/PortableHashsetMetadataHandler.cs  |   69 -
 .../Portable/Metadata/PortableMetadataHolder.cs |  149 -
 .../Portable/Metadata/PortableMetadataImpl.cs   |  200 -
 .../Impl/Portable/PortableBuilderField.cs       |   73 -
 .../Impl/Portable/PortableBuilderImpl.cs        |  923 -----
 .../Impl/Portable/PortableCollectionInfo.cs     |  251 --
 .../Impl/Portable/PortableFullTypeDescriptor.cs |  203 -
 .../Impl/Portable/PortableHandleDictionary.cs   |  187 -
 .../Portable/PortableMarshalAwareSerializer.cs  |   45 -
 .../Impl/Portable/PortableMarshaller.cs         |  603 ---
 .../Impl/Portable/PortableMode.cs               |   40 -
 .../Impl/Portable/PortableObjectHandle.cs       |   59 -
 .../PortableOrSerializableObjectHolder.cs       |   66 -
 .../Portable/PortableReaderHandleDictionary.cs  |   42 -
 .../Impl/Portable/PortableReaderImpl.cs         | 1013 -----
 .../Impl/Portable/PortableReflectiveRoutines.cs |  483 ---
 .../Portable/PortableReflectiveSerializer.cs    |  218 --
 .../Portable/PortableSurrogateTypeDescriptor.cs |  133 -
 .../Impl/Portable/PortableSystemHandlers.cs     | 1336 -------
 .../Portable/PortableSystemTypeSerializer.cs    |   62 -
 .../Impl/Portable/PortableUserObject.cs         |  385 --
 .../Impl/Portable/PortableUtils.cs              | 2039 ----------
 .../Impl/Portable/PortableWriterImpl.cs         | 1305 -------
 .../Impl/Portable/PortablesImpl.cs              |  205 -
 .../Impl/Portable/SerializableObjectHolder.cs   |   66 -
 .../Impl/Portable/TypeResolver.cs               |  227 --
 .../Impl/Resource/IResourceInjector.cs          |   27 -
 .../Impl/Resource/ResourceFieldInjector.cs      |   47 -
 .../Impl/Resource/ResourceMethodInjector.cs     |   48 -
 .../Impl/Resource/ResourceProcessor.cs          |  105 -
 .../Impl/Resource/ResourcePropertyInjector.cs   |   47 -
 .../Impl/Resource/ResourceTypeDescriptor.cs     |  291 --
 .../Impl/Services/ServiceContext.cs             |   60 -
 .../Impl/Services/ServiceDescriptor.cs          |  106 -
 .../Impl/Services/ServiceProxy.cs               |   71 -
 .../Impl/Services/ServiceProxyInvoker.cs        |  136 -
 .../Impl/Services/ServiceProxySerializer.cs     |  140 -
 .../Impl/Services/Services.cs                   |  316 --
 .../Impl/Services/ServicesAsync.cs              |   89 -
 .../Impl/Transactions/AsyncTransaction.cs       |   78 -
 .../Impl/Transactions/Transaction.cs            |  155 -
 .../Impl/Transactions/TransactionImpl.cs        |  489 ---
 .../Impl/Transactions/TransactionMetricsImpl.cs |   62 -
 .../Impl/Transactions/TransactionsImpl.cs       |  201 -
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |   42 -
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |   99 -
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        | 1154 ------
 .../Impl/Unmanaged/UnmanagedContext.cs          |   53 -
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |   68 -
 .../Impl/Unmanaged/UnmanagedTarget.cs           |   77 -
 .../Impl/Unmanaged/UnmanagedUtils.cs            | 1263 ------
 .../Lifecycle/ILifecycleBean.cs                 |   64 -
 .../Lifecycle/LifecycleEventType.cs             |   49 -
 .../Messaging/IMessageFilter.cs                 |   35 -
 .../Apache.Ignite.Core/Messaging/IMessaging.cs  |  105 -
 .../Portable/IPortableBuilder.cs                |   78 -
 .../Portable/IPortableIdMapper.cs               |   40 -
 .../Portable/IPortableMarshalAware.cs           |   39 -
 .../Portable/IPortableMetadata.cs               |   61 -
 .../Portable/IPortableNameMapper.cs             |   39 -
 .../Portable/IPortableObject.cs                 |   44 -
 .../Portable/IPortableRawReader.cs              |  264 --
 .../Portable/IPortableRawWriter.cs              |  221 --
 .../Portable/IPortableReader.cs                 |  340 --
 .../Portable/IPortableSerializer.cs             |   39 -
 .../Portable/IPortableWriter.cs                 |  259 --
 .../Apache.Ignite.Core/Portable/IPortables.cs   |  120 -
 .../Portable/PortableConfiguration.cs           |  122 -
 .../Portable/PortableException.cs               |   64 -
 .../Portable/PortableTypeConfiguration.cs       |  162 -
 .../Portable/PortableTypeNames.cs               |  115 -
 .../Properties/AssemblyInfo.cs                  |   46 -
 .../Resource/InstanceResourceAttribute.cs       |   35 -
 .../Resource/StoreSessionResourceAttribute.cs   |   32 -
 .../Apache.Ignite.Core/Services/IService.cs     |   51 -
 .../Services/IServiceContext.cs                 |   69 -
 .../Services/IServiceDescriptor.cs              |   96 -
 .../Apache.Ignite.Core/Services/IServices.cs    |  181 -
 .../Services/ServiceConfiguration.cs            |   62 -
 .../Services/ServiceInvocationException.cs      |  101 -
 .../Transactions/ITransaction.cs                |  230 --
 .../Transactions/ITransactionMetrics.cs         |   47 -
 .../Transactions/ITransactions.cs               |   73 -
 .../Transactions/TransactionConcurrency.cs      |   36 -
 .../TransactionHeuristicException.cs            |   72 -
 .../Transactions/TransactionIsolation.cs        |   41 -
 .../TransactionOptimisticException.cs           |   69 -
 .../TransactionRollbackException.cs             |   68 -
 .../Transactions/TransactionState.cs            |   70 -
 .../Transactions/TransactionTimeoutException.cs |   69 -
 .../platform/src/main/dotnet/Apache.Ignite.sln  |   68 -
 .../main/dotnet/Apache.Ignite.sln.DotSettings   |    4 -
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   76 -
 .../src/main/dotnet/Apache.Ignite/App.config    |   56 -
 .../Config/AppSettingsConfigurator.cs           |  113 -
 .../Apache.Ignite/Config/ArgsConfigurator.cs    |  164 -
 .../Apache.Ignite/Config/ConfigValueParser.cs   |   42 -
 .../Apache.Ignite/Config/IConfigurator.cs       |   34 -
 .../main/dotnet/Apache.Ignite/IgniteRunner.cs   |  171 -
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   35 -
 .../Apache.Ignite/Service/IgniteService.cs      |  219 --
 .../Apache.Ignite/Service/NativeMethods.cs      |   57 -
 .../Apache.Ignite/Service/ServiceDescription.cs |   32 -
 ...processors.platform.PlatformBootstrapFactory |    2 -
 .../platform/PlatformAbstractBootstrap.java     |   48 -
 .../PlatformAbstractConfigurationClosure.java   |   61 -
 .../platform/PlatformAbstractPredicate.java     |   67 -
 .../platform/PlatformAbstractTarget.java        |  320 --
 .../processors/platform/PlatformBootstrap.java  |   35 -
 .../platform/PlatformBootstrapFactory.java      |   37 -
 .../platform/PlatformConfigurationEx.java       |   48 -
 .../platform/PlatformContextImpl.java           |  621 ---
 .../processors/platform/PlatformIgnition.java   |  189 -
 .../platform/PlatformProcessorImpl.java         |  359 --
 .../platform/cache/PlatformCache.java           | 1090 ------
 .../cache/PlatformCacheEntryFilterImpl.java     |  106 -
 .../cache/PlatformCacheEntryProcessorImpl.java  |  220 --
 .../platform/cache/PlatformCacheIterator.java   |   72 -
 .../PlatformCachePartialUpdateException.java    |   59 -
 .../cache/affinity/PlatformAffinity.java        |  296 --
 .../query/PlatformAbstractQueryCursor.java      |  192 -
 .../query/PlatformContinuousQueryImpl.java      |  235 --
 .../PlatformContinuousQueryRemoteFilter.java    |  188 -
 .../cache/query/PlatformFieldsQueryCursor.java  |   49 -
 .../cache/query/PlatformQueryCursor.java        |   45 -
 .../cache/store/PlatformCacheStoreCallback.java |   61 -
 .../platform/cluster/PlatformClusterGroup.java  |  335 --
 .../cluster/PlatformClusterNodeFilterImpl.java  |   78 -
 .../platform/compute/PlatformAbstractJob.java   |  156 -
 .../platform/compute/PlatformAbstractTask.java  |  206 -
 .../PlatformBalancingMultiClosureTask.java      |   83 -
 ...tformBalancingSingleClosureAffinityTask.java |   88 -
 .../PlatformBalancingSingleClosureTask.java     |   81 -
 .../PlatformBroadcastingMultiClosureTask.java   |   87 -
 .../PlatformBroadcastingSingleClosureTask.java  |   84 -
 .../platform/compute/PlatformClosureJob.java    |  104 -
 .../platform/compute/PlatformCompute.java       |  332 --
 .../platform/compute/PlatformFullJob.java       |  220 --
 .../platform/compute/PlatformFullTask.java      |  192 -
 .../platform/cpp/PlatformCppBootstrap.java      |   31 -
 .../cpp/PlatformCppBootstrapFactory.java        |   39 -
 .../cpp/PlatformCppConfigurationClosure.java    |   99 -
 .../cpp/PlatformCppConfigurationEx.java         |   82 -
 .../datastreamer/PlatformDataStreamer.java      |  226 --
 .../PlatformStreamReceiverImpl.java             |  119 -
 .../dotnet/PlatformDotNetBootstrap.java         |   31 -
 .../dotnet/PlatformDotNetBootstrapFactory.java  |   39 -
 .../dotnet/PlatformDotNetCacheStore.java        |  497 ---
 .../PlatformDotNetConfigurationClosure.java     |  254 --
 .../dotnet/PlatformDotNetConfigurationEx.java   |   90 -
 .../platform/dotnet/PlatformDotNetService.java  |   27 -
 .../dotnet/PlatformDotNetServiceImpl.java       |   47 -
 .../events/PlatformEventFilterListenerImpl.java |  163 -
 .../platform/events/PlatformEvents.java         |  396 --
 .../lifecycle/PlatformLifecycleBean.java        |   75 -
 .../platform/memory/PlatformAbstractMemory.java |  121 -
 .../PlatformBigEndianInputStreamImpl.java       |  126 -
 .../PlatformBigEndianOutputStreamImpl.java      |  161 -
 .../platform/memory/PlatformExternalMemory.java |   55 -
 .../memory/PlatformInputStreamImpl.java         |  331 --
 .../memory/PlatformMemoryManagerImpl.java       |   85 -
 .../platform/memory/PlatformMemoryPool.java     |  140 -
 .../platform/memory/PlatformMemoryUtils.java    |  467 ---
 .../memory/PlatformOutputStreamImpl.java        |  267 --
 .../platform/memory/PlatformPooledMemory.java   |   64 -
 .../platform/memory/PlatformUnpooledMemory.java |   51 -
 .../messaging/PlatformMessageFilterImpl.java    |  110 -
 .../messaging/PlatformMessageLocalFilter.java   |  102 -
 .../platform/messaging/PlatformMessaging.java   |  166 -
 .../services/PlatformAbstractService.java       |  230 --
 .../platform/services/PlatformServices.java     |  275 --
 .../transactions/PlatformTransactions.java      |  259 --
 .../platform/utils/PlatformFutureUtils.java     |  397 --
 .../platform/utils/PlatformReaderBiClosure.java |   34 -
 .../platform/utils/PlatformReaderClosure.java   |   34 -
 .../platform/utils/PlatformUtils.java           |  768 ----
 .../platform/utils/PlatformWriterBiClosure.java |   34 -
 .../platform/utils/PlatformWriterClosure.java   |   33 -
 .../platform/cpp/PlatformCppConfiguration.java  |   47 -
 .../ignite/platform/cpp/package-info.java       |   22 -
 .../dotnet/PlatformDotNetCacheStoreFactory.java |  139 -
 .../dotnet/PlatformDotNetLifecycleBean.java     |  109 -
 .../ignite/platform/dotnet/package-info.java    |   22 -
 .../apache/ignite/platform/package-info.java    |   22 -
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   52 -
 .../Properties/AssemblyInfo.cs                  |   49 -
 .../TestClass.cs                                |   35 -
 .../Apache.Ignite.Core.Tests.csproj             |  225 --
 .../Cache/CacheAbstractTest.cs                  | 3252 ----------------
 .../Cache/CacheAffinityTest.cs                  |  139 -
 .../Cache/CacheDynamicStartTest.cs              |  281 --
 .../Cache/CacheEntryTest.cs                     |   69 -
 .../Cache/CacheForkedTest.cs                    |   81 -
 .../Cache/CacheLocalAtomicTest.cs               |   57 -
 .../Cache/CacheLocalTest.cs                     |   56 -
 .../CachePartitionedAtomicNearEnabledTest.cs    |   50 -
 .../Cache/CachePartitionedAtomicTest.cs         |   50 -
 .../Cache/CachePartitionedNearEnabledTest.cs    |   50 -
 .../Cache/CachePartitionedTest.cs               |   50 -
 .../Cache/CacheReplicatedAtomicTest.cs          |   60 -
 .../Cache/CacheReplicatedTest.cs                |   60 -
 .../Cache/CacheTestAsyncWrapper.cs              |  436 ---
 .../Cache/Query/CacheQueriesTest.cs             |  928 -----
 .../Continuous/ContinuousQueryAbstractTest.cs   | 1181 ------
 .../ContinuousQueryAtomicBackupTest.cs          |   33 -
 .../ContinuousQueryAtomicNoBackupTest.cs        |   34 -
 .../ContinuousQueryNoBackupAbstractTest.cs      |   72 -
 .../ContinuousQueryTransactionalBackupTest.cs   |   34 -
 .../ContinuousQueryTransactionalNoBackupTest.cs |   33 -
 .../Cache/Store/CacheParallelLoadStoreTest.cs   |  110 -
 .../Cache/Store/CacheStoreSessionTest.cs        |  285 --
 .../Cache/Store/CacheStoreTest.cs               |  510 ---
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   91 -
 .../Cache/Store/CacheTestStore.cs               |  155 -
 .../Compute/AbstractTaskTest.cs                 |  217 --
 .../Compute/ClosureTaskTest.cs                  |  390 --
 .../Compute/ComputeApiTest.cs                   | 1281 ------
 .../Compute/ComputeMultithreadedTest.cs         |  269 --
 .../Compute/FailoverTaskSelfTest.cs             |  246 --
 .../Forked/ForkedPortableClosureTaskTest.cs     |   30 -
 .../Compute/Forked/ForkedResourceTaskTest.cs    |   33 -
 .../Forked/ForkedSerializableClosureTaskTest.cs |   33 -
 .../Compute/Forked/ForkedTaskAdapterTest.cs     |   30 -
 .../Compute/IgniteExceptionTaskSelfTest.cs      |  753 ----
 .../Compute/PortableClosureTaskTest.cs          |  217 --
 .../Compute/PortableTaskTest.cs                 |  253 --
 .../Compute/ResourceTaskTest.cs                 |  568 ---
 .../Compute/SerializableClosureTaskTest.cs      |  217 --
 .../Compute/TaskAdapterTest.cs                  |  274 --
 .../Compute/TaskResultTest.cs                   |  437 ---
 .../Config/Apache.Ignite.exe.config.test        |   41 -
 .../Config/Cache/Store/cache-store-session.xml  |   80 -
 .../Config/Compute/compute-grid1.xml            |   90 -
 .../Config/Compute/compute-grid2.xml            |   63 -
 .../Config/Compute/compute-grid3.xml            |   52 -
 .../Config/Compute/compute-standalone.xml       |   87 -
 .../Config/Dynamic/dynamic-client.xml           |   51 -
 .../Config/Dynamic/dynamic-data-no-cfg.xml      |   47 -
 .../Config/Dynamic/dynamic-data.xml             |   65 -
 .../Config/Lifecycle/lifecycle-beans.xml        |   66 -
 .../Config/Lifecycle/lifecycle-no-beans.xml     |   44 -
 .../Config/cache-portables.xml                  |   78 -
 .../Config/cache-query-continuous.xml           |  171 -
 .../Config/cache-query.xml                      |  100 -
 .../Config/marshaller-default.xml               |   43 -
 .../Config/marshaller-invalid.xml               |   46 -
 .../Config/marshaller-portable.xml              |   43 -
 .../native-client-test-cache-affinity.xml       |   70 -
 .../native-client-test-cache-parallel-store.xml |   69 -
 .../Config/native-client-test-cache-store.xml   |  125 -
 .../Config/native-client-test-cache.xml         |  194 -
 .../Config/portable.xml                         |   56 -
 .../Config/start-test-grid1.xml                 |   54 -
 .../Config/start-test-grid2.xml                 |   45 -
 .../Config/start-test-grid3.xml                 |   43 -
 .../Dataload/DataStreamerTest.cs                |  592 ---
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  961 -----
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |  352 --
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  443 ---
 .../Apache.Ignite.Core.Tests/FutureTest.cs      |  278 --
 .../IgniteManagerTest.cs                        |   51 -
 .../IgniteStartStopTest.cs                      |  422 --
 .../Apache.Ignite.Core.Tests/LifecycleTest.cs   |  288 --
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |  243 --
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |   71 -
 .../Memory/InteropMemoryTest.cs                 |  213 -
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |  646 ---
 .../Portable/PortableApiSelfTest.cs             | 1787 ---------
 .../Portable/PortableSelfTest.cs                | 2078 ----------
 .../PortableConfigurationTest.cs                |  173 -
 .../Process/IIgniteProcessOutputReader.cs       |   35 -
 .../Process/IgniteProcess.cs                    |  283 --
 .../Process/IgniteProcessConsoleOutputReader.cs |   40 -
 .../Properties/AssemblyInfo.cs                  |   35 -
 .../Query/ImplicitPortablePerson.cs             |   46 -
 .../Query/NoDefPortablePerson.cs                |   35 -
 .../Query/PortablePerson.cs                     |   69 -
 .../SerializationTest.cs                        |  240 --
 .../Services/ServiceProxyTest.cs                |  741 ----
 .../Services/ServicesAsyncWrapper.cs            |  174 -
 .../Services/ServicesTest.cs                    |  823 ----
 .../Services/ServicesTestAsync.cs               |   33 -
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |   71 -
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |  292 --
 .../TypeResolverTest.cs                         |  107 -
 .../platform/PlatformComputeBroadcastTask.java  |   73 -
 .../platform/PlatformComputeDecimalTask.java    |  106 -
 .../platform/PlatformComputeEchoTask.java       |  188 -
 .../ignite/platform/PlatformComputeEnum.java    |   28 -
 .../platform/PlatformComputeJavaPortable.java   |   39 -
 .../platform/PlatformComputePortable.java       |   42 -
 .../PlatformComputePortableArgTask.java         |  121 -
 .../platform/PlatformEventsWriteEventTask.java  |  146 -
 .../ignite/platform/PlatformMaxMemoryTask.java  |   57 -
 .../ignite/platform/PlatformMinMemoryTask.java  |   57 -
 .../lifecycle/PlatformJavaLifecycleBean.java    |   47 -
 .../lifecycle/PlatformJavaLifecycleTask.java    |   65 -
 modules/platforms/cpp/README.txt                |  101 +
 modules/platforms/cpp/common/Makefile.am        |   45 +
 modules/platforms/cpp/common/configure.ac       |   62 +
 .../platforms/cpp/common/ignite-common.pc.in    |    9 +
 .../platforms/cpp/common/include/Makefile.am    |   26 +
 .../common/include/ignite/common/concurrent.h   |  237 ++
 .../cpp/common/include/ignite/common/exports.h  |  158 +
 .../cpp/common/include/ignite/common/java.h     |  679 ++++
 .../cpp/common/include/ignite/common/utils.h    |   81 +
 .../cpp/common/os/linux/include/Makefile.am     |   24 +
 .../os/linux/include/ignite/common/common.h     |   81 +
 .../linux/include/ignite/common/concurrent_os.h |  394 ++
 .../cpp/common/os/linux/src/common.cpp          |   59 +
 .../cpp/common/os/linux/src/concurrent_os.cpp   |  175 +
 .../os/win/include/ignite/common/common.h       |   56 +
 .../win/include/ignite/common/concurrent_os.h   |  406 ++
 .../platforms/cpp/common/os/win/src/common.cpp  |   65 +
 .../cpp/common/os/win/src/concurrent_os.cpp     |  151 +
 modules/platforms/cpp/common/project/README.TXT |    1 +
 .../platforms/cpp/common/project/vs/README.TXT  |    1 +
 .../cpp/common/project/vs/common.vcxproj        |  203 +
 .../common/project/vs/common.vcxproj.filters    |   57 +
 .../platforms/cpp/common/project/vs/module.def  |  111 +
 .../platforms/cpp/common/project/vs/targetver.h |   25 +
 modules/platforms/cpp/common/src/concurrent.cpp |   94 +
 modules/platforms/cpp/common/src/exports.cpp    |  461 +++
 modules/platforms/cpp/common/src/java.cpp       | 2416 ++++++++++++
 modules/platforms/cpp/core-test/Makefile.am     |   49 +
 .../cpp/core-test/config/cache-query.xml        |   91 +
 .../cpp/core-test/config/cache-test.xml         |  129 +
 modules/platforms/cpp/core-test/configure.ac    |   62 +
 .../platforms/cpp/core-test/include/Makefile.am |   22 +
 .../core-test/include/ignite/binary_test_defs.h |  320 ++
 .../include/ignite/binary_test_utils.h          |  516 +++
 .../cpp/core-test/include/teamcity_messages.h   |   55 +
 .../platforms/cpp/core-test/project/README.TXT  |    1 +
 .../cpp/core-test/project/vs/README.TXT         |    1 +
 .../cpp/core-test/project/vs/core-test.vcxproj  |  174 +
 .../project/vs/core-test.vcxproj.filters        |   68 +
 .../src/binary_reader_writer_raw_test.cpp       | 1593 ++++++++
 .../core-test/src/binary_reader_writer_test.cpp | 2373 +++++++++++
 .../cpp/core-test/src/binary_session_test.cpp   |  257 ++
 .../cpp/core-test/src/binary_test_defs.cpp      |   65 +
 .../cpp/core-test/src/cache_query_test.cpp      |  841 ++++
 .../platforms/cpp/core-test/src/cache_test.cpp  |  479 +++
 .../cpp/core-test/src/concurrent_test.cpp       |  186 +
 .../cpp/core-test/src/handle_registry_test.cpp  |  176 +
 .../cpp/core-test/src/ignition_test.cpp         |   95 +
 .../cpp/core-test/src/teamcity_boost.cpp        |  159 +
 .../cpp/core-test/src/teamcity_messages.cpp     |  150 +
 modules/platforms/cpp/core/Makefile.am          |   67 +
 modules/platforms/cpp/core/configure.ac         |   62 +
 modules/platforms/cpp/core/ignite.pc.in         |    9 +
 modules/platforms/cpp/core/include/Makefile.am  |   69 +
 .../cpp/core/include/ignite/binary/binary.h     |   29 +
 .../core/include/ignite/binary/binary_consts.h  |  106 +
 .../include/ignite/binary/binary_containers.h   |  525 +++
 .../include/ignite/binary/binary_raw_reader.h   |  350 ++
 .../include/ignite/binary/binary_raw_writer.h   |  326 ++
 .../core/include/ignite/binary/binary_reader.h  |  384 ++
 .../core/include/ignite/binary/binary_type.h    |  293 ++
 .../core/include/ignite/binary/binary_writer.h  |  362 ++
 .../cpp/core/include/ignite/cache/cache.h       | 1196 ++++++
 .../cpp/core/include/ignite/cache/cache_entry.h |  118 +
 .../core/include/ignite/cache/cache_peek_mode.h |   71 +
 .../cpp/core/include/ignite/cache/query/query.h |   28 +
 .../include/ignite/cache/query/query_argument.h |  125 +
 .../include/ignite/cache/query/query_cursor.h   |  200 +
 .../ignite/cache/query/query_fields_cursor.h    |  153 +
 .../ignite/cache/query/query_fields_row.h       |  154 +
 .../include/ignite/cache/query/query_scan.h     |  151 +
 .../core/include/ignite/cache/query/query_sql.h |  243 ++
 .../ignite/cache/query/query_sql_fields.h       |  210 +
 .../include/ignite/cache/query/query_text.h     |  160 +
 .../platforms/cpp/core/include/ignite/guid.h    |  112 +
 .../platforms/cpp/core/include/ignite/ignite.h  |  166 +
 .../core/include/ignite/ignite_configuration.h  |   66 +
 .../cpp/core/include/ignite/ignite_error.h      |  260 ++
 .../cpp/core/include/ignite/ignition.h          |  195 +
 .../include/ignite/impl/binary/binary_common.h  |  188 +
 .../ignite/impl/binary/binary_id_resolver.h     |  106 +
 .../ignite/impl/binary/binary_reader_impl.h     | 1309 +++++++
 .../include/ignite/impl/binary/binary_schema.h  |  136 +
 .../ignite/impl/binary/binary_type_handler.h    |  102 +
 .../ignite/impl/binary/binary_type_manager.h    |  120 +
 .../ignite/impl/binary/binary_type_snapshot.h   |  122 +
 .../ignite/impl/binary/binary_type_updater.h    |   53 +
 .../impl/binary/binary_type_updater_impl.h      |   65 +
 .../include/ignite/impl/binary/binary_utils.h   |  344 ++
 .../ignite/impl/binary/binary_writer_impl.h     |  913 +++++
 .../core/include/ignite/impl/cache/cache_impl.h |  428 ++
 .../impl/cache/query/query_fields_row_impl.h    |  174 +
 .../ignite/impl/cache/query/query_impl.h        |  125 +
 .../core/include/ignite/impl/handle_registry.h  |  202 +
 .../include/ignite/impl/ignite_environment.h    |  130 +
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  165 +
 .../core/include/ignite/impl/interop/interop.h  |   25 +
 .../ignite/impl/interop/interop_input_stream.h  |  250 ++
 .../ignite/impl/interop/interop_memory.h        |  280 ++
 .../ignite/impl/interop/interop_output_stream.h |  250 ++
 .../interop/interop_stream_position_guard.h     |   79 +
 .../cpp/core/include/ignite/impl/operations.h   |  452 +++
 .../cpp/core/os/linux/include/Makefile.am       |   23 +
 .../core/os/linux/include/ignite/impl/utils.h   |  155 +
 .../cpp/core/os/linux/src/impl/utils.cpp        |  439 +++
 .../cpp/core/os/win/include/ignite/impl/utils.h |  155 +
 .../cpp/core/os/win/src/impl/utils.cpp          |  453 +++
 modules/platforms/cpp/core/project/README.TXT   |    1 +
 .../platforms/cpp/core/project/vs/README.TXT    |    1 +
 .../platforms/cpp/core/project/vs/core.vcxproj  |  279 ++
 .../cpp/core/project/vs/core.vcxproj.filters    |  267 ++
 .../cpp/core/src/binary/binary_containers.cpp   |   76 +
 .../cpp/core/src/binary/binary_raw_reader.cpp   |  145 +
 .../cpp/core/src/binary/binary_raw_writer.cpp   |  147 +
 .../cpp/core/src/binary/binary_reader.cpp       |  152 +
 .../cpp/core/src/binary/binary_type.cpp         |   51 +
 .../cpp/core/src/binary/binary_writer.cpp       |  154 +
 modules/platforms/cpp/core/src/guid.cpp         |   65 +
 modules/platforms/cpp/core/src/ignite.cpp       |   43 +
 modules/platforms/cpp/core/src/ignite_error.cpp |  222 ++
 modules/platforms/cpp/core/src/ignition.cpp     |  470 +++
 .../core/src/impl/binary/binary_reader_impl.cpp |  760 ++++
 .../cpp/core/src/impl/binary/binary_schema.cpp  |  135 +
 .../src/impl/binary/binary_type_handler.cpp     |   78 +
 .../src/impl/binary/binary_type_manager.cpp     |  201 +
 .../src/impl/binary/binary_type_snapshot.cpp    |   70 +
 .../src/impl/binary/binary_type_updater.cpp     |   32 +
 .../impl/binary/binary_type_updater_impl.cpp    |   94 +
 .../cpp/core/src/impl/binary/binary_utils.cpp   |  211 +
 .../core/src/impl/binary/binary_writer_impl.cpp |  623 +++
 .../cpp/core/src/impl/cache/cache_impl.cpp      |  393 ++
 .../core/src/impl/cache/query/query_impl.cpp    |  228 ++
 .../cpp/core/src/impl/handle_registry.cpp       |  234 ++
 .../cpp/core/src/impl/ignite_environment.cpp    |  167 +
 .../platforms/cpp/core/src/impl/ignite_impl.cpp |   47 +
 .../src/impl/interop/interop_input_stream.cpp   |  235 ++
 .../core/src/impl/interop/interop_memory.cpp    |  182 +
 .../src/impl/interop/interop_output_stream.cpp  |  233 ++
 modules/platforms/cpp/examples/Makefile.am      |   39 +
 modules/platforms/cpp/examples/README.txt       |   42 +
 .../cpp/examples/config/example-cache.xml       |   77 +
 modules/platforms/cpp/examples/configure.ac     |   38 +
 .../platforms/cpp/examples/include/Makefile.am  |   21 +
 .../examples/include/ignite/examples/address.h  |  109 +
 .../include/ignite/examples/organization.h      |  111 +
 .../cpp/examples/project/vs/ignite-examples.sln |   19 +
 .../examples/project/vs/ignite-examples.vcxproj |  107 +
 .../project/vs/ignite-examples.vcxproj.filters  |   30 +
 .../cpp/examples/src/putgetexample.cpp          |  126 +
 modules/platforms/cpp/ignite/Makefile.am        |   39 +
 modules/platforms/cpp/ignite/configure.ac       |   62 +
 modules/platforms/cpp/ignite/project/README.TXT |    1 +
 .../platforms/cpp/ignite/project/vs/README.TXT  |    1 +
 .../cpp/ignite/project/vs/ignite.vcxproj        |  167 +
 .../ignite/project/vs/ignite.vcxproj.filters    |   25 +
 modules/platforms/cpp/ignite/src/ignite.cpp     |  225 ++
 modules/platforms/cpp/project/vs/ignite.sln     |   58 +
 modules/platforms/cpp/project/vs/ignite.slnrel  |   33 +
 .../platforms/cpp/project/vs/ignite_x86.slnrel  |   33 +
 .../Apache.Ignite.Benchmarks.csproj             |   92 +
 .../Apache.Ignite.Benchmarks.snk                |  Bin 0 -> 596 bytes
 .../dotnet/Apache.Ignite.Benchmarks/App.config  |   24 +
 .../Apache.Ignite.Benchmarks/BenchmarkBase.cs   |  931 +++++
 .../BenchmarkOperationDescriptor.cs             |   68 +
 .../Apache.Ignite.Benchmarks/BenchmarkRunner.cs |   94 +
 .../Apache.Ignite.Benchmarks/BenchmarkState.cs  |  106 +
 .../Apache.Ignite.Benchmarks/BenchmarkUtils.cs  |  236 ++
 .../Binary/BinarizableReadBenchmark.cs          |  125 +
 .../Binary/BinarizableWriteBenchmark.cs         |  135 +
 .../Config/benchmark.xml                        |   57 +
 .../Interop/ClosureBenchmark.cs                 |   66 +
 .../Interop/GetAsyncBenchmark.cs                |   62 +
 .../Interop/GetBenchmark.cs                     |   62 +
 .../Interop/PlatformBenchmarkBase.cs            |  121 +
 .../Interop/PutAsyncBenchmark.cs                |   58 +
 .../Interop/PutBenchmark.cs                     |   58 +
 .../Interop/TaskBenchmark.cs                    |  100 +
 .../Interop/TxBenchmark.cs                      |   65 +
 .../Apache.Ignite.Benchmarks/Model/Address.cs   |   80 +
 .../Apache.Ignite.Benchmarks/Model/Company.cs   |   89 +
 .../Model/Department.cs                         |   40 +
 .../Apache.Ignite.Benchmarks/Model/Employee.cs  |  136 +
 .../Apache.Ignite.Benchmarks/Model/Sex.cs       |   31 +
 .../Apache.Ignite.Benchmarks/Model/TestModel.cs |  111 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Result/BenchmarkConsoleResultWriter.cs      |   68 +
 .../Result/BenchmarkFileResultWriter.cs         |  323 ++
 .../Result/IBenchmarkResultWriter.cs            |   55 +
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   61 +
 .../Apache.Ignite.Core.Tests.TestDll.snk        |  Bin 0 -> 596 bytes
 .../Properties/AssemblyInfo.cs                  |   49 +
 .../TestClass.cs                                |   35 +
 .../Apache.Ignite.Core.Tests.csproj             |  259 ++
 .../Apache.Ignite.Core.Tests.nunit              |    7 +
 .../Apache.Ignite.Core.Tests.snk                |  Bin 0 -> 596 bytes
 .../Binary/BinaryBuilderSelfTest.cs             | 1721 ++++++++
 .../Binary/BinarySelfTest.cs                    | 2157 ++++++++++
 .../Binary/BinaryStructureTest.cs               |  250 ++
 .../BinaryConfigurationTest.cs                  |  173 +
 .../Cache/CacheAbstractTest.cs                  | 3265 ++++++++++++++++
 .../Cache/CacheAffinityTest.cs                  |  139 +
 .../Cache/CacheDynamicStartTest.cs              |  282 ++
 .../Cache/CacheEntryTest.cs                     |   69 +
 .../Cache/CacheForkedTest.cs                    |   81 +
 .../Cache/CacheLocalAtomicTest.cs               |   57 +
 .../Cache/CacheLocalTest.cs                     |   56 +
 .../CachePartitionedAtomicNearEnabledTest.cs    |   50 +
 .../Cache/CachePartitionedAtomicTest.cs         |   50 +
 .../Cache/CachePartitionedNearEnabledTest.cs    |   50 +
 .../Cache/CachePartitionedTest.cs               |   50 +
 .../Cache/CacheReplicatedAtomicTest.cs          |   60 +
 .../Cache/CacheReplicatedTest.cs                |   60 +
 .../Cache/CacheTestAsyncWrapper.cs              |  575 +++
 .../Cache/Query/CacheQueriesTest.cs             |  935 +++++
 .../Continuous/ContinuousQueryAbstractTest.cs   | 1238 ++++++
 .../ContinuousQueryAtomicBackupTest.cs          |   33 +
 .../ContinuousQueryAtomicNoBackupTest.cs        |   34 +
 .../ContinuousQueryNoBackupAbstractTest.cs      |   72 +
 .../ContinuousQueryTransactionalBackupTest.cs   |   34 +
 .../ContinuousQueryTransactionalNoBackupTest.cs |   33 +
 .../Cache/Store/CacheParallelLoadStoreTest.cs   |  110 +
 .../Cache/Store/CacheStoreSessionTest.cs        |  285 ++
 .../Cache/Store/CacheStoreTest.cs               |  536 +++
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   91 +
 .../Cache/Store/CacheTestStore.cs               |  155 +
 .../Compute/AbstractTaskTest.cs                 |  217 ++
 .../Compute/BinarizableClosureTaskTest.cs       |  185 +
 .../Compute/BinarizableTaskTest.cs              |  269 ++
 .../Compute/ClosureTaskTest.cs                  |  390 ++
 .../Compute/ComputeApiTest.cs                   | 1303 +++++++
 .../Compute/ComputeMultithreadedTest.cs         |  269 ++
 .../Compute/FailoverTaskSelfTest.cs             |  246 ++
 .../Forked/ForkedBinarizableClosureTaskTest.cs  |   30 +
 .../Compute/Forked/ForkedResourceTaskTest.cs    |   30 +
 .../Forked/ForkedSerializableClosureTaskTest.cs |   30 +
 .../Compute/Forked/ForkedTaskAdapterTest.cs     |   30 +
 .../Compute/IgniteExceptionTaskSelfTest.cs      |  754 ++++
 .../Compute/ResourceTaskTest.cs                 |  568 +++
 .../Compute/SerializableClosureTaskTest.cs      |  217 ++
 .../Compute/TaskAdapterTest.cs                  |  274 ++
 .../Compute/TaskResultTest.cs                   |  437 +++
 .../Config/Apache.Ignite.exe.config.test        |   41 +
 .../Config/Cache/Store/cache-store-session.xml  |   79 +
 .../Config/Compute/compute-grid1.xml            |   95 +
 .../Config/Compute/compute-grid2.xml            |   63 +
 .../Config/Compute/compute-grid3.xml            |   52 +
 .../Config/Compute/compute-standalone.xml       |   87 +
 .../Config/Dynamic/dynamic-client.xml           |   51 +
 .../Config/Dynamic/dynamic-data-no-cfg.xml      |   47 +
 .../Config/Dynamic/dynamic-data.xml             |   65 +
 .../Config/Lifecycle/lifecycle-beans.xml        |   66 +
 .../Config/Lifecycle/lifecycle-no-beans.xml     |   44 +
 .../Apache.Ignite.Core.Tests/Config/binary.xml  |   56 +
 .../Config/cache-binarizables.xml               |   78 +
 .../Config/cache-query-continuous.xml           |  171 +
 .../Config/cache-query.xml                      |  100 +
 .../Config/marshaller-default.xml               |   43 +
 .../Config/marshaller-explicit.xml              |   53 +
 .../Config/marshaller-invalid.xml               |   46 +
 .../native-client-test-cache-affinity.xml       |   70 +
 .../native-client-test-cache-parallel-store.xml |   68 +
 .../Config/native-client-test-cache-store.xml   |  121 +
 .../Config/native-client-test-cache.xml         |  143 +
 .../Config/start-test-grid1.xml                 |   54 +
 .../Config/start-test-grid2.xml                 |   45 +
 .../Config/start-test-grid3.xml                 |   43 +
 .../DataStructures/AtomicLongTest.cs            |  138 +
 .../Dataload/DataStreamerTest.cs                |  592 +++
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  956 +++++
 .../Examples/Example.cs                         |  126 +
 .../Examples/ExamplesTest.cs                    |  156 +
 .../Examples/PathUtil.cs                        |   50 +
 .../Examples/ProjectFilesTest.cs                |   49 +
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |  365 ++
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  443 +++
 .../Apache.Ignite.Core.Tests/FutureTest.cs      |  188 +
 .../IgniteManagerTest.cs                        |   51 +
 .../IgniteStartStopTest.cs                      |  426 ++
 .../Apache.Ignite.Core.Tests/IgniteTestBase.cs  |  200 +
 .../Apache.Ignite.Core.Tests/LifecycleTest.cs   |  289 ++
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |  243 ++
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |   71 +
 .../Memory/InteropMemoryTest.cs                 |  200 +
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |  644 +++
 .../Process/IIgniteProcessOutputReader.cs       |   35 +
 .../Process/IgniteProcess.cs                    |  283 ++
 .../Process/IgniteProcessConsoleOutputReader.cs |   40 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Query/BinarizablePerson.cs                  |   69 +
 .../Query/ImplicitBinarizablePerson.cs          |   46 +
 .../Query/NoDefBinarizablePerson.cs             |   35 +
 .../SerializationTest.cs                        |  240 ++
 .../Services/ServiceProxyTest.cs                |  741 ++++
 .../Services/ServicesAsyncWrapper.cs            |  182 +
 .../Services/ServicesTest.cs                    |  823 ++++
 .../Services/ServicesTestAsync.cs               |   33 +
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |   71 +
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |  306 ++
 .../TypeResolverTest.cs                         |  107 +
 .../Apache.Ignite.Core.csproj                   |  381 ++
 .../Apache.Ignite.Core/Apache.Ignite.Core.snk   |  Bin 0 -> 596 bytes
 .../Binary/BinaryConfiguration.cs               |   90 +
 .../Binary/BinaryObjectException.cs             |   64 +
 .../Binary/BinaryTypeConfiguration.cs           |  116 +
 .../Binary/BinaryTypeNames.cs                   |  121 +
 .../Apache.Ignite.Core/Binary/IBinarizable.cs   |   39 +
 .../Binary/IBinaryIdMapper.cs                   |   40 +
 .../Binary/IBinaryNameMapper.cs                 |   39 +
 .../Apache.Ignite.Core/Binary/IBinaryObject.cs  |   60 +
 .../Binary/IBinaryObjectBuilder.cs              |  310 ++
 .../Binary/IBinaryRawReader.cs                  |  223 ++
 .../Binary/IBinaryRawWriter.cs                  |  220 ++
 .../Apache.Ignite.Core/Binary/IBinaryReader.cs  |  279 ++
 .../Binary/IBinarySerializer.cs                 |   39 +
 .../Apache.Ignite.Core/Binary/IBinaryType.cs    |   52 +
 .../Apache.Ignite.Core/Binary/IBinaryWriter.cs  |  256 ++
 .../Apache.Ignite.Core/Binary/IIgniteBinary.cs  |  120 +
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |   67 +
 .../Cache/CacheEntryProcessorException.cs       |   79 +
 .../Apache.Ignite.Core/Cache/CacheException.cs  |   68 +
 .../Cache/CachePartialUpdateException.cs        |  119 +
 .../Apache.Ignite.Core/Cache/CachePeekMode.cs   |   68 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |   98 +
 .../Cache/Event/CacheEntryEventType.cs          |   41 +
 .../Cache/Event/ICacheEntryEvent.cs             |   45 +
 .../Cache/Event/ICacheEntryEventFilter.cs       |   31 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   33 +
 .../Cache/Expiry/ExpiryPolicy.cs                |   89 +
 .../Cache/Expiry/IExpiryPolicy.cs               |   63 +
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  844 ++++
 .../Apache.Ignite.Core/Cache/ICacheAffinity.cs  |  158 +
 .../Apache.Ignite.Core/Cache/ICacheEntry.cs     |   37 +
 .../Cache/ICacheEntryFilter.cs                  |   34 +
 .../Cache/ICacheEntryProcessor.cs               |   45 +
 .../Cache/ICacheEntryProcessorResult.cs         |   40 +
 .../Apache.Ignite.Core/Cache/ICacheLock.cs      |   58 +
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |  486 +++
 .../Cache/IMutableCacheEntry.cs                 |   47 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |  170 +
 .../Query/Continuous/IContinuousQueryHandle.cs  |   47 +
 .../Cache/Query/IQueryCursor.cs                 |   44 +
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   82 +
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |   76 +
 .../Cache/Query/SqlFieldsQuery.cs               |   81 +
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |  120 +
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |  104 +
 .../Store/CacheParallelLoadStoreAdapter.cs      |  207 +
 .../Cache/Store/CacheStoreAdapter.cs            |  146 +
 .../Cache/Store/CacheStoreException.cs          |   66 +
 .../Cache/Store/ICacheStore.cs                  |  184 +
 .../Cache/Store/ICacheStoreSession.cs           |   42 +
 .../Cluster/ClusterGroupEmptyException.cs       |   70 +
 .../Cluster/ClusterTopologyException.cs         |   69 +
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |   79 +
 .../Apache.Ignite.Core/Cluster/IClusterGroup.cs |  235 ++
 .../Cluster/IClusterMetrics.cs                  |  347 ++
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |  135 +
 .../Cluster/IClusterNodeFilter.cs               |   32 +
 .../Common/IgniteException.cs                   |   66 +
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |  132 +
 .../ComputeExecutionRejectedException.cs        |   69 +
 .../Compute/ComputeJobAdapter.cs                |  122 +
 .../Compute/ComputeJobFailoverException.cs      |   72 +
 .../Compute/ComputeJobResultPolicy.cs           |   45 +
 .../Compute/ComputeTaskAdapter.cs               |   95 +
 .../Compute/ComputeTaskCancelledException.cs    |   69 +
 .../ComputeTaskNoResultCacheAttribute.cs        |   35 +
 .../Compute/ComputeTaskSplitAdapter.cs          |   95 +
 .../Compute/ComputeTaskTimeoutException.cs      |   67 +
 .../Compute/ComputeUserUndeclaredException.cs   |   70 +
 .../Apache.Ignite.Core/Compute/ICompute.cs      |  431 ++
 .../Apache.Ignite.Core/Compute/IComputeFunc.cs  |   55 +
 .../Apache.Ignite.Core/Compute/IComputeJob.cs   |   59 +
 .../Compute/IComputeJobResult.cs                |   66 +
 .../Compute/IComputeReducer.cs                  |   41 +
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |  132 +
 .../DataStructures/IAtomicLong.cs               |   84 +
 .../Datastream/IDataStreamer.cs                 |  206 +
 .../Datastream/IStreamReceiver.cs               |   38 +
 .../Datastream/StreamTransformer.cs             |   73 +
 .../Datastream/StreamVisitor.cs                 |   55 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |  178 +
 .../Events/CacheQueryExecutedEvent.cs           |   99 +
 .../Events/CacheQueryReadEvent.cs               |  136 +
 .../Events/CacheRebalancingEvent.cs             |  100 +
 .../Events/CheckpointEvent.cs                   |   51 +
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   82 +
 .../Apache.Ignite.Core/Events/EventBase.cs      |  167 +
 .../Apache.Ignite.Core/Events/EventReader.cs    |   72 +
 .../Apache.Ignite.Core/Events/EventType.cs      |  595 +++
 .../dotnet/Apache.Ignite.Core/Events/IEvent.cs  |   74 +
 .../Apache.Ignite.Core/Events/IEventFilter.cs   |   33 +
 .../Apache.Ignite.Core/Events/IEventListener.cs |   34 +
 .../dotnet/Apache.Ignite.Core/Events/IEvents.cs |  259 ++
 .../Apache.Ignite.Core/Events/JobEvent.cs       |  102 +
 .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs |   51 +
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |   93 +
 .../Apache.Ignite.Core/GlobalSuppressions.cs    |  Bin 0 -> 1908 bytes
 .../dotnet/Apache.Ignite.Core/IIgnite.cs        |  168 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  143 +
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |  627 +++
 .../Impl/Binary/BinarizableSerializer.cs        |   45 +
 .../Impl/Binary/BinaryBuilderField.cs           |   89 +
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |  210 +
 .../Impl/Binary/BinaryHandleDictionary.cs       |  188 +
 .../Impl/Binary/BinaryMode.cs                   |   42 +
 .../Impl/Binary/BinaryObject.cs                 |  354 ++
 .../Impl/Binary/BinaryObjectBuilder.cs          | 1137 ++++++
 .../Impl/Binary/BinaryObjectHandle.cs           |   59 +
 .../Impl/Binary/BinaryObjectHeader.cs           |  496 +++
 .../Impl/Binary/BinaryObjectSchema.cs           |   98 +
 .../Impl/Binary/BinaryObjectSchemaField.cs      |   48 +
 .../Impl/Binary/BinaryObjectSchemaHolder.cs     |  107 +
 .../Impl/Binary/BinaryReader.cs                 |  965 +++++
 .../Impl/Binary/BinaryReaderExtensions.cs       |   52 +
 .../Impl/Binary/BinaryReaderHandleDictionary.cs |   42 +
 .../Impl/Binary/BinaryReflectiveActions.cs      |  440 +++
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |  218 ++
 .../Binary/BinarySurrogateTypeDescriptor.cs     |  162 +
 .../Impl/Binary/BinarySystemHandlers.cs         |  832 ++++
 .../Impl/Binary/BinarySystemTypeSerializer.cs   |   62 +
 .../Impl/Binary/BinaryUtils.cs                  | 1823 +++++++++
 .../Impl/Binary/BinaryWriter.cs                 | 1428 +++++++
 .../Impl/Binary/DateTimeHolder.cs               |   68 +
 .../Impl/Binary/IBinarySystemTypeSerializer.cs  |   34 +
 .../Impl/Binary/IBinaryTypeDescriptor.cs        |  133 +
 .../Impl/Binary/IBinaryWriteAware.cs            |   34 +
 .../Impl/Binary/IgniteBinary.cs                 |  192 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |  452 +++
 .../Impl/Binary/Io/BinaryStreamAdapter.cs       |  114 +
 .../Impl/Binary/Io/BinaryStreamBase.cs          | 1253 ++++++
 .../Impl/Binary/Io/IBinaryStream.cs             |  322 ++
 .../Impl/Binary/Marshaller.cs                   |  537 +++
 .../Impl/Binary/Metadata/BinaryType.cs          |  200 +
 .../Binary/Metadata/BinaryTypeHashsetHandler.cs |   69 +
 .../Impl/Binary/Metadata/BinaryTypeHolder.cs    |  147 +
 .../Impl/Binary/Metadata/IBinaryTypeHandler.cs  |   41 +
 .../Impl/Binary/SerializableObjectHolder.cs     |   73 +
 .../Impl/Binary/Structure/BinaryStructure.cs    |  332 ++
 .../Binary/Structure/BinaryStructureEntry.cs    |  128 +
 .../Structure/BinaryStructureJumpTable.cs       |  118 +
 .../Binary/Structure/BinaryStructureTracker.cs  |  140 +
 .../Binary/Structure/BinaryStructureUpdate.cs   |   84 +
 .../Impl/Binary/TypeResolver.cs                 |  231 ++
 .../Impl/Cache/CacheAffinityImpl.cs             |  275 ++
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |  127 +
 .../Impl/Cache/CacheEntryFilterHolder.cs        |  132 +
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  144 +
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   65 +
 .../Cache/CacheEntryProcessorResultHolder.cs    |  128 +
 .../Impl/Cache/CacheEnumerable.cs               |   82 +
 .../Impl/Cache/CacheEnumerator.cs               |  117 +
 .../Impl/Cache/CacheEnumeratorProxy.cs          |  159 +
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  | 1255 ++++++
 .../Apache.Ignite.Core/Impl/Cache/CacheLock.cs  |  171 +
 .../Impl/Cache/CacheMetricsImpl.cs              |  248 ++
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   64 +
 .../Impl/Cache/Event/CacheEntryCreateEvent.cs   |   80 +
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |   80 +
 .../Impl/Cache/Event/CacheEntryUpdateEvent.cs   |   85 +
 .../Impl/Cache/MutableCacheEntry.cs             |  163 +
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 ++
 .../Query/Continuous/ContinuousQueryFilter.cs   |  125 +
 .../Continuous/ContinuousQueryFilterHolder.cs   |   86 +
 .../Continuous/ContinuousQueryHandleImpl.cs     |  213 +
 .../Query/Continuous/ContinuousQueryUtils.cs    |   96 +
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   54 +
 .../Impl/Cache/Query/QueryCursor.cs             |   50 +
 .../Impl/Cache/Store/CacheStore.cs              |  263 ++
 .../Impl/Cache/Store/CacheStoreSession.cs       |   53 +
 .../Impl/Cache/Store/CacheStoreSessionProxy.cs  |   63 +
 .../Impl/Cluster/ClusterGroupImpl.cs            |  574 +++
 .../Impl/Cluster/ClusterMetricsImpl.cs          |  294 ++
 .../Impl/Cluster/ClusterNodeImpl.cs             |  222 ++
 .../Impl/Cluster/IClusterGroupEx.cs             |   35 +
 .../Impl/Collections/CollectionExtensions.cs    |   45 +
 .../Impl/Collections/MultiValueDictionary.cs    |  145 +
 .../Impl/Collections/ReadOnlyCollection.cs      |  102 +
 .../Impl/Collections/ReadOnlyDictionary.cs      |  149 +
 .../Apache.Ignite.Core/Impl/Common/Classpath.cs |  159 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   72 +
 .../Impl/Common/DelegateConverter.cs            |  269 ++
 .../Impl/Common/DelegateTypeDescriptor.cs       |  340 ++
 .../Apache.Ignite.Core/Impl/Common/Fnv1Hash.cs  |   57 +
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  128 +
 .../Impl/Common/FutureConverter.cs              |   62 +
 .../Impl/Common/FutureType.cs                   |   55 +
 .../Impl/Common/IFutureConverter.cs             |   35 +
 .../Impl/Common/IFutureInternal.cs              |   46 +
 .../Impl/Common/IgniteArgumentCheck.cs          |   77 +
 .../Impl/Common/IgniteHome.cs                   |   97 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   96 +
 .../Impl/Common/ResizeableArray.cs              |   64 +
 .../Impl/Common/TypeCaster.cs                   |   79 +
 .../Closure/ComputeAbstractClosureTask.cs       |  101 +
 .../Impl/Compute/Closure/ComputeActionJob.cs    |   82 +
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |   86 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   56 +
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |   75 +
 .../Closure/ComputeReducingClosureTask.cs       |   61 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   48 +
 .../Compute/Closure/IComputeResourceInjector.cs |   31 +
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  300 ++
 .../Impl/Compute/ComputeFunc.cs                 |  118 +
 .../Impl/Compute/ComputeImpl.cs                 |  660 ++++
 .../Impl/Compute/ComputeJob.cs                  |  162 +
 .../Impl/Compute/ComputeJobHolder.cs            |  245 ++
 .../Compute/ComputeJobResultGenericWrapper.cs   |   73 +
 .../Impl/Compute/ComputeJobResultImpl.cs        |   99 +
 .../Impl/Compute/ComputeOutFunc.cs              |  122 +
 .../Impl/Compute/ComputeTaskHolder.cs           |  505 +++
 .../Impl/DataStructures/AtomicLong.cs           |  102 +
 .../Impl/Datastream/DataStreamerBatch.cs        |  270 ++
 .../Impl/Datastream/DataStreamerEntry.cs        |   64 +
 .../Impl/Datastream/DataStreamerImpl.cs         |  840 ++++
 .../Impl/Datastream/DataStreamerRemoveEntry.cs  |   48 +
 .../Impl/Datastream/StreamReceiverHolder.cs     |  144 +
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |  648 ++++
 .../Impl/Events/RemoteListenEventFilter.cs      |   84 +
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  206 +
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   69 +
 .../Impl/Handle/HandleRegistry.cs               |  343 ++
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |   35 +
 .../Apache.Ignite.Core/Impl/IInteropCallback.cs |   34 +
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  529 +++
 .../Impl/IgniteConfigurationEx.cs               |   57 +
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |  286 ++
 .../Apache.Ignite.Core/Impl/IgniteProxy.cs      |  343 ++
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  418 ++
 .../Impl/InteropExceptionHolder.cs              |   85 +
 .../Impl/LifecycleBeanHolder.cs                 |   66 +
 .../Impl/Memory/IPlatformMemory.cs              |   65 +
 .../Impl/Memory/InteropExternalMemory.cs        |   46 +
 .../Impl/Memory/InteropMemoryUtils.cs           |   38 +
 .../Memory/PlatformBigEndianMemoryStream.cs     |  483 +++
 .../Impl/Memory/PlatformMemory.cs               |   78 +
 .../Impl/Memory/PlatformMemoryManager.cs        |  107 +
 .../Impl/Memory/PlatformMemoryPool.cs           |  106 +
 .../Impl/Memory/PlatformMemoryStream.cs         |  727 ++++
 .../Impl/Memory/PlatformMemoryUtils.cs          |  465 +++
 .../Impl/Memory/PlatformPooledMemory.cs         |   66 +
 .../Impl/Memory/PlatformRawMemory.cs            |   89 +
 .../Impl/Memory/PlatformUnpooledMemory.cs       |   52 +
 .../Impl/Messaging/MessageListenerHolder.cs     |  177 +
 .../Impl/Messaging/Messaging.cs                 |  289 ++
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   47 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  737 ++++
 .../Impl/Resource/IResourceInjector.cs          |   27 +
 .../Impl/Resource/ResourceFieldInjector.cs      |   47 +
 .../Impl/Resource/ResourceMethodInjector.cs     |   48 +
 .../Impl/Resource/ResourceProcessor.cs          |  105 +
 .../Impl/Resource/ResourcePropertyInjector.cs   |   47 +
 .../Impl/Resource/ResourceTypeDescriptor.cs     |  291 ++
 .../Impl/Services/ServiceContext.cs             |   60 +
 .../Impl/Services/ServiceDescriptor.cs          |  106 +
 .../Impl/Services/ServiceProxy.cs               |   71 +
 .../Impl/Services/ServiceProxyInvoker.cs        |  141 +
 .../Impl/Services/ServiceProxySerializer.cs     |  140 +
 .../Impl/Services/Services.cs                   |  372 ++
 .../Impl/Transactions/Transaction.cs            |  146 +
 .../Impl/Transactions/TransactionImpl.cs        |  482 +++
 .../Impl/Transactions/TransactionMetricsImpl.cs |   68 +
 .../Impl/Transactions/TransactionsImpl.cs       |  201 +
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |   42 +
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |   99 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        | 1164 ++++++
 .../Impl/Unmanaged/UnmanagedContext.cs          |   53 +
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |   70 +
 .../Impl/Unmanaged/UnmanagedTarget.cs           |   77 +
 .../Impl/Unmanaged/UnmanagedUtils.cs            | 1371 +++++++
 .../Lifecycle/ILifecycleBean.cs                 |   64 +
 .../Lifecycle/LifecycleEventType.cs             |   49 +
 .../Messaging/IMessageListener.cs               |   38 +
 .../Apache.Ignite.Core/Messaging/IMessaging.cs  |  128 +
 .../Properties/AssemblyInfo.cs                  |   46 +
 .../Resource/InstanceResourceAttribute.cs       |   35 +
 .../Resource/StoreSessionResourceAttribute.cs   |   32 +
 .../Apache.Ignite.Core/Services/IService.cs     |   51 +
 .../Services/IServiceContext.cs                 |   69 +
 .../Services/IServiceDescriptor.cs              |   96 +
 .../Apache.Ignite.Core/Services/IServices.cs    |  256 ++
 .../Services/ServiceConfiguration.cs            |   62 +
 .../Services/ServiceInvocationException.cs      |  101 +
 .../Transactions/ITransaction.cs                |  238 ++
 .../Transactions/ITransactionMetrics.cs         |   47 +
 .../Transactions/ITransactions.cs               |   76 +
 .../Transactions/TransactionConcurrency.cs      |   36 +
 .../TransactionHeuristicException.cs            |   72 +
 .../Transactions/TransactionIsolation.cs        |   41 +
 .../TransactionOptimisticException.cs           |   69 +
 .../TransactionRollbackException.cs             |   68 +
 .../Transactions/TransactionState.cs            |   70 +
 .../Transactions/TransactionTimeoutException.cs |   69 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    |  117 +
 modules/platforms/dotnet/Apache.Ignite.sln      |  111 +
 .../dotnet/Apache.Ignite.sln.DotSettings        |    4 +
 modules/platforms/dotnet/Apache.Ignite.slnrel   |   43 +
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   83 +
 .../dotnet/Apache.Ignite/Apache.Ignite.snk      |  Bin 0 -> 596 bytes
 .../platforms/dotnet/Apache.Ignite/App.config   |   56 +
 .../Config/AppSettingsConfigurator.cs           |  113 +
 .../Apache.Ignite/Config/ArgsConfigurator.cs    |  164 +
 .../Apache.Ignite/Config/ConfigValueParser.cs   |   42 +
 .../Apache.Ignite/Config/IConfigurator.cs       |   34 +
 .../dotnet/Apache.Ignite/IgniteRunner.cs        |  171 +
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   35 +
 .../Apache.Ignite/Service/IgniteService.cs      |  219 ++
 .../Apache.Ignite/Service/NativeMethods.cs      |   57 +
 .../Apache.Ignite/Service/ServiceDescription.cs |   32 +
 .../platforms/dotnet/Apache.Ignite_x86.slnrel   |   43 +
 modules/platforms/dotnet/README.txt             |   24 +
 .../dotnet/examples/Apache.Ignite.Examples.sln  |   38 +
 .../Apache.Ignite.Examples.csproj               |   88 +
 .../Apache.Ignite.Examples.snk                  |  Bin 0 -> 596 bytes
 .../examples/Apache.Ignite.Examples/App.config  |   24 +
 .../Compute/ClosureExample.cs                   |   84 +
 .../Compute/TaskExample.cs                      |  141 +
 .../Datagrid/ContinuousQueryExample.cs          |  103 +
 .../Datagrid/CrossPlatformExample.cs            |  205 +
 .../Datagrid/DataStreamerExample.cs             |  102 +
 .../Datagrid/PutGetExample.cs                   |  219 ++
 .../Datagrid/QueryExample.cs                    |  227 ++
 .../Datagrid/StoreExample.cs                    |  115 +
 .../Datagrid/TransactionExample.cs              |  105 +
 .../Events/EventsExample.cs                     |  104 +
 .../Messaging/MessagingExample.cs               |  112 +
 .../Misc/LifecycleExample.cs                    |  109 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Services/IMapService.cs                     |   56 +
 .../Services/ServicesExample.cs                 |   77 +
 .../Apache.Ignite.ExamplesDll.csproj            |   82 +
 .../Apache.Ignite.ExamplesDll.snk               |  Bin 0 -> 596 bytes
 .../Apache.Ignite.ExamplesDll/Binary/Account.cs |   60 +
 .../Apache.Ignite.ExamplesDll/Binary/Address.cs |   81 +
 .../Binary/Employee.cs                          |   93 +
 .../Binary/EmployeeKey.cs                       |   86 +
 .../Binary/Organization.cs                      |   84 +
 .../Binary/OrganizationType.cs                  |   43 +
 .../Compute/AverageSalaryJob.cs                 |   66 +
 .../Compute/AverageSalaryTask.cs                |   85 +
 .../Compute/CharacterCountClosure.cs            |   43 +
 .../Compute/CharacterCountReducer.cs            |   51 +
 .../Datagrid/ContinuousQueryFilter.cs           |   50 +
 .../Datagrid/EmployeeStore.cs                   |  122 +
 .../Datagrid/EmployeeStorePredicate.cs          |   41 +
 .../Events/LocalListener.cs                     |   54 +
 .../Messaging/LocalListener.cs                  |   59 +
 .../Messaging/RemoteOrderedListener.cs          |   54 +
 .../Messaging/RemoteUnorderedListener.cs        |   54 +
 .../Messaging/Topic.cs                          |   28 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Services/MapService.cs                      |  119 +
 .../examples/Config/example-cache-query.xml     |  111 +
 .../examples/Config/example-cache-store.xml     |   59 +
 .../dotnet/examples/Config/example-cache.xml    |   80 +
 .../dotnet/examples/Config/example-compute.xml  |   70 +
 modules/platforms/dotnet/examples/README.txt    |   14 +
 modules/platforms/licenses/apache-2.0.txt       |  202 +
 .../org/apache/ignite/IgniteSpringBean.java     |    7 +
 modules/yardstick/config/ignite-base-config.xml |   37 +-
 .../cache/IgniteSqlQueryPutBenchmark.java       |    5 +
 .../yardstick/cache/model/Organization.java     |   19 +-
 .../ignite/yardstick/cache/model/Person.java    |   24 +-
 .../ignite/yardstick/cache/model/SampleKey.java |   16 +-
 .../yardstick/cache/model/SampleValue.java      |   16 +-
 parent/pom.xml                                  |   34 +-
 pom.xml                                         |   11 -
 1758 files changed, 173924 insertions(+), 140526 deletions(-)
----------------------------------------------------------------------



[30/50] [abbrv] ignite git commit: IGNITE-1973: Binary format: raw reader can be called only once.

Posted by sb...@apache.org.
IGNITE-1973: Binary format: raw reader can be called only once.


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

Branch: refs/heads/master
Commit: 96ae696f1cb7aad3fce47c3dd7e43699b0d78fff
Parents: 5dce6d9
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Nov 23 11:45:41 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 23 11:45:41 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryReaderExImpl.java      | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/96ae696f/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
index 2534fd7..a2e18b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
@@ -168,6 +168,9 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     /** Order of a field whose match is expected. */
     private int matchingOrder;
 
+    /** Whether stream is in raw mode. */
+    private boolean raw;
+
     /**
      * Constructor.
      *
@@ -1384,9 +1387,15 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override public BinaryRawReader rawReader() {
-        streamPositionRandom(rawOff);
+        if (!raw) {
+            streamPositionRandom(rawOff);
+
+            raw = true;
 
-        return this;
+            return this;
+        }
+        else
+            throw new BinaryObjectException("Method \"rawReader\" can be called only once.");
     }
 
     /**
@@ -2483,6 +2492,9 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @return Offset.
      */
     public boolean findFieldByName(String name) {
+        if (raw)
+            throw new BinaryObjectException("Failed to read named field because reader is in raw mode.");
+
         assert dataStart != start;
 
         if (footerLen == 0)
@@ -2556,6 +2568,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @return {@code True} if field was found and stream was positioned accordingly.
      */
     private boolean findFieldById(int id) {
+        assert !raw; // Assert, not exception, because this is called only from internals for Serializable types.
         assert dataStart != start;
 
         if (footerLen == 0)


[15/50] [abbrv] ignite git commit: IGNITE-1282 - Backward compatibility.

Posted by sb...@apache.org.
IGNITE-1282 - Backward compatibility.


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

Branch: refs/heads/master
Commit: f17dfd03b3c7db5a8fc54a095ae17a14a1e32455
Parents: 70746cb
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 19:57:51 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 19:57:51 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/configuration/CacheConfiguration.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f17dfd03/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 5b246b3..e87346f 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -1836,7 +1836,8 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @return {@code this} for chaining.
      */
     public CacheConfiguration<K, V> setIndexedTypes(Class<?>... indexedTypes) {
-        A.notNull(indexedTypes, "indexedTypes");
+        if (F.isEmpty(indexedTypes))
+            return this;
 
         int len = indexedTypes.length;
 


[09/50] [abbrv] ignite git commit: IGNITE-1282 - Fixed tests after merge from ignite-1.5

Posted by sb...@apache.org.
IGNITE-1282 - Fixed tests after merge from ignite-1.5


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

Branch: refs/heads/master
Commit: 0410f0e596390ee28a1f1535e63030442c557988
Parents: 6d4ecfd
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 15:34:57 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 15:34:57 2015 +0300

----------------------------------------------------------------------
 .../distributed/dht/GridPartitionedSingleGetFuture.java      | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0410f0e5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index 32f4e80..f276cac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -49,7 +49,6 @@ import org.apache.ignite.internal.util.typedef.CI1;
 import org.apache.ignite.internal.util.typedef.CIX1;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
-import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteProductVersion;
@@ -448,7 +447,7 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im
      * @param nodeId Node ID.
      * @param res Result.
      */
-    public void onResult(UUID nodeId, GridNearGetResponse res) {
+    @Override public void onResult(UUID nodeId, GridNearGetResponse res) {
         if (!processResponse(nodeId) ||
             !checkError(res.error(), !F.isEmpty(res.invalidPartitions()), res.topologyVersion()))
             return;
@@ -581,10 +580,7 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im
                 }
                 else {
                     if (!keepCacheObjects) {
-                        Object res = CU.value(val, cctx, true);
-
-                        if (deserializePortable && !skipVals)
-                            res = cctx.unwrapPortableIfNeeded(res, false);
+                        Object res = cctx.unwrapPortableIfNeeded(val, !deserializePortable && !skipVals);
 
                         onDone(res);
                     }


[07/50] [abbrv] ignite git commit: IGNITE-1966 .Net: Fixed handle leak during partitioned scan query.

Posted by sb...@apache.org.
IGNITE-1966 .Net: Fixed handle leak during partitioned scan query.


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

Branch: refs/heads/master
Commit: 9c7178557a7dde74fec0a709e8a574ecae0c6930
Parents: 911ca9d
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Nov 20 14:32:27 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Nov 20 14:32:27 2015 +0300

----------------------------------------------------------------------
 .../processors/platform/cache/PlatformCache.java     |  9 ++++-----
 .../Cache/CacheTestAsyncWrapper.cs                   |  1 -
 .../Cache/Query/CacheQueriesTest.cs                  |  2 --
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs      | 14 +-------------
 .../Impl/Cache/CacheEntryFilterHolder.cs             | 15 ---------------
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs       | 15 ++-------------
 .../Impl/Unmanaged/UnmanagedCallbacks.cs             |  2 +-
 7 files changed, 8 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 6ec52d6..5943440 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -36,15 +36,14 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
 import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
 import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget;
 import org.apache.ignite.internal.processors.platform.PlatformContext;
+import org.apache.ignite.internal.processors.platform.PlatformNativeException;
 import org.apache.ignite.internal.processors.platform.cache.query.PlatformContinuousQuery;
 import org.apache.ignite.internal.processors.platform.cache.query.PlatformFieldsQueryCursor;
 import org.apache.ignite.internal.processors.platform.cache.query.PlatformQueryCursor;
-import org.apache.ignite.internal.processors.platform.PlatformNativeException;
 import org.apache.ignite.internal.processors.platform.utils.PlatformFutureUtils;
 import org.apache.ignite.internal.processors.platform.utils.PlatformUtils;
 import org.apache.ignite.internal.util.GridConcurrentFactory;
 import org.apache.ignite.internal.util.typedef.C1;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteFuture;
 import org.jetbrains.annotations.Nullable;
 
@@ -373,13 +372,13 @@ public class PlatformCache extends PlatformAbstractTarget {
     /**
      * Loads cache via localLoadCache or loadCache.
      */
-    private void loadCache0(BinaryRawReaderEx reader, boolean loc) throws IgniteCheckedException {
+    private void loadCache0(BinaryRawReaderEx reader, boolean loc) {
         PlatformCacheEntryFilter filter = null;
 
         Object pred = reader.readObjectDetached();
 
         if (pred != null)
-            filter = platformCtx.createCacheEntryFilter(pred, reader.readLong());
+            filter = platformCtx.createCacheEntryFilter(pred, 0);
 
         Object[] args = reader.readObjectArray();
 
@@ -955,7 +954,7 @@ public class PlatformCache extends PlatformAbstractTarget {
         Object pred = reader.readObjectDetached();
 
         if (pred != null)
-            qry.setFilter(platformCtx.createCacheEntryFilter(pred, reader.readLong()));
+            qry.setFilter(platformCtx.createCacheEntryFilter(pred, 0));
 
         qry.setLocal(loc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
index 430272f..33c9f11 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
@@ -26,7 +26,6 @@ namespace Apache.Ignite.Core.Tests.Cache
     using Apache.Ignite.Core.Cache.Expiry;
     using Apache.Ignite.Core.Cache.Query;
     using Apache.Ignite.Core.Cache.Query.Continuous;
-    using Apache.Ignite.Core.Common;
 
     /// <summary>
     /// Wraps IGridCache implementation to simplify async mode testing.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
index 411ef05..08a98f6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
@@ -565,7 +565,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         /// Check scan query with partitions.
         /// </summary>
         [Test]
-        [Ignore("IGNITE-1012")]
         public void TestScanQueryPartitions([Values(true, false)]  bool loc)
         {
             CheckScanQueryPartitions<QueryPerson>(MaxItemCnt, loc, false);
@@ -575,7 +574,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         /// Check scan query with partitions in binary mode.
         /// </summary>
         [Test]
-        [Ignore("IGNITE-1012")]
         public void TestScanQueryPartitionsBinary([Values(true, false)]  bool loc)
         {
             CheckScanQueryPartitions<BinaryObject>(MaxItemCnt, loc, true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/ScanQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/ScanQuery.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/ScanQuery.cs
index 12fb363..2c9cf35 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/ScanQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/ScanQuery.cs
@@ -17,7 +17,6 @@
 
 namespace Apache.Ignite.Core.Cache.Query
 {
-    using System;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Cache;
 
@@ -64,18 +63,7 @@ namespace Apache.Ignite.Core.Cache.Query
                 var holder = new CacheEntryFilterHolder(Filter, (key, val) => Filter.Invoke(
                     new CacheEntry<TK, TV>((TK) key, (TV) val)), writer.Marshaller, keepBinary);
 
-                try
-                {
-                    writer.WriteObject(holder);
-                }
-                catch (Exception)
-                {
-                    writer.Marshaller.Ignite.HandleRegistry.Release(holder.Handle);
-
-                    throw;
-                }
-
-                writer.WriteLong(holder.Handle);
+                writer.WriteObject(holder);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
index 0963145..4487c59 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
@@ -42,9 +42,6 @@ namespace Apache.Ignite.Core.Impl.Cache
         /** Grid. */
         private readonly Marshaller _marsh;
         
-        /** Handle. */
-        private readonly long _handle;
-
         /// <summary>
         /// Initializes a new instance of the <see cref="CacheEntryFilterHolder" /> class.
         /// </summary>
@@ -63,16 +60,6 @@ namespace Apache.Ignite.Core.Impl.Cache
             _invoker = invoker;
             _marsh = marsh;
             _keepBinary = keepBinary;
-
-            _handle = marsh.Ignite.HandleRegistry.Allocate(this);
-        }
-
-        /// <summary>
-        /// Gets the handle.
-        /// </summary>
-        public long Handle
-        {
-            get { return _handle; }
         }
 
         /// <summary>
@@ -112,8 +99,6 @@ namespace Apache.Ignite.Core.Impl.Cache
             _marsh = reader0.Marshaller;
 
             _invoker = GetInvoker(_pred);
-
-            _handle = _marsh.Ignite.HandleRegistry.Allocate(this);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index b1870d7..262ff12 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -270,21 +270,10 @@ namespace Apache.Ignite.Core.Impl.Cache
             {
                 if (p != null)
                 {
-                    var p0 = new CacheEntryFilterHolder(p, (k, v) => p.Invoke(new CacheEntry<TK, TV>((TK)k, (TV)v)),
+                    var p0 = new CacheEntryFilterHolder(p, (k, v) => p.Invoke(new CacheEntry<TK, TV>((TK) k, (TV) v)),
                         Marshaller, IsKeepBinary);
 
-                    try
-                    {
-                        writer.WriteObject(p0);
-                    }
-                    catch (Exception)
-                    {
-                        writer.Marshaller.Ignite.HandleRegistry.Release(p0.Handle);
-
-                        throw;
-                    }
-
-                    writer.WriteLong(p0.Handle);
+                    writer.WriteObject(p0);
                 }
                 else
                     writer.WriteObject<CacheEntryFilterHolder>(null);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c717855/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
index 98ea106..e554cfc 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
@@ -313,7 +313,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         private long CacheEntryFilterCreate(void* target, long memPtr)
         {
-            return SafeCall(() => CacheEntryFilterHolder.CreateInstance(memPtr, _ignite).Handle);
+            return SafeCall(() => _handleRegistry.Allocate(CacheEntryFilterHolder.CreateInstance(memPtr, _ignite)));
         }
 
         private int CacheEntryFilterApply(void* target, long objPtr, long memPtr)


[35/50] [abbrv] ignite git commit: IGNITE-1753 Refactored usages of deprectaed CacheTypeMetadata to JdbcType.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
index d78ea48..aa013b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
@@ -21,226 +21,392 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import javax.cache.CacheException;
 import javax.cache.integration.CacheLoaderException;
-import org.apache.ignite.cache.CacheTypeFieldMetadata;
-import org.apache.ignite.cache.CacheTypeMetadata;
+import org.apache.ignite.binary.BinaryObject;
+import org.apache.ignite.binary.BinaryObjectBuilder;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * Implementation of {@link CacheStore} backed by JDBC and POJO via reflection.
  *
- * This implementation stores objects in underlying database using java beans mapping description via reflection.
- * <p>
+ * This implementation stores objects in underlying database using java beans mapping description via reflection. <p>
  * Use {@link CacheJdbcPojoStoreFactory} factory to pass {@link CacheJdbcPojoStore} to {@link CacheConfiguration}.
  */
 public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
+    /** POJO methods cache. */
+    private volatile Map<String, Map<String, PojoMethodsCache>> pojosMthds = Collections.emptyMap();
+
     /**
-     * POJO methods cache.
+     * Get field value from object for use as query parameter.
+     *
+     * @param cacheName Cache name.
+     * @param typeName Type name.
+     * @param fldName Field name.
+     * @param obj Cache object.
+     * @return Field value from object.
+     * @throws CacheException in case of error.
      */
-    protected static class PojoMethodsCache {
-        /** POJO class. */
-        protected final Class<?> cls;
-
-        /** Constructor for POJO object. */
-        private Constructor ctor;
-
-        /** {@code true} if object is a simple type. */
-        private final boolean simple;
-
-        /** Cached setters for POJO object. */
-        private Map<String, Method> getters;
-
-        /** Cached getters for POJO object. */
-        private Map<String, Method> setters;
-
-        /**
-         * POJO methods cache.
-         *
-         * @param clsName Class name.
-         * @param fields Fields.
-         *
-         * @throws CacheException If failed to construct type cache.
-         */
-        public PojoMethodsCache(String clsName, Collection<CacheTypeFieldMetadata> fields) throws CacheException {
-            try {
-                cls = Class.forName(clsName);
-
-                if (simple = simpleType(cls))
-                    return;
+    @Override @Nullable protected Object extractParameter(@Nullable String cacheName, String typeName, TypeKind typeKind,
+        String fldName, Object obj) throws CacheException {
+        switch (typeKind) {
+            case BUILT_IN:
+                return obj;
+            case POJO:
+                return extractPojoParameter(cacheName, typeName, fldName, obj);
+            default:
+                return extractBinaryParameter(fldName, obj);
+        }
+    }
 
-                ctor = cls.getDeclaredConstructor();
+    /**
+     * Get field value from POJO for use as query parameter.
+     *
+     * @param cacheName Cache name.
+     * @param typeName Type name.
+     * @param fldName Field name.
+     * @param obj Cache object.
+     * @return Field value from object.
+     * @throws CacheException in case of error.
+     */
+    @Nullable private Object extractPojoParameter(@Nullable String cacheName, String typeName, String fldName,
+        Object obj) throws CacheException {
+        try {
+            Map<String, PojoMethodsCache> cacheMethods = pojosMthds.get(cacheName);
 
-                if (!ctor.isAccessible())
-                    ctor.setAccessible(true);
-            }
-            catch (ClassNotFoundException e) {
-                throw new CacheException("Failed to find class: " + clsName, e);
-            }
-            catch (NoSuchMethodException e) {
-                throw new CacheException("Failed to find default constructor for class: " + clsName, e);
-            }
+            if (cacheMethods == null)
+                throw new CacheException("Failed to find POJO type metadata for cache: " + U.maskName(cacheName));
 
-            setters = U.newHashMap(fields.size());
+            PojoMethodsCache mc = cacheMethods.get(typeName);
 
-            getters = U.newHashMap(fields.size());
+            if (mc == null)
+                throw new CacheException("Failed to find POJO type metadata for type: " + typeName);
 
-            for (CacheTypeFieldMetadata field : fields) {
-                String prop = capitalFirst(field.getJavaName());
+            Method getter = mc.getters.get(fldName);
 
-                try {
-                    getters.put(field.getJavaName(), cls.getMethod("get" + prop));
-                }
-                catch (NoSuchMethodException ignored) {
-                    try {
-                        getters.put(field.getJavaName(), cls.getMethod("is" + prop));
-                    }
-                    catch (NoSuchMethodException e) {
-                        throw new CacheException("Failed to find getter in POJO class [clsName=" + clsName +
-                            ", prop=" + field.getJavaName() + "]", e);
-                    }
-                }
+            if (getter == null)
+                throw new CacheLoaderException("Failed to find getter in POJO class [class=" + typeName +
+                    ", prop=" + fldName + "]");
 
-                try {
-                    setters.put(field.getJavaName(), cls.getMethod("set" + prop, field.getJavaType()));
-                }
-                catch (NoSuchMethodException e) {
-                    throw new CacheException("Failed to find setter in POJO class [clsName=" + clsName +
-                        ", prop=" + field.getJavaName() + "]", e);
-                }
-            }
+            return getter.invoke(obj);
         }
-
-        /**
-         * Capitalizes the first character of the given string.
-         *
-         * @param str String.
-         * @return String with capitalized first character.
-         */
-        @Nullable private String capitalFirst(@Nullable String str) {
-            return str == null ? null :
-                str.isEmpty() ? "" : Character.toUpperCase(str.charAt(0)) + str.substring(1);
+        catch (Exception e) {
+            throw new CacheException("Failed to read object of class: " + typeName, e);
         }
     }
 
-    /** Methods cache. */
-    protected volatile Map<String, Map<String, PojoMethodsCache>> mtdsCache = Collections.emptyMap();
+    /**
+     * Get field value from Binary object for use as query parameter.
+     *
+     * @param fieldName Field name to extract query parameter for.
+     * @param obj Object to process.
+     * @return Field value from object.
+     * @throws CacheException in case of error.
+     */
+    private Object extractBinaryParameter(String fieldName, Object obj) throws CacheException {
+        if (obj instanceof BinaryObject)
+            return ((BinaryObject)obj).field(fieldName);
+
+        throw new CacheException("Failed to read property value from non binary object [class=" +
+            obj.getClass() + ", property=" + fieldName + "]");
+    }
 
     /** {@inheritDoc} */
-    @Override protected void prepareBuilders(@Nullable String cacheName, Collection<CacheTypeMetadata> types)
-        throws CacheException {
-        Map<String, PojoMethodsCache> typeMethods = U.newHashMap(types.size() * 2);
+    @Override protected <R> R buildObject(@Nullable String cacheName, String typeName, TypeKind typeKind,
+        JdbcTypeField[] flds, Collection<String> hashFlds, Map<String, Integer> loadColIdxs, ResultSet rs)
+        throws CacheLoaderException {
+        switch (typeKind) {
+            case BUILT_IN:
+                return (R)buildBuiltinObject(typeName, flds, loadColIdxs, rs);
+            case POJO:
+                return (R)buildPojoObject(cacheName, typeName, flds, loadColIdxs, rs);
+            default:
+                return (R)buildBinaryObject(typeName, flds, hashFlds, loadColIdxs, rs);
+        }
+    }
 
-        for (CacheTypeMetadata type : types) {
-            String keyType = type.getKeyType();
-            typeMethods.put(keyType, new PojoMethodsCache(keyType, type.getKeyFields()));
+    /**
+     * Construct Java built in object from query result.
+     *
+     * @param typeName Type name.
+     * @param fields Fields descriptors.
+     * @param loadColIdxs Select query columns indexes.
+     * @param rs ResultSet to take data from.
+     * @return Constructed object.
+     * @throws CacheLoaderException If failed to construct POJO.
+     */
+    private Object buildBuiltinObject(String typeName, JdbcTypeField[] fields, Map<String, Integer> loadColIdxs,
+        ResultSet rs) throws CacheLoaderException {
+        try {
+            JdbcTypeField field = fields[0];
 
-            String valType = type.getValueType();
-            typeMethods.put(valType, new PojoMethodsCache(valType, type.getValueFields()));
+            return getColumnValue(rs, loadColIdxs.get(field.getDatabaseFieldName()), field.getJavaFieldType());
         }
+        catch (SQLException e) {
+            throw new CacheLoaderException("Failed to read object of class: " + typeName, e);
+        }
+    }
 
-        Map<String, Map<String, PojoMethodsCache>> newMtdsCache = new HashMap<>(mtdsCache);
+    /**
+     * Construct POJO from query result.
+     *
+     * @param cacheName Cache name.
+     * @param typeName Type name.
+     * @param flds Fields descriptors.
+     * @param loadColIdxs Select query columns index.
+     * @param rs ResultSet.
+     * @return Constructed POJO.
+     * @throws CacheLoaderException If failed to construct POJO.
+     */
+    private Object buildPojoObject(@Nullable String cacheName, String typeName,
+        JdbcTypeField[] flds, Map<String, Integer> loadColIdxs, ResultSet rs)
+        throws CacheLoaderException {
 
-        newMtdsCache.put(cacheName, typeMethods);
+        Map<String, PojoMethodsCache> cacheMethods = pojosMthds.get(cacheName);
 
-        mtdsCache = newMtdsCache;
-    }
+        if (cacheMethods == null)
+            throw new CacheLoaderException("Failed to find POJO types metadata for cache: " + U.maskName(cacheName));
 
-    /** {@inheritDoc} */
-    @Override protected <R> R buildObject(String cacheName, String typeName, Collection<CacheTypeFieldMetadata> fields,
-        Map<String, Integer> loadColIdxs, ResultSet rs) throws CacheLoaderException {
-        PojoMethodsCache mc = mtdsCache.get(cacheName).get(typeName);
+        PojoMethodsCache mc = cacheMethods.get(typeName);
 
         if (mc == null)
-            throw new CacheLoaderException("Failed to find cache type metadata for type: " + typeName);
+            throw new CacheLoaderException("Failed to find POJO type metadata for type: " + typeName);
 
         try {
-            if (mc.simple) {
-                CacheTypeFieldMetadata field = F.first(fields);
-
-                return (R)getColumnValue(rs, loadColIdxs.get(field.getDatabaseName()), mc.cls);
-            }
-
             Object obj = mc.ctor.newInstance();
 
-            for (CacheTypeFieldMetadata field : fields) {
-                String fldJavaName = field.getJavaName();
+            for (JdbcTypeField fld : flds) {
+                String fldJavaName = fld.getJavaFieldName();
 
                 Method setter = mc.setters.get(fldJavaName);
 
                 if (setter == null)
-                    throw new IllegalStateException("Failed to find setter in POJO class [clsName=" + typeName +
+                    throw new IllegalStateException("Failed to find setter in POJO class [type=" + typeName +
                         ", prop=" + fldJavaName + "]");
 
-                String fldDbName = field.getDatabaseName();
+                String fldDbName = fld.getDatabaseFieldName();
 
                 Integer colIdx = loadColIdxs.get(fldDbName);
 
                 try {
-                    setter.invoke(obj, getColumnValue(rs, colIdx, field.getJavaType()));
+                    Object colVal = getColumnValue(rs, colIdx, fld.getJavaFieldType());
+
+                    try {
+                        setter.invoke(obj, colVal);
+                    }
+                    catch (Exception e) {
+                        throw new CacheLoaderException("Failed to set property in POJO class [type=" + typeName +
+                            ", prop=" + fldJavaName + ", col=" + colIdx + ", dbName=" + fldDbName + "]", e);
+                    }
                 }
-                catch (Exception e) {
-                    throw new IllegalStateException("Failed to set property in POJO class [clsName=" + typeName +
+                catch (SQLException e) {
+                    throw new CacheLoaderException("Failed to read object property [type= " + typeName +
                         ", prop=" + fldJavaName + ", col=" + colIdx + ", dbName=" + fldDbName + "]", e);
                 }
             }
 
-            return (R)obj;
-        }
-        catch (SQLException e) {
-            throw new CacheLoaderException("Failed to read object of class: " + typeName, e);
+            return obj;
         }
         catch (Exception e) {
             throw new CacheLoaderException("Failed to construct instance of class: " + typeName, e);
         }
     }
 
-    /** {@inheritDoc} */
-    @Nullable @Override protected Object extractParameter(String cacheName, String typeName, String fieldName,
-        Object obj)
-        throws CacheException {
+    /**
+     * Construct binary object from query result.
+     *
+     * @param typeName Type name.
+     * @param fields Fields descriptors.
+     * @param hashFields Collection of fields to build hash for.
+     * @param loadColIdxs Select query columns index.
+     * @param rs ResultSet.
+     * @return Constructed binary object.
+     * @throws CacheLoaderException If failed to construct binary object.
+     */
+    protected Object buildBinaryObject(String typeName, JdbcTypeField[] fields,
+        Collection<String> hashFields, Map<String, Integer> loadColIdxs, ResultSet rs) throws CacheLoaderException {
         try {
-            PojoMethodsCache mc = mtdsCache.get(cacheName).get(typeName);
+            BinaryObjectBuilder builder = ignite.binary().builder(typeName);
 
-            if (mc == null)
-                throw new CacheException("Failed to find cache type metadata for type: " + typeName);
+            boolean calcHash = hashFields != null;
 
-            if (mc.simple)
-                return obj;
+            Collection<Object> hashValues = calcHash ? new ArrayList<>(hashFields.size()) : null;
 
-            Method getter = mc.getters.get(fieldName);
+            for (JdbcTypeField field : fields) {
+                Integer colIdx = loadColIdxs.get(field.getDatabaseFieldName());
 
-            if (getter == null)
-                throw new CacheLoaderException("Failed to find getter in POJO class [clsName=" + typeName +
-                    ", prop=" + fieldName + "]");
+                Object colVal = getColumnValue(rs, colIdx, field.getJavaFieldType());
 
-            return getter.invoke(obj);
+                builder.setField(field.getJavaFieldName(), colVal);
+
+                if (calcHash)
+                    hashValues.add(colVal);
+            }
+
+            if (calcHash)
+                builder.hashCode(hasher.hashCode(hashValues));
+
+            return builder.build();
         }
-        catch (Exception e) {
-            throw new CacheException("Failed to read object of class: " + typeName, e);
+        catch (SQLException e) {
+            throw new CacheException("Failed to read binary object", e);
         }
     }
 
-    /** {@inheritDoc} */
-    @Override protected Object keyTypeId(Object key) throws CacheException {
-        return key.getClass();
+    /**
+     * Calculate type ID for object.
+     *
+     * @param obj Object to calculate type ID for.
+     * @return Type ID.
+     * @throws CacheException If failed to calculate type ID for given object.
+     */
+    @Override protected Object typeIdForObject(Object obj) throws CacheException {
+        if (obj instanceof BinaryObject)
+            return ((BinaryObject)obj).typeId();
+
+        return obj.getClass();
     }
 
     /** {@inheritDoc} */
-    @Override protected Object keyTypeId(String type) throws CacheException {
+    @Override protected Object typeIdForTypeName(TypeKind kind, String typeName) throws CacheException {
+        if (kind == TypeKind.BINARY)
+            return ignite.binary().typeId(typeName);
+
         try {
-            return Class.forName(type);
+            return Class.forName(typeName);
         }
         catch (ClassNotFoundException e) {
-            throw new CacheException("Failed to find class: " + type, e);
+            throw new CacheException("Failed to find class: " + typeName, e);
+        }
+    }
+
+    /**
+     * Prepare internal store specific builders for provided types metadata.
+     *
+     * @param cacheName Cache name to prepare builders for.
+     * @param types Collection of types.
+     * @throws CacheException If failed to prepare internal builders for types.
+     */
+    @Override protected void prepareBuilders(@Nullable String cacheName, Collection<JdbcType> types)
+        throws CacheException {
+        Map<String, PojoMethodsCache> pojoMethods = U.newHashMap(types.size() * 2);
+
+        for (JdbcType type : types) {
+            String keyTypeName = type.getKeyType();
+
+            TypeKind keyKind = kindForName(keyTypeName);
+
+            if (keyKind == TypeKind.POJO) {
+                if (pojoMethods.containsKey(keyTypeName))
+                    throw new CacheException("Found duplicate key type [cache=" + U.maskName(cacheName) +
+                        ", keyType=" + keyTypeName + "]");
+
+                pojoMethods.put(keyTypeName, new PojoMethodsCache(keyTypeName, type.getKeyFields()));
+            }
+
+            String valTypeName = type.getValueType();
+
+            TypeKind valKind = kindForName(valTypeName);
+
+            if (valKind == TypeKind.POJO)
+                pojoMethods.put(valTypeName, new PojoMethodsCache(valTypeName, type.getValueFields()));
+        }
+
+        if (!pojoMethods.isEmpty()) {
+            Map<String, Map<String, PojoMethodsCache>> newPojosMethods = new HashMap<>(pojosMthds);
+
+            newPojosMethods.put(cacheName, pojoMethods);
+
+            pojosMthds = newPojosMethods;
+        }
+    }
+
+    /**
+     * POJO methods cache.
+     */
+    private static class PojoMethodsCache {
+        /** POJO class. */
+        private final Class<?> cls;
+
+        /** Constructor for POJO object. */
+        private Constructor ctor;
+
+        /** Cached setters for POJO object. */
+        private Map<String, Method> getters;
+
+        /** Cached getters for POJO object. */
+        private Map<String, Method> setters;
+
+        /**
+         * POJO methods cache.
+         *
+         * @param clsName Class name.
+         * @param fields Fields.
+         * @throws CacheException If failed to construct type cache.
+         */
+        private PojoMethodsCache(String clsName, JdbcTypeField[] fields) throws CacheException {
+            try {
+                cls = Class.forName(clsName);
+
+                ctor = cls.getDeclaredConstructor();
+
+                if (!ctor.isAccessible())
+                    ctor.setAccessible(true);
+            }
+            catch (ClassNotFoundException e) {
+                throw new CacheException("Failed to find class: " + clsName, e);
+            }
+            catch (NoSuchMethodException e) {
+                throw new CacheException("Failed to find default constructor for class: " + clsName, e);
+            }
+
+            setters = U.newHashMap(fields.length);
+
+            getters = U.newHashMap(fields.length);
+
+            for (JdbcTypeField field : fields) {
+                String prop = capitalFirst(field.getJavaFieldName());
+
+                try {
+                    getters.put(field.getJavaFieldName(), cls.getMethod("get" + prop));
+                }
+                catch (NoSuchMethodException ignored) {
+                    try {
+                        getters.put(field.getJavaFieldName(), cls.getMethod("is" + prop));
+                    }
+                    catch (NoSuchMethodException e) {
+                        throw new CacheException("Failed to find getter in POJO class [class=" + clsName +
+                            ", prop=" + field.getJavaFieldName() + "]", e);
+                    }
+                }
+
+                try {
+                    setters.put(field.getJavaFieldName(), cls.getMethod("set" + prop, field.getJavaFieldType()));
+                }
+                catch (NoSuchMethodException e) {
+                    throw new CacheException("Failed to find setter in POJO class [class=" + clsName +
+                        ", prop=" + field.getJavaFieldName() + "]", e);
+                }
+            }
+        }
+
+        /**
+         * Capitalizes the first character of the given string.
+         *
+         * @param str String.
+         * @return String with capitalized first character.
+         */
+        @Nullable private String capitalFirst(@Nullable String str) {
+            return str == null ? null :
+                str.isEmpty() ? "" : Character.toUpperCase(str.charAt(0)) + str.substring(1);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
index c90a69b..ded83ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
@@ -34,17 +34,53 @@ import org.apache.ignite.resources.SpringApplicationContextResource;
  *
  * <h2 class="header">Spring Example</h2>
  * <pre name="code" class="xml">
- *     &lt;bean id= "simpleDataSource" class="org.h2.jdbcx.JdbcDataSource"/&gt;
+ *     &lt;bean id= "myDataSource" class="org.h2.jdbcx.JdbcDataSource"/&gt;
  *
  *     &lt;bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
  *          ...
  *          &lt;property name="cacheConfiguration"&gt;
  *               &lt;list&gt;
  *                  &lt;bean class="org.apache.ignite.configuration.CacheConfiguration"&gt;
+ *                      &lt;property name="name" value="myCache" /&gt;
  *                      ...
  *                      &lt;property name="cacheStoreFactory"&gt;
  *                          &lt;bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory"&gt;
- *                              &lt;property name="dataSourceBean" value = "simpleDataSource" /&gt;
+ *                              &lt;property name="dataSourceBean" value="myDataSource" /&gt;
+ *                              &lt;property name="types"&gt;
+ *                                  &lt;list&gt;
+ *                                      &lt;bean class="org.apache.ignite.cache.store.jdbc.JdbcType"&gt;
+ *                                          &lt;property name="cacheName" value="myCache" /&gt;
+ *                                          &lt;property name="databaseSchema" value="MY_DB_SCHEMA" /&gt;
+ *                                          &lt;property name="databaseTable" value="PERSON" /&gt;
+ *                                          &lt;property name="keyType" value="java.lang.Integer" /&gt;
+ *                                          &lt;property name="keyFields"&gt;
+ *                                              &lt;list&gt;
+ *                                                  &lt;bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"&gt;
+ *                                                      &lt;property name="databaseFieldType" &gt;
+ *                                                          &lt;util:constant static-field="java.sql.Types.INTEGER"/&gt;
+ *                                                      &lt;/property&gt;
+ *                                                      &lt;property name="databaseFieldName" value="ID" /&gt;
+ *                                                      &lt;property name="javaFieldType" value="java.lang.Integer" /&gt;
+ *                                                      &lt;property name="javaFieldName" value="id" /&gt;
+ *                                                  &lt;/bean&gt;
+ *                                              &lt;/list&gt;
+ *                                          &lt;/property&gt;
+ *                                          &lt;property name="valueType" value="my.company.Person" /&gt;
+ *                                          &lt;property name="valueFields"&gt;
+ *                                              &lt;list&gt;
+ *                                                  &lt;bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"&gt;
+ *                                                      &lt;property name="databaseFieldType" &gt;
+ *                                                          &lt;util:constant static-field="java.sql.Types.VARCHAR"/&gt;
+ *                                                      &lt;/property&gt;
+ *                                                      &lt;property name="databaseFieldName" value="NAME" /&gt;
+ *                                                      &lt;property name="javaFieldType" value="java.lang.String" /&gt;
+ *                                                      &lt;property name="javaFieldName" value="name" /&gt;
+ *                                                  &lt;/bean&gt;
+ *                                              &lt;/list&gt;
+ *                                          &lt;/property&gt;
+ *                                      &lt;/bean&gt;
+ *                                  &lt;/list&gt;
+ *                              &lt;/property&gt;
  *                          &lt;/bean&gt;
  *                      &lt;/property&gt;
  *                  &lt;/bean&gt;
@@ -57,47 +93,81 @@ import org.apache.ignite.resources.SpringApplicationContextResource;
  * <br>
  * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
  */
-public class CacheJdbcPojoStoreFactory<K, V> implements Factory<CacheJdbcPojoStore<K, V>> {
+public class CacheJdbcPojoStoreFactory<K, V> implements Factory<CacheAbstractJdbcStore<K, V>> {
     /** */
     private static final long serialVersionUID = 0L;
 
+    /** Default value for write attempts. */
+    public static final int DFLT_WRITE_ATTEMPTS = 2;
+
+    /** Default batch size for put and remove operations. */
+    public static final int DFLT_BATCH_SIZE = 512;
+
+    /** Default batch size for put and remove operations. */
+    public static final int DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD = 512;
+
+    /** Maximum batch size for writeAll and deleteAll operations. */
+    private int batchSizw = DFLT_BATCH_SIZE;
+
     /** Name of data source bean. */
     private String dataSrcBean;
 
-    /** Data source. */
-    private transient DataSource dataSrc;
-
     /** Database dialect. */
     private JdbcDialect dialect;
 
+    /** Max workers thread count. These threads are responsible for load cache. */
+    private int maxPoolSize = Runtime.getRuntime().availableProcessors();
+
+    /** Maximum write attempts in case of database error. */
+    private int maxWriteAttempts = DFLT_WRITE_ATTEMPTS;
+
+    /** Parallel load cache minimum threshold. If {@code 0} then load sequentially. */
+    private int parallelLoadCacheMinThreshold = DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD;
+
+    /** Hash calculator.  */
+    private JdbcTypeHasher hasher = JdbcTypeDefaultHasher.INSTANCE;
+
+    /** Types that store could process. */
+    private JdbcType[] types;
+
+    /** Data source. */
+    private transient DataSource dataSrc;
+
     /** Application context. */
     @SpringApplicationContextResource
-    private transient Object appContext;
+    private transient Object appCtx;
 
     /** {@inheritDoc} */
     @Override public CacheJdbcPojoStore<K, V> create() {
         CacheJdbcPojoStore<K, V> store = new CacheJdbcPojoStore<>();
 
+        store.setBatchSize(batchSizw);
         store.setDialect(dialect);
+        store.setMaximumPoolSize(maxPoolSize);
+        store.setMaximumWriteAttempts(maxWriteAttempts);
+        store.setParallelLoadCacheMinimumThreshold(parallelLoadCacheMinThreshold);
+        store.setTypes(types);
 
         if (dataSrc != null)
             store.setDataSource(dataSrc);
-        else if (dataSrcBean != null) {
-            if (appContext == null)
-                throw new IgniteException("Spring application context resource is not injected.");
+        else {
+            if (dataSrcBean != null) {
+                if (appCtx == null)
+                    throw new IgniteException("Spring application context resource is not injected.");
 
-            IgniteSpringHelper spring;
+                IgniteSpringHelper spring;
 
-            try {
-                spring = IgniteComponentType.SPRING.create(false);
+                try {
+                    spring = IgniteComponentType.SPRING.create(false);
 
-                DataSource data = spring.loadBeanFromAppContext(appContext, dataSrcBean);
+                    DataSource data = spring.loadBeanFromAppContext(appCtx, dataSrcBean);
 
-                store.setDataSource(data);
-            }
-            catch (Exception e) {
-                throw new IgniteException("Failed to load bean in application context [beanName=" + dataSrcBean +
-                    ", igniteConfig=" + appContext + ']', e);
+                    store.setDataSource(data);
+                }
+                catch (Exception e) {
+                    throw new IgniteException("Failed to load bean in application context [beanName=" + dataSrcBean +
+                        ", igniteConfig=" + appCtx + ']', e);
+                }
             }
         }
 
@@ -105,43 +175,188 @@ public class CacheJdbcPojoStoreFactory<K, V> implements Factory<CacheJdbcPojoSto
     }
 
     /**
-     * Sets name of the data source bean.
+     * Sets data source. Data source should be fully configured and ready-to-use.
      *
-     * @param dataSrcBean Data source bean name.
+     * @param dataSrc Data source.
      * @return {@code This} for chaining.
      * @see CacheJdbcPojoStore#setDataSource(DataSource)
      */
-    public CacheJdbcPojoStoreFactory<K, V> setDataSourceBean(String dataSrcBean) {
-        this.dataSrcBean = dataSrcBean;
+    public CacheJdbcPojoStoreFactory<K, V> setDataSource(DataSource dataSrc) {
+        this.dataSrc = dataSrc;
 
         return this;
     }
 
     /**
-     * Sets data source. Data source should be fully configured and ready-to-use.
+     * Get maximum batch size for delete and delete operations.
      *
-     * @param dataSrc Data source.
+     * @return Maximum batch size.
+     */
+    public int getBatchSize() {
+        return batchSizw;
+    }
+
+    /**
+     * Set maximum batch size for write and delete operations.
+     *
+     * @param batchSize Maximum batch size.
      * @return {@code This} for chaining.
-     * @see CacheJdbcPojoStore#setDataSource(DataSource)
      */
-    public CacheJdbcPojoStoreFactory<K, V> setDataSource(DataSource dataSrc) {
-        this.dataSrc = dataSrc;
+    public CacheJdbcPojoStoreFactory setBatchSize(int batchSize) {
+        this.batchSizw = batchSize;
+
+        return this;
+    }
+
+    /**
+     * Gets name of the data source bean.
+     *
+     * @return Data source bean name.
+     */
+    public String getDataSourceBean() {
+        return dataSrcBean;
+    }
+
+    /**
+     * Sets name of the data source bean.
+     *
+     * @param dataSrcBean Data source bean name.
+     * @return {@code This} for chaining.
+     */
+    public CacheJdbcPojoStoreFactory setDataSourceBean(String dataSrcBean) {
+        this.dataSrcBean = dataSrcBean;
 
         return this;
     }
 
     /**
+     * Get database dialect.
+     *
+     * @return Database dialect.
+     */
+    public JdbcDialect getDialect() {
+        return dialect;
+    }
+
+    /**
      * Set database dialect.
      *
      * @param dialect Database dialect.
-     * @see CacheJdbcPojoStore#setDialect(JdbcDialect)
+     * @return {@code This} for chaining.
      */
-    public void setDialect(JdbcDialect dialect) {
+    public CacheJdbcPojoStoreFactory setDialect(JdbcDialect dialect) {
         this.dialect = dialect;
+
+        return this;
+    }
+
+    /**
+     * Get maximum workers thread count. These threads are responsible for queries execution.
+     *
+     * @return Maximum workers thread count.
+     */
+    public int getMaximumPoolSize() {
+        return maxPoolSize;
+    }
+
+    /**
+     * Set Maximum workers thread count. These threads are responsible for queries execution.
+     *
+     * @param maxPoolSize Max workers thread count.
+     * @return {@code This} for chaining.
+     */
+    public CacheJdbcPojoStoreFactory setMaximumPoolSize(int maxPoolSize) {
+        this.maxPoolSize = maxPoolSize;
+
+        return this;
+    }
+
+    /**
+     * Gets maximum number of write attempts in case of database error.
+     *
+     * @return Maximum number of write attempts.
+     */
+    public int getMaximumWriteAttempts() {
+        return maxWriteAttempts;
+    }
+
+    /**
+     * Sets maximum number of write attempts in case of database error.
+     *
+     * @param maxWrtAttempts Number of write attempts.
+     * @return {@code This} for chaining.
+     */
+    public CacheJdbcPojoStoreFactory setMaximumWriteAttempts(int maxWrtAttempts) {
+        this.maxWriteAttempts = maxWrtAttempts;
+
+        return this;
+    }
+
+    /**
+     * Parallel load cache minimum row count threshold.
+     *
+     * @return If {@code 0} then load sequentially.
+     */
+    public int getParallelLoadCacheMinimumThreshold() {
+        return parallelLoadCacheMinThreshold;
+    }
+
+    /**
+     * Parallel load cache minimum row count threshold.
+     *
+     * @param parallelLoadCacheMinThreshold Minimum row count threshold. If {@code 0} then load sequentially.
+     * @return {@code This} for chaining.
+     */
+    public CacheJdbcPojoStoreFactory setParallelLoadCacheMinimumThreshold(int parallelLoadCacheMinThreshold) {
+        this.parallelLoadCacheMinThreshold = parallelLoadCacheMinThreshold;
+
+        return this;
+    }
+
+    /**
+     * Gets types known by store.
+     *
+     * @return Types known by store.
+     */
+    public JdbcType[] getTypes() {
+        return types;
+    }
+
+    /**
+     * Sets store configurations.
+     *
+     * @param types Store should process.
+     * @return {@code This} for chaining.
+     */
+    public CacheJdbcPojoStoreFactory setTypes(JdbcType... types) {
+        this.types = types;
+
+        return this;
+    }
+
+    /**
+     * Gets hash code calculator.
+     *
+     * @return Hash code calculator.
+     */
+    public JdbcTypeHasher getHasher() {
+        return hasher;
+    }
+
+    /**
+     * Sets hash code calculator.
+     *
+     * @param hasher Hash code calculator.
+     * @return {@code This} for chaining.
+     */
+    public CacheJdbcPojoStoreFactory setHasher(JdbcTypeHasher hasher) {
+        this.hasher = hasher;
+
+        return this;
     }
 
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(CacheJdbcPojoStoreFactory.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcType.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcType.java
new file mode 100644
index 0000000..2107240
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcType.java
@@ -0,0 +1,255 @@
+/*
+ * 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.cache.store.jdbc;
+
+import java.io.Serializable;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+/**
+ * Description for type that could be stored into database by store.
+ */
+public class JdbcType implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Cache name. */
+    private String cacheName;
+
+    /** Schema name in database. */
+    private String dbSchema;
+
+    /** Table name in database. */
+    private String dbTbl;
+
+    /** Key class used to store key in cache. */
+    private String keyType;
+
+    /** List of fields descriptors for key object. */
+    @GridToStringInclude
+    private JdbcTypeField[] keyFields;
+
+    /** Value class used to store value in cache. */
+    private String valType;
+
+    /** List of fields descriptors for value object. */
+    @GridToStringInclude
+    private JdbcTypeField[] valFlds;
+
+    /** Custom type hasher. */
+    private JdbcTypeHasher hasher;
+
+    /**
+     * Empty constructor (all values are initialized to their defaults).
+     */
+    public JdbcType() {
+        /* No-op. */
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param type Type to copy.
+     */
+    public JdbcType(JdbcType type) {
+        cacheName = type.getCacheName();
+
+        dbSchema = type.getDatabaseSchema();
+        dbTbl = type.getDatabaseTable();
+
+        keyType = type.getKeyType();
+        keyFields = type.getKeyFields();
+
+        valType = type.getValueType();
+        valFlds = type.getValueFields();
+    }
+
+    /**
+     * Gets associated cache name.
+     *
+     * @return Сache name.
+     */
+    public String getCacheName() {
+        return cacheName;
+    }
+
+    /**
+     * Sets associated cache name.
+     *
+     * @param cacheName Cache name.
+     */
+    public JdbcType setCacheName(String cacheName) {
+        this.cacheName = cacheName;
+
+        return this;
+    }
+
+    /**
+     * Gets database schema name.
+     *
+     * @return Schema name.
+     */
+    public String getDatabaseSchema() {
+        return dbSchema;
+    }
+
+    /**
+     * Sets database schema name.
+     *
+     * @param dbSchema Schema name.
+     */
+    public JdbcType setDatabaseSchema(String dbSchema) {
+        this.dbSchema = dbSchema;
+
+        return this;
+    }
+
+    /**
+     * Gets table name in database.
+     *
+     * @return Table name in database.
+     */
+    public String getDatabaseTable() {
+        return dbTbl;
+    }
+
+    /**
+     * Table name in database.
+     *
+     * @param dbTbl Table name in database.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setDatabaseTable(String dbTbl) {
+        this.dbTbl = dbTbl;
+
+        return this;
+    }
+
+    /**
+     * Gets key type.
+     *
+     * @return Key type.
+     */
+    public String getKeyType() {
+        return keyType;
+    }
+
+    /**
+     * Sets key type.
+     *
+     * @param keyType Key type.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setKeyType(String keyType) {
+        this.keyType = keyType;
+
+        return this;
+    }
+
+    /**
+     * Sets key type.
+     *
+     * @param cls Key type class.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setKeyType(Class<?> cls) {
+        setKeyType(cls.getName());
+
+        return this;
+    }
+
+    /**
+     * Gets value type.
+     *
+     * @return Key type.
+     */
+    public String getValueType() {
+        return valType;
+    }
+
+    /**
+     * Sets value type.
+     *
+     * @param valType Value type.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setValueType(String valType) {
+        this.valType = valType;
+
+        return this;
+    }
+
+    /**
+     * Sets value type.
+     *
+     * @param cls Value type class.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setValueType(Class<?> cls) {
+        setValueType(cls.getName());
+
+        return this;
+    }
+
+    /**
+     * Gets optional persistent key fields (needed only if {@link CacheJdbcPojoStore} is used).
+     *
+     * @return Persistent key fields.
+     */
+    public JdbcTypeField[] getKeyFields() {
+        return keyFields;
+    }
+
+    /**
+     * Sets optional persistent key fields (needed only if {@link CacheJdbcPojoStore} is used).
+     *
+     * @param keyFlds Persistent key fields.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setKeyFields(JdbcTypeField... keyFlds) {
+        this.keyFields = keyFlds;
+
+        return this;
+    }
+
+    /**
+     * Gets optional persistent value fields (needed only if {@link CacheJdbcPojoStore} is used).
+     *
+     * @return Persistent value fields.
+     */
+    public JdbcTypeField[] getValueFields() {
+        return valFlds;
+    }
+
+    /**
+     * Sets optional persistent value fields (needed only if {@link CacheJdbcPojoStore} is used).
+     *
+     * @param valFlds Persistent value fields.
+     * @return {@code this} for chaining.
+     */
+    public JdbcType setValueFields(JdbcTypeField... valFlds) {
+        this.valFlds = valFlds;
+
+        return this;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(JdbcType.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeDefaultHasher.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeDefaultHasher.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeDefaultHasher.java
new file mode 100644
index 0000000..3baad3b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeDefaultHasher.java
@@ -0,0 +1,43 @@
+/*
+ * 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.cache.store.jdbc;
+
+import java.util.Collection;
+
+/**
+ * Default implementation of {@link JdbcTypeHasher}.
+ *
+ * This implementation ignores type and field names.
+ */
+public class JdbcTypeDefaultHasher implements JdbcTypeHasher {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Singleton instance to use. */
+    public static final JdbcTypeHasher INSTANCE = new JdbcTypeDefaultHasher();
+
+    /** {@inheritDoc} */
+    @Override public int hashCode(Collection<?> values) {
+        int hash = 0;
+
+        for (Object val : values)
+            hash = 31 * hash + (val != null ? val.hashCode() : 0);
+
+        return hash;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeField.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeField.java
new file mode 100644
index 0000000..3396b81
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeField.java
@@ -0,0 +1,172 @@
+/*
+ * 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.cache.store.jdbc;
+
+import java.io.Serializable;
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+/**
+ * Description of how field declared in database and in cache.
+ */
+public class JdbcTypeField implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Field JDBC type in database. */
+    private int dbFldType;
+
+    /** Field name in database. */
+    private String dbFldName;
+
+    /** Field java type. */
+    private Class<?> javaFldType;
+
+    /** Field name in java object. */
+    private String javaFldName;
+
+    /**
+     * Default constructor.
+     */
+    public JdbcTypeField() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     *
+     * @param dbFldType Field JDBC type in database.
+     * @param dbFldName Field name in database.
+     * @param javaFldType Field java type.
+     * @param javaFldName Field name in java object.
+     */
+    public JdbcTypeField(int dbFldType, String dbFldName, Class<?> javaFldType, String javaFldName) {
+        this.dbFldType = dbFldType;
+        this.dbFldName = dbFldName;
+        this.javaFldType = javaFldType;
+        this.javaFldName = javaFldName;
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param field Field to copy.
+     */
+    public JdbcTypeField(JdbcTypeField field) {
+        this(field.getDatabaseFieldType(), field.getDatabaseFieldName(),
+            field.getJavaFieldType(), field.getJavaFieldName());
+    }
+
+    /**
+     * @return Column JDBC type in database.
+     */
+    public int getDatabaseFieldType() {
+        return dbFldType;
+    }
+
+    /**
+     * @param dbFldType Column JDBC type in database.
+     * @return {@code this} for chaining.
+     */
+    public JdbcTypeField setDatabaseFieldType(int dbFldType) {
+        this.dbFldType = dbFldType;
+
+        return this;
+    }
+
+
+    /**
+     * @return Column name in database.
+     */
+    public String getDatabaseFieldName() {
+        return dbFldName;
+    }
+
+    /**
+     * @param dbFldName Column name in database.
+     * @return {@code this} for chaining.
+     */
+    public JdbcTypeField setDatabaseFieldName(String dbFldName) {
+        this.dbFldName = dbFldName;
+
+        return this;
+    }
+
+    /**
+     * @return Field java type.
+     */
+    public Class<?> getJavaFieldType() {
+        return javaFldType;
+    }
+
+    /**
+     * @param javaFldType Corresponding java type.
+     * @return {@code this} for chaining.
+     */
+    public JdbcTypeField setJavaFieldType(Class<?> javaFldType) {
+        this.javaFldType = javaFldType;
+
+        return this;
+    }
+
+    /**
+     * @return Field name in java object.
+     */
+    public String getJavaFieldName() {
+        return javaFldName;
+    }
+
+    /**
+     * @param javaFldName Field name in java object.
+     * @return {@code this} for chaining.
+     */
+    public JdbcTypeField setJavaFieldName(String javaFldName) {
+        this.javaFldName = javaFldName;
+
+        return this;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof JdbcTypeField))
+            return false;
+
+        JdbcTypeField that = (JdbcTypeField)o;
+
+        return dbFldType == that.dbFldType && dbFldName.equals(that.dbFldName) &&
+            javaFldType == that.javaFldType && javaFldName.equals(that.javaFldName);
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = dbFldType;
+        res = 31 * res + dbFldName.hashCode();
+
+        res = 31 * res + javaFldType.hashCode();
+        res = 31 * res + javaFldName.hashCode();
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(JdbcTypeField.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeHasher.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeHasher.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeHasher.java
new file mode 100644
index 0000000..9d1fcea
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeHasher.java
@@ -0,0 +1,34 @@
+/*
+ * 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.cache.store.jdbc;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+/**
+ * API for implementing custom hashing logic for binary objects on server side.
+ */
+public interface JdbcTypeHasher extends Serializable {
+    /**
+     * Calculate hash code for specified object and fields.
+     *
+     * @param values Collection of values that should participate in hash code calculation.
+     * @return Hash code.
+     */
+    public int hashCode(Collection<?> values);
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index fbe54e0..d0eeeb1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -260,6 +260,10 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                     if (F.isEmpty(meta.getValueType()))
                         throw new IgniteCheckedException("Value type is not set: " + meta);
 
+                    if (meta.getQueryFields().isEmpty() && meta.getAscendingFields().isEmpty() &&
+                        meta.getDescendingFields().isEmpty() && meta.getGroups().isEmpty())
+                        continue;
+
                     TypeDescriptor desc = new TypeDescriptor();
 
                     // Key and value classes still can be available if they are primitive or JDK part.
@@ -2314,4 +2318,4 @@ public class GridQueryProcessor extends GridProcessorAdapter {
     private enum IndexType {
         ASC, DESC, TEXT
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
index 6171ff8..1bbcf2f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
@@ -229,7 +229,9 @@ public class VisorCache implements Serializable {
     protected void estimateMemorySize(IgniteEx ignite, GridCacheAdapter ca, int sample) throws IgniteCheckedException {
         int size = ca.size();
 
-        Set<GridCacheEntryEx> set = ca.map().entries0();
+        Set<GridCacheEntryEx> set = ca.context().isNear()
+            ? ((GridNearCacheAdapter)ca).dht().map().entries0()
+            : ca.map().entries0();
 
         long memSz = 0;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
new file mode 100644
index 0000000..0f40bd9
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
@@ -0,0 +1,395 @@
+/*
+ * 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.cache.store.jdbc;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.store.jdbc.dialect.H2Dialect;
+import org.apache.ignite.cache.store.jdbc.model.Person;
+import org.apache.ignite.cache.store.jdbc.model.PersonKey;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.ConnectorConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.marshaller.Marshaller;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.h2.jdbcx.JdbcConnectionPool;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+
+/**
+ * Class for {@code PojoCacheStore} tests.
+ */
+public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstractTest {
+    /** IP finder. */
+    protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** DB connection URL. */
+    protected static final String DFLT_CONN_URL = "jdbc:h2:mem:TestDatabase;DB_CLOSE_DELAY=-1";
+
+    /** Organization count. */
+    protected static final int ORGANIZATION_CNT = 1000;
+
+    /** Person count. */
+    protected static final int PERSON_CNT = 100000;
+
+    /** Flag indicating that tests should use transactional cache. */
+    protected static boolean transactional;
+
+    /** Flag indicating that tests should use primitive classes like java.lang.Integer for keys. */
+    protected static boolean builtinKeys;
+
+    /** Flag indicating that classes for keys available on class path or not. */
+    protected static boolean noKeyClasses;
+
+    /** Flag indicating that classes for values available on class path or not. */
+    protected static boolean noValClasses;
+
+    /**
+     * @return Connection to test in-memory H2 database.
+     * @throws SQLException
+     */
+    protected Connection getConnection() throws SQLException {
+        return DriverManager.getConnection(DFLT_CONN_URL, "sa", "");
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        Connection conn = getConnection();
+
+        Statement stmt = conn.createStatement();
+
+        stmt.executeUpdate("DROP TABLE IF EXISTS Organization");
+        stmt.executeUpdate("DROP TABLE IF EXISTS Person");
+
+        stmt.executeUpdate("CREATE TABLE Organization (" +
+            " id INTEGER PRIMARY KEY," +
+            " name VARCHAR(50)," +
+            " city VARCHAR(50))");
+
+        stmt.executeUpdate("CREATE TABLE Person (" +
+            " id INTEGER PRIMARY KEY," +
+            " org_id INTEGER," +
+            " name VARCHAR(50))");
+
+        conn.commit();
+
+        U.closeQuiet(stmt);
+
+        fillSampleDatabase(conn);
+
+        U.closeQuiet(conn);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+        disco.setIpFinder(IP_FINDER);
+
+        cfg.setDiscoverySpi(disco);
+
+        cfg.setCacheConfiguration(cacheConfiguration());
+
+        cfg.setMarshaller(marshaller());
+
+        ConnectorConfiguration connCfg = new ConnectorConfiguration();
+        cfg.setConnectorConfiguration(connCfg);
+
+        return cfg;
+    }
+
+    /**
+     * @return Marshaller to be used in test.
+     */
+    protected abstract Marshaller marshaller();
+
+    /**
+     * @return Types to be used in test.
+     */
+    protected JdbcType[] storeTypes() {
+        JdbcType[] storeTypes = new JdbcType[2];
+
+        storeTypes[0] = new JdbcType();
+        storeTypes[0].setDatabaseSchema("PUBLIC");
+        storeTypes[0].setDatabaseTable("ORGANIZATION");
+
+        if (builtinKeys) {
+            storeTypes[0].setKeyType("java.lang.Integer");
+            storeTypes[0].setKeyFields(new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"));
+        }
+        else {
+            storeTypes[0].setKeyType("org.apache.ignite.cache.store.jdbc.model.OrganizationKey" + (noKeyClasses ? "1" : ""));
+            storeTypes[0].setKeyFields(new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"));
+        }
+
+        storeTypes[0].setValueType("org.apache.ignite.cache.store.jdbc.model.Organization" + (noValClasses ? "1" : ""));
+        storeTypes[0].setValueFields(
+            new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"),
+            new JdbcTypeField(Types.VARCHAR, "NAME", String.class, "name"),
+            new JdbcTypeField(Types.VARCHAR, "CITY", String.class, "city"));
+
+        storeTypes[1] = new JdbcType();
+        storeTypes[1].setDatabaseSchema("PUBLIC");
+        storeTypes[1].setDatabaseTable("PERSON");
+
+        if (builtinKeys) {
+            storeTypes[1].setKeyType("java.lang.Long");
+            storeTypes[1].setKeyFields(new JdbcTypeField(Types.INTEGER, "ID", Long.class, "id"));
+        }
+        else {
+            storeTypes[1].setKeyType("org.apache.ignite.cache.store.jdbc.model.PersonKey" + (noKeyClasses ? "1" : ""));
+            storeTypes[1].setKeyFields(new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"));
+        }
+
+        storeTypes[1].setValueType("org.apache.ignite.cache.store.jdbc.model.Person" + (noValClasses ? "1" : ""));
+        storeTypes[1].setValueFields(
+            new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"),
+            new JdbcTypeField(Types.INTEGER, "ORG_ID", Integer.class, "orgId"),
+            new JdbcTypeField(Types.VARCHAR, "NAME", String.class, "name"));
+
+        return storeTypes;
+    }
+
+    /**
+     * @return Cache configuration for test.
+     * @throws Exception In case when failed to create cache configuration.
+     */
+    protected CacheConfiguration cacheConfiguration() throws Exception {
+        CacheConfiguration cc = defaultCacheConfiguration();
+
+        cc.setCacheMode(PARTITIONED);
+        cc.setAtomicityMode(transactional ? TRANSACTIONAL : ATOMIC);
+        cc.setSwapEnabled(false);
+        cc.setWriteBehindEnabled(false);
+
+        CacheJdbcPojoStoreFactory<Object, Object> storeFactory = new CacheJdbcPojoStoreFactory<>();
+        storeFactory.setDialect(new H2Dialect());
+        storeFactory.setTypes(storeTypes());
+        storeFactory.setDataSource(JdbcConnectionPool.create(DFLT_CONN_URL, "sa", "")); // H2 DataSource
+
+        cc.setCacheStoreFactory(storeFactory);
+        cc.setReadThrough(true);
+        cc.setWriteThrough(true);
+        cc.setLoadPreviousValue(true);
+
+        return cc;
+    }
+
+    /**
+     * Fill in-memory database with sample data.
+     *
+     * @param conn Connection to database.
+     * @throws SQLException In case of filling database with sample data failed.
+     */
+    protected void fillSampleDatabase(Connection conn) throws SQLException {
+        info("Start to fill sample database...");
+
+        PreparedStatement orgStmt = conn.prepareStatement("INSERT INTO Organization(id, name, city) VALUES (?, ?, ?)");
+
+        for (int i = 0; i < ORGANIZATION_CNT; i++) {
+            orgStmt.setInt(1, i);
+            orgStmt.setString(2, "name" + i);
+            orgStmt.setString(3, "city" + i % 10);
+
+            orgStmt.addBatch();
+        }
+
+        orgStmt.executeBatch();
+
+        U.closeQuiet(orgStmt);
+
+        conn.commit();
+
+        PreparedStatement prnStmt = conn.prepareStatement("INSERT INTO Person(id, org_id, name) VALUES (?, ?, ?)");
+
+        for (int i = 0; i < PERSON_CNT; i++) {
+            prnStmt.setInt(1, i);
+            prnStmt.setInt(2, i % 100);
+            prnStmt.setString(3, "name" + i);
+
+            prnStmt.addBatch();
+        }
+
+        prnStmt.executeBatch();
+
+        conn.commit();
+
+        U.closeQuiet(prnStmt);
+
+        info("Sample database prepared.");
+    }
+
+    /**
+     * Start test grid with specified options.
+     *
+     * @param builtin {@code True} if keys are built in java types.
+     * @param noKeyCls {@code True} if keys classes are not on class path.
+     * @param noValCls {@code True} if values classes are not on class path.
+     * @param trn {@code True} if cache should be started in transactional mode.
+     * @throws Exception
+     */
+    protected void startTestGrid(boolean builtin, boolean noKeyCls, boolean noValCls, boolean trn) throws Exception {
+        builtinKeys = builtin;
+        noKeyClasses = noKeyCls;
+        noValClasses = noValCls;
+        transactional = trn;
+
+        startGrid();
+    }
+
+    /**
+     * Check that data was loaded correctly.
+     */
+    protected void checkCacheContent() {
+        IgniteCache<Object, Object> c1 = grid().cache(null);
+
+        c1.loadCache(null);
+
+        assertEquals(ORGANIZATION_CNT + PERSON_CNT, c1.size());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCache() throws Exception {
+        startTestGrid(false, false, false, false);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheTx() throws Exception {
+        startTestGrid(false, false, false, true);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCachePrimitiveKeys() throws Exception {
+        startTestGrid(true, false, false, false);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCachePrimitiveKeysTx() throws Exception {
+        startTestGrid(true, false, false, true);
+
+        checkCacheContent();
+    }
+
+    /**
+     * Check put in cache and store it in db.
+     *
+     * @throws Exception If failed.
+     */
+    private void checkPut() throws Exception {
+        IgniteCache<PersonKey, Person> c1 = grid().cache(null);
+
+        Connection conn = getConnection();
+        try {
+            PreparedStatement stmt = conn.prepareStatement("SELECT ID, ORG_ID, NAME FROM PERSON WHERE ID = ?");
+
+            stmt.setInt(1, -1);
+
+            ResultSet rs = stmt.executeQuery();
+
+            assertFalse("Unexpected non empty result set", rs.next());
+
+            U.closeQuiet(rs);
+
+            // Test put-insert.
+            PersonKey key = new PersonKey(-1);
+
+            c1.put(key, new Person(-1, -2, "Person-to-test-put-insert", 999));
+
+            rs = stmt.executeQuery();
+
+            assertTrue("Unexpected empty result set", rs.next());
+
+            assertEquals(-1, rs.getInt(1));
+            assertEquals(-2, rs.getInt(2));
+            assertEquals("Person-to-test-put-insert", rs.getString(3));
+
+            assertFalse("Unexpected more data in result set", rs.next());
+
+            U.closeQuiet(rs);
+
+            // Test put-update.
+            c1.put(key, new Person(-1, -3, "Person-to-test-put-update", 999));
+
+            rs = stmt.executeQuery();
+
+            assertTrue("Unexpected empty result set", rs.next());
+
+            assertEquals(-1, rs.getInt(1));
+            assertEquals(-3, rs.getInt(2));
+            assertEquals("Person-to-test-put-update", rs.getString(3));
+
+            assertFalse("Unexpected more data in result set", rs.next());
+
+            U.closeQuiet(rs);
+        }
+        finally {
+            U.closeQuiet(conn);
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPut() throws Exception {
+        startTestGrid(false, false, false, false);
+
+        checkPut();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPutTx() throws Exception {
+        startTestGrid(false, false, false, true);
+
+        checkPut();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreOptimizedMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreOptimizedMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreOptimizedMarshallerSelfTest.java
new file mode 100644
index 0000000..f40f7d7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreOptimizedMarshallerSelfTest.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.cache.store.jdbc;
+
+import org.apache.ignite.marshaller.Marshaller;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
+
+/**
+ * Class for {@code PojoCacheStore} tests.
+ */
+public class CacheJdbcPojoStoreOptimizedMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected Marshaller marshaller(){
+        return new OptimizedMarshaller();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java
new file mode 100644
index 0000000..39504b1
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java
@@ -0,0 +1,85 @@
+/*
+ * 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.cache.store.jdbc;
+
+import org.apache.ignite.marshaller.Marshaller;
+import org.apache.ignite.marshaller.portable.BinaryMarshaller;
+
+/**
+ * Class for {@code PojoCacheStore} tests.
+ */
+public class CacheJdbcPojoStorePortableMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected Marshaller marshaller(){
+        return new BinaryMarshaller();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheNoKeyClasses() throws Exception {
+        startTestGrid(false, true, false, false);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheNoKeyClassesTx() throws Exception {
+        startTestGrid(false, true, false, true);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheNoValueClasses() throws Exception {
+        startTestGrid(false, false, true, false);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheNoValueClassesTx() throws Exception {
+        startTestGrid(false, false, true, true);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheNoKeyAndValueClasses() throws Exception {
+        startTestGrid(false, true, true, false);
+
+        checkCacheContent();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCacheNoKeyAndValueClassesTx() throws Exception {
+        startTestGrid(false, true, true, true);
+
+        checkCacheContent();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
index 0ad2cad..d8f75d3 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
@@ -17,23 +17,19 @@
 
 package org.apache.ignite.cache.store.jdbc;
 
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.Timestamp;
+import java.sql.Types;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import javax.cache.integration.CacheWriterException;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect;
-import org.apache.ignite.cache.store.jdbc.dialect.JdbcDialect;
+
+import org.apache.ignite.cache.store.jdbc.dialect.H2Dialect;
 import org.apache.ignite.cache.store.jdbc.model.Organization;
 import org.apache.ignite.cache.store.jdbc.model.OrganizationKey;
 import org.apache.ignite.cache.store.jdbc.model.Person;
@@ -41,16 +37,11 @@ import org.apache.ignite.cache.store.jdbc.model.PersonComplexKey;
 import org.apache.ignite.cache.store.jdbc.model.PersonKey;
 import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
 import org.apache.ignite.internal.util.typedef.CI2;
-import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiInClosure;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.cache.GridAbstractCacheStoreSelfTest;
 import org.h2.jdbcx.JdbcConnectionPool;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.support.GenericApplicationContext;
-import org.springframework.core.io.UrlResource;
 
 /**
  * Class for {@code PojoCacheStore} tests.
@@ -59,9 +50,6 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
     /** DB connection URL. */
     private static final String DFLT_CONN_URL = "jdbc:h2:mem:autoCacheStore;DB_CLOSE_DELAY=-1";
 
-    /** Default config with mapping. */
-    private static final String DFLT_MAPPING_CONFIG = "modules/core/src/test/config/store/jdbc/ignite-type-metadata.xml";
-
     /** Organization count. */
     protected static final int ORGANIZATION_CNT = 1000;
 
@@ -77,71 +65,86 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
 
     /** {@inheritDoc} */
     @Override protected CacheJdbcPojoStore<Object, Object> store() {
-        CacheJdbcPojoStore<Object, Object> store = new CacheJdbcPojoStore<>();
-
-//        PGPoolingDataSource ds = new PGPoolingDataSource();
-//        ds.setUser("postgres");
-//        ds.setPassword("postgres");
-//        ds.setServerName("ip");
-//        ds.setDatabaseName("postgres");
-//        store.setDataSource(ds);
-
-//        MysqlDataSource ds = new MysqlDataSource();
-//        ds.setURL("jdbc:mysql://ip:port/dbname");
-//        ds.setUser("mysql");
-//        ds.setPassword("mysql");
-
+        CacheJdbcPojoStoreFactory<Object, Object> storeFactory = new CacheJdbcPojoStoreFactory<>();
+
+        JdbcType[] storeTypes = new JdbcType[6];
+
+        storeTypes[0] = new JdbcType();
+        storeTypes[0].setDatabaseSchema("PUBLIC");
+        storeTypes[0].setDatabaseTable("ORGANIZATION");
+        storeTypes[0].setKeyType("org.apache.ignite.cache.store.jdbc.model.OrganizationKey");
+        storeTypes[0].setKeyFields(new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"));
+
+        storeTypes[0].setValueType("org.apache.ignite.cache.store.jdbc.model.Organization");
+        storeTypes[0].setValueFields(
+            new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"),
+            new JdbcTypeField(Types.VARCHAR, "NAME", String.class, "name"),
+            new JdbcTypeField(Types.VARCHAR, "CITY", String.class, "city"));
+
+        storeTypes[1] = new JdbcType();
+        storeTypes[1].setDatabaseSchema("PUBLIC");
+        storeTypes[1].setDatabaseTable("PERSON");
+        storeTypes[1].setKeyType("org.apache.ignite.cache.store.jdbc.model.PersonKey");
+        storeTypes[1].setKeyFields(new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"));
+
+        storeTypes[1].setValueType("org.apache.ignite.cache.store.jdbc.model.Person");
+        storeTypes[1].setValueFields(
+            new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"),
+            new JdbcTypeField(Types.INTEGER, "ORG_ID", Integer.class, "orgId"),
+            new JdbcTypeField(Types.VARCHAR, "NAME", String.class, "name"));
+
+        storeTypes[2] = new JdbcType();
+        storeTypes[2].setDatabaseSchema("PUBLIC");
+        storeTypes[2].setDatabaseTable("PERSON_COMPLEX");
+        storeTypes[2].setKeyType("org.apache.ignite.cache.store.jdbc.model.PersonComplexKey");
+        storeTypes[2].setKeyFields(
+            new JdbcTypeField(Types.INTEGER, "ID", int.class, "id"),
+            new JdbcTypeField(Types.INTEGER, "ORG_ID", int.class, "orgId"),
+            new JdbcTypeField(Types.INTEGER, "CITY_ID", int.class, "cityId"));
+
+        storeTypes[2].setValueType("org.apache.ignite.cache.store.jdbc.model.Person");
+        storeTypes[2].setValueFields(
+            new JdbcTypeField(Types.INTEGER, "ID", Integer.class, "id"),
+            new JdbcTypeField(Types.INTEGER, "ORG_ID", Integer.class, "orgId"),
+            new JdbcTypeField(Types.VARCHAR, "NAME", String.class, "name"),
+            new JdbcTypeField(Types.INTEGER, "SALARY", Integer.class, "salary"));
+
+        storeTypes[3] = new JdbcType();
+        storeTypes[3].setDatabaseSchema("PUBLIC");
+        storeTypes[3].setDatabaseTable("TIMESTAMP_ENTRIES");
+        storeTypes[3].setKeyType("java.sql.Timestamp");
+        storeTypes[3].setKeyFields(new JdbcTypeField(Types.TIMESTAMP, "KEY", Timestamp.class, null));
+
+        storeTypes[3].setValueType("java.lang.Integer");
+        storeTypes[3].setValueFields(new JdbcTypeField(Types.INTEGER, "VAL", Integer.class, null));
+
+        storeTypes[4] = new JdbcType();
+        storeTypes[4].setDatabaseSchema("PUBLIC");
+        storeTypes[4].setDatabaseTable("STRING_ENTRIES");
+        storeTypes[4].setKeyType("java.lang.String");
+        storeTypes[4].setKeyFields(new JdbcTypeField(Types.VARCHAR, "KEY", String.class, null));
+
+        storeTypes[4].setValueType("java.lang.String");
+        storeTypes[4].setValueFields(new JdbcTypeField(Types.VARCHAR, "VAL", Integer.class, null));
+
+        storeTypes[5] = new JdbcType();
+        storeTypes[5].setDatabaseSchema("PUBLIC");
+        storeTypes[5].setDatabaseTable("UUID_ENTRIES");
+        storeTypes[5].setKeyType("java.util.UUID");
+        storeTypes[5].setKeyFields(new JdbcTypeField(Types.BINARY, "KEY", UUID.class, null));
+
+        storeTypes[5].setValueType("java.util.UUID");
+        storeTypes[5].setValueFields(new JdbcTypeField(Types.BINARY, "VAL", UUID.class, null));
+
+        storeFactory.setTypes(storeTypes);
+
+        storeFactory.setDialect(new H2Dialect());
+
+        CacheJdbcPojoStore<Object, Object> store = storeFactory.create();
+
+        // H2 DataSource
         store.setDataSource(JdbcConnectionPool.create(DFLT_CONN_URL, "sa", ""));
 
-        URL cfgUrl;
-
-        try {
-            cfgUrl = new URL(DFLT_MAPPING_CONFIG);
-        }
-        catch (MalformedURLException ignore) {
-            cfgUrl = U.resolveIgniteUrl(DFLT_MAPPING_CONFIG);
-        }
-
-        if (cfgUrl == null)
-            throw new IgniteException("Failed to resolve metadata path: " + DFLT_MAPPING_CONFIG);
-
-        try {
-            GenericApplicationContext springCtx = new GenericApplicationContext();
-
-            new XmlBeanDefinitionReader(springCtx).loadBeanDefinitions(new UrlResource(cfgUrl));
-
-            springCtx.refresh();
-
-            Collection<CacheTypeMetadata> typeMeta = springCtx.getBeansOfType(CacheTypeMetadata.class).values();
-
-            Map<Integer, Map<Object, CacheAbstractJdbcStore.EntryMapping>> cacheMappings = new HashMap<>();
-
-            JdbcDialect dialect = store.resolveDialect();
-
-            GridTestUtils.setFieldValue(store, CacheAbstractJdbcStore.class, "dialect", dialect);
-
-            Map<Object, CacheAbstractJdbcStore.EntryMapping> entryMappings = U.newHashMap(typeMeta.size());
-
-            for (CacheTypeMetadata type : typeMeta)
-                entryMappings.put(store.keyTypeId(type.getKeyType()),
-                    new CacheAbstractJdbcStore.EntryMapping(null, dialect, type));
-
-            store.prepareBuilders(null, typeMeta);
-
-            cacheMappings.put(null, entryMappings);
-
-            GridTestUtils.setFieldValue(store, CacheAbstractJdbcStore.class, "cacheMappings", cacheMappings);
-        }
-        catch (BeansException e) {
-            if (X.hasCause(e, ClassNotFoundException.class))
-                throw new IgniteException("Failed to instantiate Spring XML application context " +
-                    "(make sure all classes used in Spring configuration are present at CLASSPATH) " +
-                    "[springUrl=" + cfgUrl + ']', e);
-            else
-                throw new IgniteException("Failed to instantiate Spring XML application context [springUrl=" +
-                    cfgUrl + ", err=" + e.getMessage() + ']', e);
-        }
-
         return store;
     }
 
@@ -224,7 +227,6 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
         super.beforeTest();
     }
 
-
     /**
      * @throws Exception If failed.
      */
@@ -274,7 +276,7 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
             if (i > 0)
                 prnComplexStmt.setInt(5, 1000 + i * 500);
             else // Add person with null salary
-                prnComplexStmt.setNull(5, java.sql.Types.INTEGER);
+                prnComplexStmt.setNull(5, Types.INTEGER);
 
             prnComplexStmt.addBatch();
         }
@@ -302,9 +304,9 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
 
                     Person val = (Person)v;
 
-                    assert key.getId() == val.getId();
-                    assert key.getOrgId() == val.getOrgId();
-                    assertEquals("name"  + key.getId(), val.getName());
+                    assertTrue("Key ID should be the same as value ID", key.getId() == val.getId());
+                    assertTrue("Key orgID should be the same as value orgID", key.getOrgId() == val.getOrgId());
+                    assertEquals("name" + key.getId(), val.getName());
 
                     prnComplexKeys.add((PersonComplexKey)k);
                 }
@@ -351,25 +353,23 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
      * @throws Exception If failed.
      */
     public void testWriteRetry() throws Exception {
+        CacheJdbcPojoStore<Object, Object> store = store();
+
         // Special dialect that will skip updates, to test write retry.
-        BasicJdbcDialect dialect = new BasicJdbcDialect() {
+        store.setDialect(new H2Dialect() {
             /** {@inheritDoc} */
-            @Override public String updateQuery(String tblName, Collection<String> keyCols, Iterable<String> valCols) {
-                return super.updateQuery(tblName, keyCols, valCols) + " AND 1 = 0";
+            @Override public boolean hasMerge() {
+                return false;
             }
-        };
-
-        store.setDialect(dialect);
-
-        Map<String, Map<Object, CacheAbstractJdbcStore.EntryMapping>> cacheMappings =
-            GridTestUtils.getFieldValue(store, CacheAbstractJdbcStore.class, "cacheMappings");
-
-        CacheAbstractJdbcStore.EntryMapping em = cacheMappings.get(null).get(OrganizationKey.class);
 
-        CacheTypeMetadata typeMeta = GridTestUtils.getFieldValue(em, CacheAbstractJdbcStore.EntryMapping.class, "typeMeta");
+            /** {@inheritDoc} */
+            @Override public String updateQuery(String tblName, Collection<String> keyCols,
+                Iterable<String> valCols) {
+                return super.updateQuery(tblName, keyCols, valCols) + " AND 1 = 0";
+            }
+        });
 
-        cacheMappings.get(null).put(OrganizationKey.class,
-            new CacheAbstractJdbcStore.EntryMapping(null, dialect, typeMeta));
+        inject(store);
 
         Connection conn = store.openConnection(false);
 
@@ -392,6 +392,8 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
 
         try {
             store.write(new CacheEntryImpl<>(k1, v1));
+
+            fail("CacheWriterException wasn't thrown.");
         }
         catch (CacheWriterException e) {
             if (!e.getMessage().startsWith("Failed insert entry in database, violate a unique index or primary key") ||
@@ -418,4 +420,4 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
 
         assertNull(store.load(k));
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d71f6129/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
index 757cedd..4c4bd58 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
@@ -308,4 +308,4 @@ public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends Cach
             }
         }, 8, "tx");
     }
-}
\ No newline at end of file
+}


[29/50] [abbrv] ignite git commit: IGNITE-1961: Binary format: optimized sequential reads.

Posted by sb...@apache.org.
IGNITE-1961: Binary format: optimized sequential reads.


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

Branch: refs/heads/master
Commit: 5dce6d982dd756555bdc5eb868bd8a3fa1359aeb
Parents: 07f5a62
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Nov 23 11:06:23 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 23 11:06:23 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryReaderExImpl.java   | 211 +++++++++++--------
 1 file changed, 122 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5dce6d98/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
index 5d31670..2534fd7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
@@ -129,15 +129,15 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     /** */
     private final int start;
 
+    /** Start of actual data. Positioned right after the header. */
+    private final int dataStart;
+
     /** Type ID. */
     private final int typeId;
 
     /** Raw offset. */
     private final int rawOff;
 
-    /** */
-    private final int hdrLen;
-
     /** Footer start. */
     private final int footerStart;
 
@@ -241,12 +241,12 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
                 int clsNameLen = in.position() - off;
 
-                hdrLen = DFLT_HDR_LEN + clsNameLen;
+                dataStart = start + DFLT_HDR_LEN + clsNameLen;
             }
             else {
                 typeId = typeId0;
 
-                hdrLen = DFLT_HDR_LEN;
+                dataStart = start + DFLT_HDR_LEN;
             }
 
             idMapper = userType ? ctx.userTypeIdMapper(typeId) : null;
@@ -255,7 +255,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
         else {
             typeId = 0;
             rawOff = 0;
-            hdrLen = 0;
+            dataStart = 0;
             footerStart = 0;
             footerLen = 0;
             idMapper = null;
@@ -266,7 +266,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             schema = null;
         }
 
-        in.position(start);
+        streamPosition(start);
     }
 
     /**
@@ -297,10 +297,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @throws BinaryObjectException In case of error.
      */
     public Object unmarshal(int offset) throws BinaryObjectException {
-        // Random reads prevent any further speculations.
-        matching = false;
-
-        in.position(offset);
+        streamPosition(offset);
 
         return in.position() >= 0 ? unmarshal() : null;
     }
@@ -395,18 +392,18 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @return Field.
      */
     private <T> T readHandleField() {
-        int handle = (in.position() - 1) - in.readInt();
+        int handlePos = positionForHandle() - in.readInt();
 
-        int retPos = in.position();
-
-        Object obj = rCtx.get(handle);
+        Object obj = rCtx.get(handlePos);
 
         if (obj == null) {
-            in.position(handle);
+            int retPos = in.position();
+
+            streamPosition(handlePos);
 
             obj = doReadObject();
 
-            in.position(retPos);
+            streamPosition(retPos);
         }
 
         return (T)obj;
@@ -1387,7 +1384,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
     /** {@inheritDoc} */
     @Override public BinaryRawReader rawReader() {
-        in.position(rawOff);
+        streamPositionRandom(rawOff);
 
         return this;
     }
@@ -1405,43 +1402,51 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             case NULL:
                 return null;
 
-            case HANDLE:
-                int handle = start - in.readInt();
+            case HANDLE: {
+                int handlePos = start - in.readInt();
+
+                Object obj = rCtx.get(handlePos);
 
-                BinaryObject handledPo = rCtx.get(handle);
+                if (obj == null) {
+                    int retPos = in.position();
 
-                if (handledPo != null)
-                    return handledPo;
+                    streamPosition(handlePos);
 
-                in.position(handle);
+                    obj = unmarshal();
 
-                return unmarshal();
+                    streamPosition(retPos);
+                }
 
-            case OBJ:
+                return obj;
+            }
+
+            case OBJ: {
                 PortableUtils.checkProtocolVersion(in.readByte());
 
+                int len = PortableUtils.length(in, start);
+
                 BinaryObjectEx po;
 
                 if (detach) {
-                    in.position(start + GridPortableMarshaller.TOTAL_LEN_POS);
-
-                    int len = in.readInt();
-
-                    in.position(start);
+                    // In detach mode we simply copy object's content.
+                    streamPosition(start);
 
                     po = new BinaryObjectImpl(ctx, in.readByteArray(len), 0);
                 }
-                else
-                    po = in.offheapPointer() > 0
-                        ? new BinaryObjectOffheapImpl(ctx, in.offheapPointer(), start,
-                        in.remaining() + in.position())
-                        : new BinaryObjectImpl(ctx, in.array(), start);
+                else {
+                    if (in.offheapPointer() == 0)
+                        po = new BinaryObjectImpl(ctx, in.array(), start);
+                    else
+                        po = new BinaryObjectOffheapImpl(ctx, in.offheapPointer(), start,
+                            in.remaining() + in.position());
 
-                rCtx.put(start, po);
+                    streamPosition(start + po.length());
+                }
 
-                in.position(start + po.length());
+                rCtx.put(start, po);
 
                 return po;
+            }
 
             case BYTE:
                 return in.readByte();
@@ -1546,20 +1551,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 return doReadClass();
 
             case OPTM_MARSH:
-                int len = in.readInt();
-
-                ByteArrayInputStream input = new ByteArrayInputStream(in.array(), in.position(), len);
-
-                Object obj;
-
-                try {
-                    obj = ctx.optimizedMarsh().unmarshal(input, null);
-                }
-                catch (IgniteCheckedException e) {
-                    throw new BinaryObjectException("Failed to unmarshal object with optmMarsh marshaller", e);
-                }
-
-                return obj;
+                return doReadOptimized();
 
             default:
                 throw new BinaryObjectException("Invalid flag value: " + flag);
@@ -1592,11 +1584,13 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             return new String(doReadByteArray(), UTF_8);
 
         int strLen = in.readInt();
-        int strOff = in.position();
 
-        String res = new String(in.array(), strOff, strLen, UTF_8);
+        int pos = in.position();
 
-        in.position(strOff + strLen);
+        // String will copy necessary array part for us.
+        String res = new String(in.array(), pos, strLen, UTF_8);
+
+        streamPosition(pos + strLen);
 
         return res;
     }
@@ -1657,18 +1651,18 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 break;
 
             case HANDLE:
-                int handle = start - in.readInt();
+                int handlePos = start - in.readInt();
 
-                obj = rCtx.get(handle);
+                obj = rCtx.get(handlePos);
 
                 if (obj == null) {
                     int retPos = in.position();
 
-                    in.position(handle);
+                    streamPosition(handlePos);
 
                     obj = doReadObject();
 
-                    in.position(retPos);
+                    streamPosition(retPos);
                 }
 
                 break;
@@ -1676,14 +1670,14 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             case OBJ:
                 PortableClassDescriptor desc = ctx.descriptorForTypeId(userType, typeId, ldr);
 
-                in.position(start + hdrLen);
+                streamPosition(dataStart);
 
                 if (desc == null)
                     throw new BinaryInvalidTypeException("Unknown type ID: " + typeId);
 
                 obj = desc.read(this);
 
-                in.position(footerStart + footerLen);
+                streamPosition(footerStart + footerLen);
 
                 break;
 
@@ -1863,18 +1857,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 break;
 
             case OPTM_MARSH:
-                int dataLen = in.readInt();
-
-                ByteArrayInputStream input = new ByteArrayInputStream(in.array(), in.position(), dataLen);
-
-                try {
-                    obj = ctx.optimizedMarsh().unmarshal(input, null);
-                }
-                catch (IgniteCheckedException e) {
-                    throw new BinaryObjectException("Failed to unmarshal object with optimized marshaller", e);
-                }
-
-                in.position(in.position() + dataLen);
+                obj = doReadOptimized();
 
                 break;
 
@@ -1886,6 +1869,27 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
+     * Read object serialized using optimized marshaller.
+     *
+     * @return Result.
+     */
+    private Object doReadOptimized() {
+        int len = in.readInt();
+
+        ByteArrayInputStream input = new ByteArrayInputStream(in.array(), in.position(), len);
+
+        try {
+            return ctx.optimizedMarsh().unmarshal(input, null);
+        }
+        catch (IgniteCheckedException e) {
+            throw new BinaryObjectException("Failed to unmarshal object with optimized marshaller", e);
+        }
+        finally {
+            streamPosition(in.position() + len);
+        }
+    }
+
+    /**
      * @return Value.
      */
     private byte[] doReadByteArray() {
@@ -2297,7 +2301,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
             int pos = in.position();
 
-            in.position(in.position() + len);
+            streamPosition(in.position() + len);
 
             int start = in.readInt();
 
@@ -2479,7 +2483,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * @return Offset.
      */
     public boolean findFieldByName(String name) {
-        assert hdrLen != 0;
+        assert dataStart != start;
 
         if (footerLen == 0)
             return false;
@@ -2495,9 +2499,11 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 switch (confirm) {
                     case CONFIRMED:
                         // The best case: got order without ID calculation and (ID -> order) lookup.
-                        order = expOrder;
+                        if (expOrder == 0)
+                            // When we read the very first field, position is set to start, hence this re-positioning.
+                            streamPosition(dataStart);
 
-                        break;
+                        return true;
 
                     case REJECTED:
                         // Rejected, no more speculations are possible. Fallback to the slowest scenario.
@@ -2518,7 +2524,10 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                             // IDs matched, cache field name inside schema.
                             schema.clarifyFieldName(expOrder, name);
 
-                            order = expOrder;
+                            if (expOrder == 0)
+                                streamPosition(dataStart);
+
+                            return true;
                         }
                         else {
                             // No match, stop further speculations.
@@ -2544,10 +2553,10 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
      * (string -> ID) calculations.
      *
      * @param id Field ID.
-     * @return Offset.
+     * @return {@code True} if field was found and stream was positioned accordingly.
      */
     private boolean findFieldById(int id) {
-        assert hdrLen != 0;
+        assert dataStart != start;
 
         if (footerLen == 0)
             return false;
@@ -2561,8 +2570,12 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
                 int realId = schema.fieldId(expOrder);
 
-                if (realId == id)
-                    order = expOrder;
+                if (realId == id) {
+                    if (expOrder == 0)
+                        streamPosition(dataStart);
+
+                    return true;
+                }
                 else {
                     // Mismatch detected, no need for further speculations.
                     matching = false;
@@ -2580,10 +2593,10 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
-     * Set position for the given user field order and return it.
+     * Set position for the given user field order.
      *
      * @param order Order.
-     * @return Position.
+     * @return {@code True} if field was found and stream was positioned accordingly.
      */
     private boolean trySetUserFieldPosition(int order) {
         if (order != PortableSchema.ORDER_NOT_FOUND) {
@@ -2591,7 +2604,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
             int pos = start + PortableUtils.fieldOffsetRelative(in, offsetPos, fieldOffsetLen);
 
-            in.position(pos);
+            streamPosition(pos);
 
             return true;
         }
@@ -2600,10 +2613,10 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     }
 
     /**
-     * Set position for the given system field ID and return it.
+     * Set position for the given system field ID.
      *
      * @param id Field ID.
-     * @return Position.
+     * @return {@code True} if field was found and stream was positioned accordingly.
      */
     private boolean trySetSystemFieldPosition(int id) {
         // System types are never written with compact footers because they do not have metadata.
@@ -2622,7 +2635,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
                 int pos = start + PortableUtils.fieldOffsetRelative(in, searchPos + PortableUtils.FIELD_ID_LEN,
                     fieldOffsetLen);
 
-                in.position(pos);
+                streamPosition(pos);
 
                 return true;
             }
@@ -2631,6 +2644,26 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
         }
     }
 
+    /**
+     * Set stream position.
+     *
+     * @param pos Position.
+     */
+    private void streamPosition(int pos) {
+        in.position(pos);
+    }
+
+    /**
+     * Set stream position as a part of some random read. Further speculations will be disabled after this call.
+     *
+     * @param pos Position.
+     */
+    private void streamPositionRandom(int pos) {
+        streamPosition(pos);
+
+        matching = false;
+    }
+
     /** {@inheritDoc} */
     @Override public int readUnsignedByte() throws IOException {
         return readByte() & 0xff;
@@ -2697,7 +2730,7 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
     @Override public int skipBytes(int n) throws IOException {
         int toSkip = Math.min(in.remaining(), n);
 
-        in.position(in.position() + toSkip);
+        streamPositionRandom(in.position() + toSkip);
 
         return toSkip;
     }


[45/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5


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

Branch: refs/heads/master
Commit: e4109f9800baa5b0783755cf537c46000ffd4305
Parents: fe53753 aee7b75
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Nov 23 22:08:35 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Nov 23 22:08:35 2015 +0700

----------------------------------------------------------------------
 .../internal/GridEventConsumeHandler.java       |    6 +-
 .../internal/GridMessageListenHandler.java      |    6 +-
 .../internal/portable/BinaryObjectImpl.java     |   32 +-
 .../portable/BinaryObjectOffheapImpl.java       |   27 +-
 .../internal/portable/BinaryReaderExImpl.java   | 1015 ++----------------
 .../portable/BinaryReaderHandlesHolder.java     |   46 +
 .../portable/BinaryReaderHandlesHolderImpl.java |   44 +
 .../portable/GridPortableMarshaller.java        |   23 +-
 .../portable/PortableClassDescriptor.java       |    8 +-
 .../ignite/internal/portable/PortableUtils.java |  861 ++++++++++++++-
 .../portable/builder/PortableBuilderReader.java |   21 +-
 .../processors/cache/GridCacheMapEntry.java     |    3 +-
 .../continuous/CacheContinuousQueryHandler.java |    7 +-
 .../continuous/GridContinuousHandler.java       |    6 +-
 .../continuous/GridContinuousProcessor.java     |   50 +-
 .../platform/PlatformContextImpl.java           |    4 +-
 ...chePartitionedAtomicSetFailoverSelfTest.java |    5 +
 ...ContinuousQueryFailoverAbstractSelfTest.java |    2 +-
 .../continuous/GridEventConsumeSelfTest.java    |    2 +-
 .../IgniteAtomicInvokeRetryBenchmark.java       |    2 +-
 .../failover/IgniteConsistencyException.java    |   64 ++
 ...IgniteTransactionalInvokeRetryBenchmark.java |    2 +-
 ...IgniteTransactionalWriteInvokeBenchmark.java |  135 ++-
 .../IgniteTransactionalWriteReadBenchmark.java  |    2 +-
 24 files changed, 1312 insertions(+), 1061 deletions(-)
----------------------------------------------------------------------



[25/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1.5-tx-futs-opts

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/7cd4a77a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/7cd4a77a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index 7e17efe,b266ad2..bd6c2a7
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@@ -142,9 -143,9 +142,12 @@@ public final class GridDhtColocatedLock
      /** Skip store flag. */
      private final boolean skipStore;
  
 +    /** */
 +    private Deque<GridNearLockMapping> mappings;
 +
+     /** Keep binary. */
+     private final boolean keepBinary;
+ 
      /**
       * @param cctx Registry.
       * @param keys Keys to lock.
@@@ -727,213 -720,214 +732,242 @@@
       */
      private void map(Collection<KeyCacheObject> keys, boolean remap, boolean topLocked) {
          try {
 -            AffinityTopologyVersion topVer = this.topVer.get();
 +            map0(
 +                keys,
 +                remap,
 +                topLocked);
 +        }
 +        catch (IgniteCheckedException ex) {
 +            onDone(false, ex);
 +        }
 +    }
  
 -            assert topVer != null;
 +    private synchronized void map0(
 +        Collection<KeyCacheObject> keys,
 +        boolean remap,
 +        boolean topLocked
 +    ) throws IgniteCheckedException {
 +        AffinityTopologyVersion topVer = this.topVer;
  
 -            assert topVer.topologyVersion() > 0;
 +        assert topVer != null;
  
 -            if (CU.affinityNodes(cctx, topVer).isEmpty()) {
 -                onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for cache " +
 -                    "(all partition nodes left the grid): " + cctx.name()));
 +        assert topVer.topologyVersion() > 0;
  
 -                return;
 -            }
 +        if (CU.affinityNodes(cctx, topVer).isEmpty()) {
 +            onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for cache " +
 +                "(all partition nodes left the grid): " + cctx.name()));
  
 -            boolean clientNode = cctx.kernalContext().clientNode();
 +            return;
 +        }
  
 -            assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks()));
 +        boolean clientNode = cctx.kernalContext().clientNode();
  
 -            // First assume this node is primary for all keys passed in.
 -            if (!clientNode && mapAsPrimary(keys, topVer))
 -                return;
 +        assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks()));
  
 -            Deque<GridNearLockMapping> mappings = new ConcurrentLinkedDeque8<>();
 +        // First assume this node is primary for all keys passed in.
 +        if (!clientNode && mapAsPrimary(keys, topVer))
 +            return;
  
 -            // Assign keys to primary nodes.
 -            GridNearLockMapping map = null;
 +        mappings = new ArrayDeque<>();
  
 -            for (KeyCacheObject key : keys) {
 -                GridNearLockMapping updated = map(key, map, topVer);
 +        // Assign keys to primary nodes.
 +        GridNearLockMapping map = null;
  
 -                // If new mapping was created, add to collection.
 -                if (updated != map) {
 -                    mappings.add(updated);
 +        for (KeyCacheObject key : keys) {
 +            GridNearLockMapping updated = map(key, map, topVer);
  
 -                    if (tx != null && updated.node().isLocal())
 -                        tx.colocatedLocallyMapped(true);
 -                }
 +            // If new mapping was created, add to collection.
 +            if (updated != map) {
 +                mappings.add(updated);
  
 -                map = updated;
 +                if (tx != null && updated.node().isLocal())
 +                    tx.colocatedLocallyMapped(true);
              }
  
 -            if (isDone()) {
 -                if (log.isDebugEnabled())
 -                    log.debug("Abandoning (re)map because future is done: " + this);
 -
 -                return;
 -            }
 +            map = updated;
 +        }
  
 +        if (isDone()) {
              if (log.isDebugEnabled())
 -                log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
 +                log.debug("Abandoning (re)map because future is done: " + this);
 +
 +            return;
 +        }
  
 -            boolean hasRmtNodes = false;
 +        if (log.isDebugEnabled())
 +            log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
  
 -            boolean first = true;
 +        boolean hasRmtNodes = false;
  
 -            // Create mini futures.
 -            for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
 -                GridNearLockMapping mapping = iter.next();
 +        boolean first = true;
  
 -                ClusterNode node = mapping.node();
 -                Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
 +        // Create mini futures.
 +        for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
 +            GridNearLockMapping mapping = iter.next();
  
 -                boolean loc = node.equals(cctx.localNode());
 +            ClusterNode node = mapping.node();
 +            Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
  
 -                assert !mappedKeys.isEmpty();
 +            boolean loc = node.equals(cctx.localNode());
  
 -                GridNearLockRequest req = null;
 +            assert !mappedKeys.isEmpty();
  
 -                Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
 +            GridNearLockRequest req = null;
  
 -                for (KeyCacheObject key : mappedKeys) {
 -                    IgniteTxKey txKey = cctx.txKey(key);
 +            Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
  
 -                    GridDistributedCacheEntry entry = null;
 +            for (KeyCacheObject key : mappedKeys) {
 +                IgniteTxKey txKey = cctx.txKey(key);
  
 -                    if (tx != null) {
 -                        IgniteTxEntry txEntry = tx.entry(txKey);
 +                GridDistributedCacheEntry entry = null;
  
 -                        if (txEntry != null) {
 -                            entry = (GridDistributedCacheEntry)txEntry.cached();
 +                if (tx != null) {
 +                    IgniteTxEntry txEntry = tx.entry(txKey);
  
 -                            if (entry != null && !(loc ^ entry.detached())) {
 -                                entry = cctx.colocated().entryExx(key, topVer, true);
 +                    if (txEntry != null) {
 +                        entry = (GridDistributedCacheEntry)txEntry.cached();
  
 -                                txEntry.cached(entry);
 -                            }
 +                        if (entry != null && !(loc ^ entry.detached())) {
 +                            entry = cctx.colocated().entryExx(key, topVer, true);
 +
 +                            txEntry.cached(entry);
                          }
                      }
 +                }
  
 -                    boolean explicit;
 +                boolean explicit;
  
 -                    while (true) {
 -                        try {
 -                            if (entry == null)
 -                                entry = cctx.colocated().entryExx(key, topVer, true);
 +                while (true) {
 +                    try {
 +                        if (entry == null)
 +                            entry = cctx.colocated().entryExx(key, topVer, true);
  
 -                            if (!cctx.isAll(entry, filter)) {
 -                                if (log.isDebugEnabled())
 -                                    log.debug("Entry being locked did not pass filter (will not lock): " + entry);
 +                        if (!cctx.isAll(entry, filter)) {
 +                            if (log.isDebugEnabled())
 +                                log.debug("Entry being locked did not pass filter (will not lock): " + entry);
  
 -                                onComplete(false, false);
 +                            onComplete(false, false);
  
 -                                return;
 -                            }
 +                            return;
 +                        }
  
 -                            assert loc ^ entry.detached() : "Invalid entry [loc=" + loc + ", entry=" + entry + ']';
 +                        assert loc ^ entry.detached() : "Invalid entry [loc=" + loc + ", entry=" + entry + ']';
  
 -                            GridCacheMvccCandidate cand = addEntry(entry);
 +                        GridCacheMvccCandidate cand = addEntry(entry);
  
 -                            // Will either return value from dht cache or null if this is a miss.
 -                            IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.detached() ? null :
 -                                ((GridDhtCacheEntry)entry).versionedValue(topVer);
 +                        // Will either return value from dht cache or null if this is a miss.
 +                        IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.detached() ? null :
 +                            ((GridDhtCacheEntry)entry).versionedValue(topVer);
  
 -                            GridCacheVersion dhtVer = null;
 +                        GridCacheVersion dhtVer = null;
  
 -                            if (val != null) {
 -                                dhtVer = val.get1();
 +                        if (val != null) {
 +                            dhtVer = val.get1();
  
 -                                valMap.put(key, val);
 -                            }
 +                            valMap.put(key, val);
 +                        }
  
 -                            if (cand != null && !cand.reentry()) {
 -                                if (req == null) {
 -                                    boolean clientFirst = false;
 +                        if (cand != null && !cand.reentry()) {
 +                            if (req == null) {
 +                                boolean clientFirst = false;
  
 -                                    if (first) {
 -                                        clientFirst = clientNode &&
 -                                            !topLocked &&
 -                                            (tx == null || !tx.hasRemoteLocks());
 +                                if (first) {
 +                                    clientFirst = clientNode &&
 +                                        !topLocked &&
 +                                        (tx == null || !tx.hasRemoteLocks());
  
-                                     first = false;
+                                         first = false;
+                                     }
+ 
+                                     req = new GridNearLockRequest(
+                                         cctx.cacheId(),
+                                         topVer,
+                                         cctx.nodeId(),
+                                         threadId,
+                                         futId,
+                                         lockVer,
+                                         inTx(),
+                                         implicitTx(),
+                                         implicitSingleTx(),
+                                         read,
+                                         retval,
+                                         isolation(),
+                                         isInvalidate(),
+                                         timeout,
+                                         mappedKeys.size(),
+                                         inTx() ? tx.size() : mappedKeys.size(),
+                                         inTx() && tx.syncCommit(),
+                                         inTx() ? tx.subjectId() : null,
+                                         inTx() ? tx.taskNameHash() : 0,
+                                         read ? accessTtl : -1L,
+                                         skipStore,
+                                         keepBinary,
+                                         clientFirst,
+                                         cctx.deploymentEnabled());
+ 
+                                     mapping.request(req);
                                  }
  
 -                                distributedKeys.add(key);
 -
 -                                if (tx != null)
 -                                    tx.addKeyMapping(txKey, mapping.node());
 -
 -                                req.addKeyBytes(
 -                                    key,
 +                                req = new GridNearLockRequest(
 +                                    cctx.cacheId(),
 +                                    topVer,
 +                                    cctx.nodeId(),
 +                                    threadId,
 +                                    futId,
 +                                    lockVer,
 +                                    inTx(),
 +                                    implicitTx(),
 +                                    implicitSingleTx(),
 +                                    read,
                                      retval,
 -                                    dhtVer, // Include DHT version to match remote DHT entry.
 -                                    cctx);
 +                                    isolation(),
 +                                    isInvalidate(),
 +                                    timeout,
 +                                    mappedKeys.size(),
 +                                    inTx() ? tx.size() : mappedKeys.size(),
 +                                    inTx() && tx.syncCommit(),
 +                                    inTx() ? tx.subjectId() : null,
 +                                    inTx() ? tx.taskNameHash() : 0,
 +                                    read ? accessTtl : -1L,
 +                                    skipStore,
 +                                    clientFirst,
 +                                    cctx.deploymentEnabled());
 +
 +                                mapping.request(req);
                              }
  
 -                            explicit = inTx() && cand == null;
 +                            distributedKeys.add(key);
  
 -                            if (explicit)
 +                            if (tx != null)
                                  tx.addKeyMapping(txKey, mapping.node());
  
 -                            break;
 +                            req.addKeyBytes(
 +                                key,
 +                                retval,
 +                                dhtVer, // Include DHT version to match remote DHT entry.
 +                                cctx);
                          }
 -                        catch (GridCacheEntryRemovedException ignored) {
 -                            if (log.isDebugEnabled())
 -                                log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
  
 -                            entry = null;
 -                        }
 -                    }
 +                        explicit = inTx() && cand == null;
  
 -                    // Mark mapping explicit lock flag.
 -                    if (explicit) {
 -                        boolean marked = tx != null && tx.markExplicit(node.id());
 +                        if (explicit)
 +                            tx.addKeyMapping(txKey, mapping.node());
  
 -                        assert tx == null || marked;
 +                        break;
                      }
 -                }
 -
 -                if (inTx() && req != null)
 -                    req.hasTransforms(tx.hasTransforms());
 +                    catch (GridCacheEntryRemovedException ignored) {
 +                        if (log.isDebugEnabled())
 +                            log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
  
 -                if (!distributedKeys.isEmpty()) {
 -                    mapping.distributedKeys(distributedKeys);
 -
 -                    hasRmtNodes |= !mapping.node().isLocal();
 +                        entry = null;
 +                    }
                  }
 -                else {
 -                    assert mapping.request() == null;
  
 -                    iter.remove();
 +                // Mark mapping explicit lock flag.
 +                if (explicit) {
 +                    boolean marked = tx != null && tx.markExplicit(node.id());
 +
 +                    assert tx == null || marked;
                  }
              }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/7cd4a77a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 6f92204,f16573d..832cc3d
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@@ -146,10 -150,9 +146,13 @@@ public final class GridNearLockFuture e
      /** Skip store flag. */
      private final boolean skipStore;
  
 +    /** Mappings to proceed. */
 +    @GridToStringExclude
 +    private Queue<GridNearLockMapping> mappings;
 +
+     /** Keep binary context flag. */
+     private final boolean keepBinary;
+ 
      /**
       * @param cctx Registry.
       * @param keys Keys to lock.
@@@ -848,221 -845,199 +853,222 @@@
  
              assert !remap || (clientNode && (tx == null || !tx.hasRemoteLocks()));
  
 -            ConcurrentLinkedDeque8<GridNearLockMapping> mappings = new ConcurrentLinkedDeque8<>();
 +            synchronized (this) {
 +                mappings = new ArrayDeque<>();
  
 -            // Assign keys to primary nodes.
 -            GridNearLockMapping map = null;
 +                // Assign keys to primary nodes.
 +                GridNearLockMapping map = null;
  
 -            for (KeyCacheObject key : keys) {
 -                GridNearLockMapping updated = map(key, map, topVer);
 +                for (KeyCacheObject key : keys) {
 +                    GridNearLockMapping updated = map(
 +                        key,
 +                        map,
 +                        topVer);
  
 -                // If new mapping was created, add to collection.
 -                if (updated != map) {
 -                    mappings.add(updated);
 +                    // If new mapping was created, add to collection.
 +                    if (updated != map) {
 +                        mappings.add(updated);
  
 -                    if (tx != null && updated.node().isLocal())
 -                        tx.nearLocallyMapped(true);
 +                        if (tx != null && updated.node().isLocal())
 +                            tx.nearLocallyMapped(true);
 +                    }
 +
 +                    map = updated;
                  }
  
 -                map = updated;
 -            }
 +                if (isDone()) {
 +                    if (log.isDebugEnabled())
 +                        log.debug("Abandoning (re)map because future is done: " + this);
  
 -            if (isDone()) {
 -                if (log.isDebugEnabled())
 -                    log.debug("Abandoning (re)map because future is done: " + this);
 +                    return;
 +                }
  
 -                return;
 -            }
 +                if (log.isDebugEnabled())
 +                    log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
  
 -            if (log.isDebugEnabled())
 -                log.debug("Starting (re)map for mappings [mappings=" + mappings + ", fut=" + this + ']');
 +                boolean first = true;
  
 -            boolean first = true;
 +                // Create mini futures.
 +                for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
 +                    GridNearLockMapping mapping = iter.next();
  
 -            // Create mini futures.
 -            for (Iterator<GridNearLockMapping> iter = mappings.iterator(); iter.hasNext(); ) {
 -                GridNearLockMapping mapping = iter.next();
 +                    ClusterNode node = mapping.node();
 +                    Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
  
 -                ClusterNode node = mapping.node();
 -                Collection<KeyCacheObject> mappedKeys = mapping.mappedKeys();
 +                    assert !mappedKeys.isEmpty();
  
 -                assert !mappedKeys.isEmpty();
 +                    GridNearLockRequest req = null;
  
 -                GridNearLockRequest req = null;
 +                    Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
  
 -                Collection<KeyCacheObject> distributedKeys = new ArrayList<>(mappedKeys.size());
 +                    boolean explicit = false;
  
 -                boolean explicit = false;
 +                    for (KeyCacheObject key : mappedKeys) {
 +                        IgniteTxKey txKey = cctx.txKey(key);
  
 -                for (KeyCacheObject key : mappedKeys) {
 -                    IgniteTxKey txKey = cctx.txKey(key);
 +                        while (true) {
 +                            GridNearCacheEntry entry = null;
  
 -                    while (true) {
 -                        GridNearCacheEntry entry = null;
 +                            try {
 +                                entry = cctx.near().entryExx(
 +                                    key,
 +                                    topVer);
  
 -                        try {
 -                            entry = cctx.near().entryExx(key, topVer);
 +                                if (!cctx.isAll(
 +                                    entry,
 +                                    filter)) {
 +                                    if (log.isDebugEnabled())
 +                                        log.debug("Entry being locked did not pass filter (will not lock): " + entry);
  
 -                            if (!cctx.isAll(entry, filter)) {
 -                                if (log.isDebugEnabled())
 -                                    log.debug("Entry being locked did not pass filter (will not lock): " + entry);
 +                                    onComplete(
 +                                        false,
 +                                        false);
  
 -                                onComplete(false, false);
 +                                    return;
 +                                }
  
 -                                return;
 -                            }
 +                                // Removed exception may be thrown here.
 +                                GridCacheMvccCandidate cand = addEntry(
 +                                    topVer,
 +                                    entry,
 +                                    node.id());
  
 -                            // Removed exception may be thrown here.
 -                            GridCacheMvccCandidate cand = addEntry(topVer, entry, node.id());
 +                                if (isDone()) {
 +                                    if (log.isDebugEnabled())
 +                                        log.debug("Abandoning (re)map because future is done after addEntry attempt " +
 +                                            "[fut=" + this + ", entry=" + entry + ']');
  
 -                            if (isDone()) {
 -                                if (log.isDebugEnabled())
 -                                    log.debug("Abandoning (re)map because future is done after addEntry attempt " +
 -                                        "[fut=" + this + ", entry=" + entry + ']');
 +                                    return;
 +                                }
  
 -                                return;
 -                            }
 +                                if (cand != null) {
 +                                    if (tx == null && !cand.reentry())
 +                                        cctx.mvcc().addExplicitLock(
 +                                            threadId,
 +                                            cand,
 +                                            topVer);
  
 -                            if (cand != null) {
 -                                if (tx == null && !cand.reentry())
 -                                    cctx.mvcc().addExplicitLock(threadId, cand, topVer);
 +                                    IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.versionedValue();
  
 -                                IgniteBiTuple<GridCacheVersion, CacheObject> val = entry.versionedValue();
 +                                    if (val == null) {
 +                                        GridDhtCacheEntry dhtEntry = dht().peekExx(key);
  
 -                                if (val == null) {
 -                                    GridDhtCacheEntry dhtEntry = dht().peekExx(key);
 +                                        try {
 +                                            if (dhtEntry != null)
 +                                                val = dhtEntry.versionedValue(topVer);
 +                                        }
 +                                        catch (GridCacheEntryRemovedException ignored) {
 +                                            assert dhtEntry.obsolete() : dhtEntry;
  
 -                                    try {
 -                                        if (dhtEntry != null)
 -                                            val = dhtEntry.versionedValue(topVer);
 +                                            if (log.isDebugEnabled())
 +                                                log.debug("Got removed exception for DHT entry in map (will ignore): "
 +                                                    + dhtEntry);
 +                                        }
                                      }
 -                                    catch (GridCacheEntryRemovedException ignored) {
 -                                        assert dhtEntry.obsolete() : " Got removed exception for non-obsolete entry: "
 -                                            + dhtEntry;
  
 -                                        if (log.isDebugEnabled())
 -                                            log.debug("Got removed exception for DHT entry in map (will ignore): "
 -                                                + dhtEntry);
 -                                    }
 -                                }
 +                                    GridCacheVersion dhtVer = null;
  
 -                                GridCacheVersion dhtVer = null;
 +                                    if (val != null) {
 +                                        dhtVer = val.get1();
  
 -                                if (val != null) {
 -                                    dhtVer = val.get1();
 +                                        valMap.put(
 +                                            key,
 +                                            val);
 +                                    }
  
 -                                    valMap.put(key, val);
 -                                }
 +                                    if (!cand.reentry()) {
 +                                        if (req == null) {
 +                                            boolean clientFirst = false;
  
 -                                if (!cand.reentry()) {
 -                                    if (req == null) {
 -                                        boolean clientFirst = false;
 +                                            if (first) {
 +                                                clientFirst = clientNode &&
 +                                                    !topLocked &&
 +                                                    (tx == null || !tx.hasRemoteLocks());
  
 -                                        if (first) {
 -                                            clientFirst = clientNode &&
 -                                                !topLocked &&
 -                                                (tx == null || !tx.hasRemoteLocks());
 +                                                first = false;
 +                                            }
  
 -                                            first = false;
 +                                            req = new GridNearLockRequest(
 +                                                cctx.cacheId(),
 +                                                topVer,
 +                                                cctx.nodeId(),
 +                                                threadId,
 +                                                futId,
 +                                                lockVer,
 +                                                inTx(),
 +                                                implicitTx(),
 +                                                implicitSingleTx(),
 +                                                read,
 +                                                retval,
 +                                                isolation(),
 +                                                isInvalidate(),
 +                                                timeout,
 +                                                mappedKeys.size(),
 +                                                inTx() ? tx.size() : mappedKeys.size(),
 +                                                inTx() && tx.syncCommit(),
 +                                                inTx() ? tx.subjectId() : null,
 +                                                inTx() ? tx.taskNameHash() : 0,
 +                                                read ? accessTtl : -1L,
 +                                                skipStore,
++                                                keepBinary,
 +                                                clientFirst,
 +                                                cctx.deploymentEnabled());
 +
 +                                            mapping.request(req);
                                          }
  
 -                                        req = new GridNearLockRequest(
 -                                            cctx.cacheId(),
 -                                            topVer,
 -                                            cctx.nodeId(),
 -                                            threadId,
 -                                            futId,
 -                                            lockVer,
 -                                            inTx(),
 -                                            implicitTx(),
 -                                            implicitSingleTx(),
 -                                            read,
 -                                            retval,
 -                                            isolation(),
 -                                            isInvalidate(),
 -                                            timeout,
 -                                            mappedKeys.size(),
 -                                            inTx() ? tx.size() : mappedKeys.size(),
 -                                            inTx() && tx.syncCommit(),
 -                                            inTx() ? tx.subjectId() : null,
 -                                            inTx() ? tx.taskNameHash() : 0,
 -                                            read ? accessTtl : -1L,
 -                                            skipStore,
 -                                            keepBinary,
 -                                            clientFirst,
 -                                            cctx.deploymentEnabled());
 -
 -                                        mapping.request(req);
 -                                    }
 +                                        distributedKeys.add(key);
  
 -                                    distributedKeys.add(key);
 +                                        if (tx != null)
 +                                            tx.addKeyMapping(
 +                                                txKey,
 +                                                mapping.node());
  
 -                                    if (tx != null)
 -                                        tx.addKeyMapping(txKey, mapping.node());
 +                                        req.addKeyBytes(
 +                                            key,
 +                                            retval && dhtVer == null,
 +                                            dhtVer,
 +                                            // Include DHT version to match remote DHT entry.
 +                                            cctx);
 +                                    }
  
 -                                    req.addKeyBytes(
 -                                        key,
 -                                        retval && dhtVer == null,
 -                                        dhtVer, // Include DHT version to match remote DHT entry.
 -                                        cctx);
 +                                    if (cand.reentry())
 +                                        explicit = tx != null && !entry.hasLockCandidate(tx.xidVersion());
                                  }
 -
 -                                if (cand.reentry())
 +                                else
 +                                    // Ignore reentries within transactions.
                                      explicit = tx != null && !entry.hasLockCandidate(tx.xidVersion());
 -                            }
 -                            else
 -                                // Ignore reentries within transactions.
 -                                explicit = tx != null && !entry.hasLockCandidate(tx.xidVersion());
  
 -                            if (explicit)
 -                                tx.addKeyMapping(txKey, mapping.node());
 +                                if (explicit)
 +                                    tx.addKeyMapping(
 +                                        txKey,
 +                                        mapping.node());
  
 -                            break;
 -                        }
 -                        catch (GridCacheEntryRemovedException ignored) {
 -                            assert entry.obsolete() : "Got removed exception on non-obsolete entry: " + entry;
 +                                break;
 +                            }
 +                            catch (GridCacheEntryRemovedException ignored) {
 +                                assert entry.obsolete() : "Got removed exception on non-obsolete entry: " + entry;
  
 -                            if (log.isDebugEnabled())
 -                                log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
 +                                if (log.isDebugEnabled())
 +                                    log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
 +                            }
                          }
 -                    }
  
 -                    // Mark mapping explicit lock flag.
 -                    if (explicit) {
 -                        boolean marked = tx != null && tx.markExplicit(node.id());
 +                        // Mark mapping explicit lock flag.
 +                        if (explicit) {
 +                            boolean marked = tx != null && tx.markExplicit(node.id());
  
 -                        assert tx == null || marked;
 +                            assert tx == null || marked;
 +                        }
                      }
 -                }
  
 -                if (!distributedKeys.isEmpty())
 -                    mapping.distributedKeys(distributedKeys);
 -                else {
 -                    assert mapping.request() == null;
 +                    if (!distributedKeys.isEmpty())
 +                        mapping.distributedKeys(distributedKeys);
 +                    else {
 +                        assert mapping.request() == null;
  
 -                    iter.remove();
 +                        iter.remove();
 +                    }
                  }
              }
  
@@@ -1454,165 -1440,158 +1461,166 @@@
           * @param res Result callback.
           */
          void onResult(GridNearLockResponse res) {
 -            if (rcvRes.compareAndSet(false, true)) {
 -                if (res.error() != null) {
 -                    if (log.isDebugEnabled())
 -                        log.debug("Finishing mini future with an error due to error in response [miniFut=" + this +
 -                            ", res=" + res + ']');
 +            synchronized (this) {
 +                if (!rcvRes)
 +                    rcvRes = true;
 +                else
 +                    return;
 +            }
  
 -                    // Fail.
 -                    if (res.error() instanceof GridCacheLockTimeoutException)
 -                        onDone(false);
 -                    else
 -                        onDone(res.error());
 +            if (res.error() != null) {
 +                if (log.isDebugEnabled())
 +                    log.debug("Finishing mini future with an error due to error in response [miniFut=" + this +
 +                        ", res=" + res + ']');
  
 -                    return;
 -                }
 +                // Fail.
 +                if (res.error() instanceof GridCacheLockTimeoutException)
 +                    onDone(false);
 +                else
 +                    onDone(res.error());
  
 -                if (res.clientRemapVersion() != null) {
 -                    assert cctx.kernalContext().clientNode();
 +                return;
 +            }
  
 -                    IgniteInternalFuture<?> affFut =
 -                        cctx.shared().exchange().affinityReadyFuture(res.clientRemapVersion());
 +            if (res.clientRemapVersion() != null) {
 +                assert cctx.kernalContext().clientNode();
  
 -                    if (affFut != null && !affFut.isDone()) {
 -                        affFut.listen(new CI1<IgniteInternalFuture<?>>() {
 -                            @Override public void apply(IgniteInternalFuture<?> fut) {
 -                                try {
 -                                    fut.get();
 +                IgniteInternalFuture<?> affFut =
 +                    cctx.shared().exchange().affinityReadyFuture(res.clientRemapVersion());
  
 -                                    remap();
 -                                }
 -                                catch (IgniteCheckedException e) {
 -                                    onDone(e);
 -                                }
 -                                finally {
 -                                    cctx.shared().txContextReset();
 -                                }
 +                if (affFut != null && !affFut.isDone()) {
 +                    affFut.listen(new CI1<IgniteInternalFuture<?>>() {
 +                        @Override public void apply(IgniteInternalFuture<?> fut) {
 +                            try {
 +                                fut.get();
 +
 +                                remap();
                              }
 -                        });
 -                    }
 -                    else
 -                        remap();
 +                            catch (IgniteCheckedException e) {
 +                                onDone(e);
 +                            }
 +                            finally {
 +                                cctx.shared().txContextReset();
 +                            }
 +                        }
 +                    });
                  }
 -                else {
 -                    int i = 0;
 +                else
 +                    remap();
 +            }
 +            else {
 +                int i = 0;
  
 -                    AffinityTopologyVersion topVer = GridNearLockFuture.this.topVer.get();
 +                AffinityTopologyVersion topVer = GridNearLockFuture.this.topVer;
  
 -                    for (KeyCacheObject k : keys) {
 -                        while (true) {
 -                            GridNearCacheEntry entry = cctx.near().entryExx(k, topVer);
 +                for (KeyCacheObject k : keys) {
 +                    while (true) {
 +                        GridNearCacheEntry entry = cctx.near().entryExx(k, topVer);
  
 -                            try {
 -                                if (res.dhtVersion(i) == null) {
 -                                    onDone(new IgniteCheckedException("Failed to receive DHT version from remote node " +
 -                                        "(will fail the lock): " + res));
 +                        try {
 +                            if (res.dhtVersion(i) == null) {
 +                                onDone(new IgniteCheckedException("Failed to receive DHT version from remote node " +
 +                                    "(will fail the lock): " + res));
  
 -                                    return;
 -                                }
 +                                return;
 +                            }
  
 -                                IgniteBiTuple<GridCacheVersion, CacheObject> oldValTup = valMap.get(entry.key());
 +                            IgniteBiTuple<GridCacheVersion, CacheObject> oldValTup = valMap.get(entry.key());
  
 -                                CacheObject oldVal = entry.rawGet();
 -                                boolean hasOldVal = false;
 -                                CacheObject newVal = res.value(i);
 +                            CacheObject oldVal = entry.rawGet();
 +                            boolean hasOldVal = false;
 +                            CacheObject newVal = res.value(i);
  
 -                                boolean readRecordable = false;
 +                            boolean readRecordable = false;
  
 -                                if (retval) {
 -                                    readRecordable = cctx.events().isRecordable(EVT_CACHE_OBJECT_READ);
 +                            if (retval) {
 +                                readRecordable = cctx.events().isRecordable(EVT_CACHE_OBJECT_READ);
  
 -                                    if (readRecordable)
 -                                        hasOldVal = entry.hasValue();
 -                                }
 +                                if (readRecordable)
 +                                    hasOldVal = entry.hasValue();
 +                            }
  
 -                                GridCacheVersion dhtVer = res.dhtVersion(i);
 -                                GridCacheVersion mappedVer = res.mappedVersion(i);
 +                            GridCacheVersion dhtVer = res.dhtVersion(i);
 +                            GridCacheVersion mappedVer = res.mappedVersion(i);
  
 -                                if (newVal == null) {
 -                                    if (oldValTup != null) {
 -                                        if (oldValTup.get1().equals(dhtVer))
 -                                            newVal = oldValTup.get2();
 +                            if (newVal == null) {
 +                                if (oldValTup != null) {
 +                                    if (oldValTup.get1().equals(dhtVer))
 +                                        newVal = oldValTup.get2();
  
 -                                        oldVal = oldValTup.get2();
 -                                    }
 +                                    oldVal = oldValTup.get2();
                                  }
 +                            }
  
 -                                // Lock is held at this point, so we can set the
 -                                // returned value if any.
 -                                entry.resetFromPrimary(newVal, lockVer, dhtVer, node.id(), topVer);
 +                            // Lock is held at this point, so we can set the
 +                            // returned value if any.
 +                            entry.resetFromPrimary(newVal, lockVer, dhtVer, node.id(), topVer);
  
 -                                if (inTx()) {
 -                                    tx.hasRemoteLocks(true);
 +                            if (inTx()) {
 +                                tx.hasRemoteLocks(true);
  
 -                                    if (implicitTx() && tx.onePhaseCommit()) {
 -                                        boolean pass = res.filterResult(i);
 +                                if (implicitTx() && tx.onePhaseCommit()) {
 +                                    boolean pass = res.filterResult(i);
  
 -                                        tx.entry(cctx.txKey(k)).filters(pass ? CU.empty0() : CU.alwaysFalse0Arr());
 -                                    }
 +                                    tx.entry(cctx.txKey(k)).filters(pass ? CU.empty0() : CU.alwaysFalse0Arr());
                                  }
 +                            }
  
 -                                entry.readyNearLock(lockVer,
 -                                    mappedVer,
 -                                    res.committedVersions(),
 -                                    res.rolledbackVersions(),
 -                                    res.pending());
 -
 -                                if (retval) {
 -                                    if (readRecordable)
 -                                        cctx.events().addEvent(
 -                                            entry.partition(),
 -                                            entry.key(),
 -                                            tx,
 -                                            null,
 -                                            EVT_CACHE_OBJECT_READ,
 -                                            newVal,
 -                                            newVal != null,
 -                                            oldVal,
 -                                            hasOldVal,
 -                                            CU.subjectId(tx, cctx.shared()),
 -                                            null,
 -                                            inTx() ? tx.resolveTaskName() : null,
 -                                            keepBinary);
 -
 -                                    if (cctx.cache().configuration().isStatisticsEnabled())
 -                                        cctx.cache().metrics0().onRead(false);
 -                                }
 +                            entry.readyNearLock(lockVer,
 +                                mappedVer,
 +                                res.committedVersions(),
 +                                res.rolledbackVersions(),
 +                                res.pending());
 +
 +                            if (retval) {
 +                                if (readRecordable)
 +                                    cctx.events().addEvent(
 +                                        entry.partition(),
 +                                        entry.key(),
 +                                        tx,
 +                                        null,
 +                                        EVT_CACHE_OBJECT_READ,
 +                                        newVal,
 +                                        newVal != null,
 +                                        oldVal,
 +                                        hasOldVal,
 +                                        CU.subjectId(tx, cctx.shared()),
 +                                        null,
-                                         inTx() ? tx.resolveTaskName() : null);
++                                        inTx() ? tx.resolveTaskName() : null,
++                                        keepBinary);
 +
 +                                if (cctx.cache().configuration().isStatisticsEnabled())
 +                                    cctx.cache().metrics0().onRead(false);
 +                            }
  
 -                                if (log.isDebugEnabled())
 -                                    log.debug("Processed response for entry [res=" + res + ", entry=" + entry + ']');
 +                            if (log.isDebugEnabled())
 +                                log.debug("Processed response for entry [res=" + res + ", entry=" + entry + ']');
  
 -                                break; // Inner while loop.
 -                            }
 -                            catch (GridCacheEntryRemovedException ignored) {
 -                                if (log.isDebugEnabled())
 -                                    log.debug("Failed to add candidates because entry was removed (will renew).");
 +                            break; // Inner while loop.
 +                        }
 +                        catch (GridCacheEntryRemovedException ignored) {
 +                            if (log.isDebugEnabled())
 +                                log.debug("Failed to add candidates because entry was removed (will renew).");
  
 +                            synchronized (GridNearLockFuture.this) {
                                  // Replace old entry with new one.
 -                                entries.set(i, (GridDistributedCacheEntry)cctx.cache().entryEx(entry.key()));
 +                                entries.set(i,
 +                                    (GridDistributedCacheEntry)cctx.cache().entryEx(entry.key()));
                              }
                          }
 -
 -                        i++;
                      }
  
 -                    try {
 -                        proceedMapping(mappings);
 -                    }
 -                    catch (IgniteCheckedException e) {
 -                        onDone(e);
 -                    }
 +                    i++;
 +                }
  
 -                    onDone(true);
 +                try {
 +                    proceedMapping();
 +                }
 +                catch (IgniteCheckedException e) {
 +                    onDone(e);
                  }
 +
 +                onDone(true);
              }
          }
  


[40/50] [abbrv] ignite git commit: IGNITE-1972: Optimized "unmarshal" path (i.e. when we do not need to deserialize the object) by a factor of x3.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
index 6d155fe..5c798b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
@@ -17,19 +17,29 @@
 
 package org.apache.ignite.internal.portable;
 
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.binary.BinaryInvalidTypeException;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.binary.BinaryObjectException;
 import org.apache.ignite.binary.Binarylizable;
 import org.apache.ignite.internal.portable.builder.PortableLazyValue;
+import org.apache.ignite.internal.portable.streams.PortableInputStream;
+import org.apache.ignite.internal.util.lang.GridMapEntry;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
 
+import java.io.ByteArrayInputStream;
 import java.io.Externalizable;
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.sql.Timestamp;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
@@ -37,7 +47,9 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
+import java.util.LinkedList;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
@@ -45,6 +57,8 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentSkipListSet;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.ARR_LIST;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.BOOLEAN;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.BOOLEAN_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.BYTE;
@@ -53,6 +67,8 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.CHAR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.CHAR_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.CLASS;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.COL;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.CONC_HASH_MAP;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.CONC_SKIP_LIST_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.DATE;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.DATE_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.DECIMAL;
@@ -63,16 +79,25 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.ENUM;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.ENUM_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.FLOAT;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.FLOAT_ARR;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.HANDLE;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.HASH_MAP;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.HASH_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.INT;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.INT_ARR;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_HASH_MAP;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_HASH_SET;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.LINKED_LIST;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.LONG;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.LONG_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.MAP;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.MAP_ENTRY;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.NULL;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJ;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJECT_TYPE_ID;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.OBJ_ARR;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.OPTM_MARSH;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.PORTABLE_OBJ;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.PROPERTIES_MAP;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.PROTO_VER;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.SHORT;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.SHORT_ARR;
@@ -80,6 +105,11 @@ import static org.apache.ignite.internal.portable.GridPortableMarshaller.STRING;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.STRING_ARR;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.TIMESTAMP;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.TIMESTAMP_ARR;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.TREE_MAP;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.TREE_SET;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.UNREGISTERED_TYPE_ID;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.USER_COL;
+import static org.apache.ignite.internal.portable.GridPortableMarshaller.USER_SET;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.UUID;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.UUID_ARR;
 
@@ -802,9 +832,9 @@ public class PortableUtils {
     public static int fieldOffsetRelative(PortablePositionReadable stream, int pos, int fieldOffsetSize) {
         int res;
 
-        if (fieldOffsetSize == PortableUtils.OFFSET_1)
+        if (fieldOffsetSize == OFFSET_1)
             res = (int)stream.readBytePositioned(pos) & 0xFF;
-        else if (fieldOffsetSize == PortableUtils.OFFSET_2)
+        else if (fieldOffsetSize == OFFSET_2)
             res = (int)stream.readShortPositioned(pos) & 0xFFFF;
         else
             res = stream.readIntPositioned(pos);
@@ -860,8 +890,8 @@ public class PortableUtils {
                     throw new BinaryObjectException(
                         "Binary type has different field types [" + "typeName=" + oldMeta.typeName() +
                             ", fieldName=" + newField.getKey() +
-                            ", fieldTypeName1=" + PortableUtils.fieldTypeName(oldFieldType) +
-                            ", fieldTypeName2=" + PortableUtils.fieldTypeName(newField.getValue()) + ']'
+                            ", fieldTypeName1=" + fieldTypeName(oldFieldType) +
+                            ", fieldTypeName2=" + fieldTypeName(newField.getValue()) + ']'
                     );
                 }
             }
@@ -983,4 +1013,827 @@ public class PortableUtils {
         else
             return BinaryWriteMode.OBJECT;
     }
+
+    /**
+     * @return Value.
+     */
+    public static byte[] doReadByteArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readByteArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static boolean[] doReadBooleanArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readBooleanArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static short[] doReadShortArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readShortArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static char[] doReadCharArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readCharArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static int[] doReadIntArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readIntArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static long[] doReadLongArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readLongArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static float[] doReadFloatArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readFloatArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static double[] doReadDoubleArray(PortableInputStream in) {
+        int len = in.readInt();
+
+        return in.readDoubleArray(len);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static BigDecimal doReadDecimal(PortableInputStream in) {
+        int scale = in.readInt();
+        byte[] mag = doReadByteArray(in);
+
+        BigInteger intVal = new BigInteger(mag);
+
+        if (scale < 0) {
+            scale &= 0x7FFFFFFF;
+
+            intVal = intVal.negate();
+        }
+
+        return new BigDecimal(intVal, scale);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static String doReadString(PortableInputStream in) {
+        if (!in.hasArray())
+            return new String(doReadByteArray(in), UTF_8);
+
+        int strLen = in.readInt();
+
+        int pos = in.position();
+
+        // String will copy necessary array part for us.
+        String res = new String(in.array(), pos, strLen, UTF_8);
+
+        in.position(pos + strLen);
+
+        return res;
+    }
+
+    /**
+     * @return Value.
+     */
+    public static UUID doReadUuid(PortableInputStream in) {
+        return new UUID(in.readLong(), in.readLong());
+    }
+
+    /**
+     * @return Value.
+     */
+    public static Date doReadDate(PortableInputStream in) {
+        long time = in.readLong();
+
+        return new Date(time);
+    }
+
+    /**
+     * @return Value.
+     */
+    public static Timestamp doReadTimestamp(PortableInputStream in) {
+        long time = in.readLong();
+        int nanos = in.readInt();
+
+        Timestamp ts = new Timestamp(time);
+
+        ts.setNanos(ts.getNanos() + nanos);
+
+        return ts;
+    }
+
+    /**
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static BigDecimal[] doReadDecimalArray(PortableInputStream in) throws BinaryObjectException {
+        int len = in.readInt();
+
+        BigDecimal[] arr = new BigDecimal[len];
+
+        for (int i = 0; i < len; i++) {
+            byte flag = in.readByte();
+
+            if (flag == NULL)
+                arr[i] = null;
+            else {
+                if (flag != DECIMAL)
+                    throw new BinaryObjectException("Invalid flag value: " + flag);
+
+                arr[i] = doReadDecimal(in);
+            }
+        }
+
+        return arr;
+    }
+
+    /**
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static String[] doReadStringArray(PortableInputStream in) throws BinaryObjectException {
+        int len = in.readInt();
+
+        String[] arr = new String[len];
+
+        for (int i = 0; i < len; i++) {
+            byte flag = in.readByte();
+
+            if (flag == NULL)
+                arr[i] = null;
+            else {
+                if (flag != STRING)
+                    throw new BinaryObjectException("Invalid flag value: " + flag);
+
+                arr[i] = doReadString(in);
+            }
+        }
+
+        return arr;
+    }
+
+    /**
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static UUID[] doReadUuidArray(PortableInputStream in) throws BinaryObjectException {
+        int len = in.readInt();
+
+        UUID[] arr = new UUID[len];
+
+        for (int i = 0; i < len; i++) {
+            byte flag = in.readByte();
+
+            if (flag == NULL)
+                arr[i] = null;
+            else {
+                if (flag != UUID)
+                    throw new BinaryObjectException("Invalid flag value: " + flag);
+
+                arr[i] = doReadUuid(in);
+            }
+        }
+
+        return arr;
+    }
+
+    /**
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static Date[] doReadDateArray(PortableInputStream in) throws BinaryObjectException {
+        int len = in.readInt();
+
+        Date[] arr = new Date[len];
+
+        for (int i = 0; i < len; i++) {
+            byte flag = in.readByte();
+
+            if (flag == NULL)
+                arr[i] = null;
+            else {
+                if (flag != DATE)
+                    throw new BinaryObjectException("Invalid flag value: " + flag);
+
+                arr[i] = doReadDate(in);
+            }
+        }
+
+        return arr;
+    }
+
+    /**
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static Timestamp[] doReadTimestampArray(PortableInputStream in) throws BinaryObjectException {
+        int len = in.readInt();
+
+        Timestamp[] arr = new Timestamp[len];
+
+        for (int i = 0; i < len; i++) {
+            byte flag = in.readByte();
+
+            if (flag == NULL)
+                arr[i] = null;
+            else {
+                if (flag != TIMESTAMP)
+                    throw new BinaryObjectException("Invalid flag value: " + flag);
+
+                arr[i] = doReadTimestamp(in);
+            }
+        }
+
+        return arr;
+    }
+
+    /**
+     * @return Value.
+     */
+    public static BinaryObject doReadPortableObject(PortableInputStream in, PortableContext ctx) {
+        if (in.offheapPointer() > 0) {
+            int len = in.readInt();
+
+            int pos = in.position();
+
+            in.position(in.position() + len);
+
+            int start = in.readInt();
+
+            return new BinaryObjectOffheapImpl(ctx, in.offheapPointer() + pos, start, len);
+        }
+        else {
+            byte[] arr = doReadByteArray(in);
+            int start = in.readInt();
+
+            return new BinaryObjectImpl(ctx, arr, start);
+        }
+    }
+
+    /**
+     * @return Value.
+     */
+    public static Class doReadClass(PortableInputStream in, PortableContext ctx, ClassLoader ldr)
+        throws BinaryObjectException {
+        int typeId = in.readInt();
+
+        return doReadClass(in, ctx, ldr, typeId);
+    }
+
+    /**
+     * @param typeId Type id.
+     * @return Value.
+     */
+    public static Class doReadClass(PortableInputStream in, PortableContext ctx, ClassLoader ldr, int typeId)
+        throws BinaryObjectException {
+        Class cls;
+
+        if (typeId == OBJECT_TYPE_ID)
+            return Object.class;
+
+        if (typeId != UNREGISTERED_TYPE_ID)
+            cls = ctx.descriptorForTypeId(true, typeId, ldr).describedClass();
+        else {
+            byte flag = in.readByte();
+
+            if (flag != STRING)
+                throw new BinaryObjectException("No class definition for typeId: " + typeId);
+
+            String clsName = doReadString(in);
+
+            try {
+                cls = U.forName(clsName, ldr);
+            }
+            catch (ClassNotFoundException e) {
+                throw new BinaryInvalidTypeException("Failed to load the class: " + clsName, e);
+            }
+
+            // forces registering of class by type id, at least locally
+            ctx.descriptorForClass(cls);
+        }
+
+        return cls;
+    }
+
+    /**
+     * Having target class in place we simply read ordinal and create final representation.
+     *
+     * @param cls Enum class.
+     * @return Value.
+     */
+    public static Enum<?> doReadEnum(PortableInputStream in, Class<?> cls) throws BinaryObjectException {
+        assert cls != null;
+
+        if (!cls.isEnum())
+            throw new BinaryObjectException("Class does not represent enum type: " + cls.getName());
+
+        int ord = in.readInt();
+
+        return BinaryEnumCache.get(cls, ord);
+    }
+
+    /**
+     * @param cls Enum class.
+     * @return Value.
+     */
+    public static Object[] doReadEnumArray(PortableInputStream in, PortableContext ctx, ClassLoader ldr, Class<?> cls)
+        throws BinaryObjectException {
+        int len = in.readInt();
+
+        Object[] arr = (Object[]) Array.newInstance(cls, len);
+
+        for (int i = 0; i < len; i++) {
+            byte flag = in.readByte();
+
+            if (flag == NULL)
+                arr[i] = null;
+            else
+                arr[i] = doReadEnum(in, doReadClass(in, ctx, ldr));
+        }
+
+        return arr;
+    }
+
+    /**
+     * Read object serialized using optimized marshaller.
+     *
+     * @return Result.
+     */
+    public static Object doReadOptimized(PortableInputStream in, PortableContext ctx) {
+        int len = in.readInt();
+
+        ByteArrayInputStream input = new ByteArrayInputStream(in.array(), in.position(), len);
+
+        try {
+            return ctx.optimizedMarsh().unmarshal(input, null);
+        }
+        catch (IgniteCheckedException e) {
+            throw new BinaryObjectException("Failed to unmarshal object with optimized marshaller", e);
+        }
+        finally {
+            in.position(in.position() + len);
+        }
+    }
+
+    /**
+     * @return Object.
+     * @throws BinaryObjectException In case of error.
+     */
+    @Nullable public static Object doReadObject(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles) throws BinaryObjectException {
+        return new BinaryReaderExImpl(ctx, in, ldr, handles.handles()).deserialize();
+    }
+
+    /**
+     * @return Unmarshalled value.
+     * @throws BinaryObjectException In case of error.
+     */
+    @Nullable public static Object unmarshal(PortableInputStream in, PortableContext ctx, ClassLoader ldr)
+        throws BinaryObjectException {
+        return unmarshal(in, ctx, ldr, new BinaryReaderHandlesHolderImpl());
+    }
+
+    /**
+     * @return Unmarshalled value.
+     * @throws BinaryObjectException In case of error.
+     */
+    @Nullable public static Object unmarshal(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles) throws BinaryObjectException {
+        return unmarshal(in, ctx, ldr, handles, false);
+    }
+
+    /**
+     * @return Unmarshalled value.
+     * @throws BinaryObjectException In case of error.
+     */
+    @Nullable public static Object unmarshal(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles, boolean detach) throws BinaryObjectException {
+        int start = in.position();
+
+        byte flag = in.readByte();
+
+        switch (flag) {
+            case NULL:
+                return null;
+
+            case HANDLE: {
+                int handlePos = start - in.readInt();
+
+                Object obj = handles.getHandle(handlePos);
+
+                if (obj == null) {
+                    int retPos = in.position();
+
+                    in.position(handlePos);
+
+                    obj = unmarshal(in, ctx, ldr, handles);
+
+                    in.position(retPos);
+                }
+
+                return obj;
+            }
+
+            case OBJ: {
+                checkProtocolVersion(in.readByte());
+
+                int len = length(in, start);
+
+                BinaryObjectEx po;
+
+                if (detach) {
+                    // In detach mode we simply copy object's content.
+                    in.position(start);
+
+                    po = new BinaryObjectImpl(ctx, in.readByteArray(len), 0);
+                }
+                else {
+                    if (in.offheapPointer() == 0)
+                        po = new BinaryObjectImpl(ctx, in.array(), start);
+                    else
+                        po = new BinaryObjectOffheapImpl(ctx, in.offheapPointer(), start,
+                            in.remaining() + in.position());
+
+                    in.position(start + po.length());
+                }
+
+                handles.setHandle(po, start);
+
+                return po;
+            }
+
+            case BYTE:
+                return in.readByte();
+
+            case SHORT:
+                return in.readShort();
+
+            case INT:
+                return in.readInt();
+
+            case LONG:
+                return in.readLong();
+
+            case FLOAT:
+                return in.readFloat();
+
+            case DOUBLE:
+                return in.readDouble();
+
+            case CHAR:
+                return in.readChar();
+
+            case BOOLEAN:
+                return in.readBoolean();
+
+            case DECIMAL:
+                return doReadDecimal(in);
+
+            case STRING:
+                return doReadString(in);
+
+            case UUID:
+                return doReadUuid(in);
+
+            case DATE:
+                return doReadDate(in);
+
+            case TIMESTAMP:
+                return doReadTimestamp(in);
+
+            case BYTE_ARR:
+                return doReadByteArray(in);
+
+            case SHORT_ARR:
+                return doReadShortArray(in);
+
+            case INT_ARR:
+                return doReadIntArray(in);
+
+            case LONG_ARR:
+                return doReadLongArray(in);
+
+            case FLOAT_ARR:
+                return doReadFloatArray(in);
+
+            case DOUBLE_ARR:
+                return doReadDoubleArray(in);
+
+            case CHAR_ARR:
+                return doReadCharArray(in);
+
+            case BOOLEAN_ARR:
+                return doReadBooleanArray(in);
+
+            case DECIMAL_ARR:
+                return doReadDecimalArray(in);
+
+            case STRING_ARR:
+                return doReadStringArray(in);
+
+            case UUID_ARR:
+                return doReadUuidArray(in);
+
+            case DATE_ARR:
+                return doReadDateArray(in);
+
+            case TIMESTAMP_ARR:
+                return doReadTimestampArray(in);
+
+            case OBJ_ARR:
+                return doReadObjectArray(in, ctx, ldr, handles, false);
+
+            case COL:
+                return doReadCollection(in, ctx, ldr, handles, false, null);
+
+            case MAP:
+                return doReadMap(in, ctx, ldr, handles, false, null);
+
+            case MAP_ENTRY:
+                return doReadMapEntry(in, ctx, ldr, handles, false);
+
+            case PORTABLE_OBJ:
+                return doReadPortableObject(in, ctx);
+
+            case ENUM:
+                return doReadEnum(in, doReadClass(in, ctx, ldr));
+
+            case ENUM_ARR:
+                return doReadEnumArray(in, ctx, ldr, doReadClass(in, ctx, ldr));
+
+            case CLASS:
+                return doReadClass(in, ctx, ldr);
+
+            case OPTM_MARSH:
+                return doReadOptimized(in, ctx);
+
+            default:
+                throw new BinaryObjectException("Invalid flag value: " + flag);
+        }
+    }
+
+    /**
+     * @param deserialize Deep flag.
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static Object[] doReadObjectArray(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles, boolean deserialize) throws BinaryObjectException {
+        int hPos = positionForHandle(in);
+
+        Class compType = doReadClass(in, ctx, ldr);
+
+        int len = in.readInt();
+
+        Object[] arr = deserialize ? (Object[])Array.newInstance(compType, len) : new Object[len];
+
+        handles.setHandle(arr, hPos);
+
+        for (int i = 0; i < len; i++)
+            arr[i] = deserializeOrUnmarshal(in, ctx, ldr, handles, deserialize);
+
+        return arr;
+    }
+
+    /**
+     * @param deserialize Deep flag.
+     * @param cls Collection class.
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    @SuppressWarnings("unchecked")
+    public static Collection<?> doReadCollection(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles, boolean deserialize, @Nullable Class<? extends Collection> cls)
+        throws BinaryObjectException {
+        int hPos = positionForHandle(in);
+
+        int size = in.readInt();
+
+        assert size >= 0;
+
+        byte colType = in.readByte();
+
+        Collection<Object> col;
+
+        if (cls != null) {
+            try {
+                Constructor<? extends Collection> cons = cls.getConstructor();
+
+                col = cons.newInstance();
+            }
+            catch (NoSuchMethodException ignored) {
+                throw new BinaryObjectException("Collection class doesn't have public default constructor: " +
+                    cls.getName());
+            }
+            catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
+                throw new BinaryObjectException("Failed to instantiate collection: " + cls.getName(), e);
+            }
+        }
+        else {
+            switch (colType) {
+                case ARR_LIST:
+                    col = new ArrayList<>(size);
+
+                    break;
+
+                case LINKED_LIST:
+                    col = new LinkedList<>();
+
+                    break;
+
+                case HASH_SET:
+                    col = U.newHashSet(size);
+
+                    break;
+
+                case LINKED_HASH_SET:
+                    col = U.newLinkedHashSet(size);
+
+                    break;
+
+                case TREE_SET:
+                    col = new TreeSet<>();
+
+                    break;
+
+                case CONC_SKIP_LIST_SET:
+                    col = new ConcurrentSkipListSet<>();
+
+                    break;
+
+                case USER_SET:
+                    col = U.newHashSet(size);
+
+                    break;
+
+                case USER_COL:
+                    col = new ArrayList<>(size);
+
+                    break;
+
+                default:
+                    throw new BinaryObjectException("Invalid collection type: " + colType);
+            }
+        }
+
+        handles.setHandle(col, hPos);
+
+        for (int i = 0; i < size; i++)
+            col.add(deserializeOrUnmarshal(in, ctx, ldr, handles, deserialize));
+
+        return col;
+    }
+
+    /**
+     * @param deserialize Deep flag.
+     * @param cls Map class.
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    @SuppressWarnings("unchecked")
+    public static Map<?, ?> doReadMap(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles, boolean deserialize, @Nullable Class<? extends Map> cls)
+        throws BinaryObjectException {
+        int hPos = positionForHandle(in);
+
+        int size = in.readInt();
+
+        assert size >= 0;
+
+        byte mapType = in.readByte();
+
+        Map<Object, Object> map;
+
+        if (cls != null) {
+            try {
+                Constructor<? extends Map> cons = cls.getConstructor();
+
+                map = cons.newInstance();
+            }
+            catch (NoSuchMethodException ignored) {
+                throw new BinaryObjectException("Map class doesn't have public default constructor: " +
+                    cls.getName());
+            }
+            catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
+                throw new BinaryObjectException("Failed to instantiate map: " + cls.getName(), e);
+            }
+        }
+        else {
+            switch (mapType) {
+                case HASH_MAP:
+                    map = U.newHashMap(size);
+
+                    break;
+
+                case LINKED_HASH_MAP:
+                    map = U.newLinkedHashMap(size);
+
+                    break;
+
+                case TREE_MAP:
+                    map = new TreeMap<>();
+
+                    break;
+
+                case CONC_HASH_MAP:
+                    map = new ConcurrentHashMap<>(size);
+
+                    break;
+
+                case USER_COL:
+                    map = U.newHashMap(size);
+
+                    break;
+
+                case PROPERTIES_MAP:
+                    map = new Properties();
+
+                    break;
+
+                default:
+                    throw new BinaryObjectException("Invalid map type: " + mapType);
+            }
+        }
+
+        handles.setHandle(map, hPos);
+
+        for (int i = 0; i < size; i++) {
+            Object key = deserializeOrUnmarshal(in, ctx, ldr, handles, deserialize);
+            Object val = deserializeOrUnmarshal(in, ctx, ldr, handles, deserialize);
+
+            map.put(key, val);
+        }
+
+        return map;
+    }
+
+    /**
+     * @param deserialize Deserialize flag flag.
+     * @return Value.
+     * @throws BinaryObjectException In case of error.
+     */
+    public static Map.Entry<?, ?> doReadMapEntry(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles, boolean deserialize) throws BinaryObjectException {
+        int hPos = positionForHandle(in);
+
+        Object val1 = deserializeOrUnmarshal(in, ctx, ldr, handles, deserialize);
+        Object val2 = deserializeOrUnmarshal(in, ctx, ldr, handles, deserialize);
+
+        GridMapEntry entry = new GridMapEntry<>(val1, val2);
+
+        handles.setHandle(entry, hPos);
+
+        return entry;
+    }
+
+    /**
+     * Deserialize or unmarshal the object.
+     *
+     * @param deserialize Deserialize.
+     * @return Result.
+     */
+    private static Object deserializeOrUnmarshal(PortableInputStream in, PortableContext ctx, ClassLoader ldr,
+        BinaryReaderHandlesHolder handles, boolean deserialize) {
+        return deserialize ? doReadObject(in, ctx, ldr, handles) : unmarshal(in, ctx, ldr, handles);
+    }
+
+    /**
+     * Get position to be used for handle. We assume here that the hdr byte was read, hence subtract -1.
+     *
+     * @return Position for handle.
+     */
+    public static int positionForHandle(PortableInputStream in) {
+        return in.position() - 1;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderReader.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderReader.java
index 538c26c..cf27da4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderReader.java
@@ -17,24 +17,23 @@
 
 package org.apache.ignite.internal.portable.builder;
 
-import java.sql.Timestamp;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.ignite.internal.portable.BinaryReaderHandles;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.internal.portable.BinaryObjectImpl;
+import org.apache.ignite.internal.portable.BinaryReaderExImpl;
+import org.apache.ignite.internal.portable.BinaryWriterExImpl;
 import org.apache.ignite.internal.portable.GridPortableMarshaller;
 import org.apache.ignite.internal.portable.PortableContext;
 import org.apache.ignite.internal.portable.PortablePositionReadable;
-import org.apache.ignite.internal.portable.BinaryObjectImpl;
 import org.apache.ignite.internal.portable.PortablePrimitives;
-import org.apache.ignite.internal.portable.BinaryReaderExImpl;
 import org.apache.ignite.internal.portable.PortableSchema;
 import org.apache.ignite.internal.portable.PortableUtils;
-import org.apache.ignite.internal.portable.BinaryWriterExImpl;
-import org.apache.ignite.binary.BinaryObjectException;
 import org.apache.ignite.internal.portable.streams.PortableHeapInputStream;
 
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.NULL;
 import static org.apache.ignite.internal.portable.GridPortableMarshaller.STRING;
@@ -69,7 +68,7 @@ public class PortableBuilderReader implements PortablePositionReadable {
         pos = objImpl.start();
 
         // TODO: IGNITE-1272 - Is class loader needed here?
-        reader = new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, pos), null, new BinaryReaderHandles());
+        reader = new BinaryReaderExImpl(ctx, PortableHeapInputStream.create(arr, pos), null);
 
         objMap = new HashMap<>();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c6b2fa56/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
index d999466..9a7f0df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java
@@ -36,6 +36,7 @@ import org.apache.ignite.events.TaskEvent;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.portable.BinaryRawReaderEx;
 import org.apache.ignite.internal.portable.BinaryRawWriterEx;
+import org.apache.ignite.internal.portable.BinaryReaderExImpl;
 import org.apache.ignite.internal.portable.BinaryTypeImpl;
 import org.apache.ignite.internal.portable.GridPortableMarshaller;
 import org.apache.ignite.internal.processors.cache.portable.CacheObjectBinaryProcessorImpl;
@@ -175,7 +176,8 @@ public class PlatformContextImpl implements PlatformContext {
 
     /** {@inheritDoc} */
     @Override public BinaryRawReaderEx reader(PlatformInputStream in) {
-        return marsh.reader(in);
+        // TODO: IGNITE-1272 - Is class loader needed here?
+        return new BinaryReaderExImpl(marsh.context(), in, null);
     }
 
     /** {@inheritDoc} */


[42/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5


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

Branch: refs/heads/master
Commit: 805034658e20a5666abade26be1989723d171986
Parents: c6b2fa5 2ae1709
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Nov 23 16:31:45 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 23 16:31:45 2015 +0300

----------------------------------------------------------------------
 examples/schema-import/bin/db-init.sql          |   3 +-
 .../org/apache/ignite/schema/CacheConfig.java   |   7 +-
 .../java/org/apache/ignite/schema/Demo.java     |  20 +-
 .../org/apache/ignite/cache/QueryIndex.java     |  53 +-
 .../store/jdbc/CacheAbstractJdbcStore.java      | 638 ++++++++++++-------
 .../store/jdbc/CacheJdbcBlobStoreFactory.java   |  14 +-
 .../cache/store/jdbc/CacheJdbcPojoStore.java    | 444 +++++++++----
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   | 277 +++++++-
 .../ignite/cache/store/jdbc/JdbcType.java       | 255 ++++++++
 .../cache/store/jdbc/JdbcTypeDefaultHasher.java |  43 ++
 .../ignite/cache/store/jdbc/JdbcTypeField.java  | 172 +++++
 .../ignite/cache/store/jdbc/JdbcTypeHasher.java |  34 +
 .../processors/cache/GridCacheMapEntry.java     |   3 +-
 .../processors/query/GridQueryProcessor.java    |   6 +-
 .../ignite/internal/visor/cache/VisorCache.java |   4 +-
 .../CacheJdbcPojoStoreAbstractSelfTest.java     | 395 ++++++++++++
 ...dbcPojoStoreOptimizedMarshallerSelfTest.java |  31 +
 ...JdbcPojoStorePortableMarshallerSelfTest.java |  85 +++
 .../store/jdbc/CacheJdbcPojoStoreTest.java      | 200 +++---
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |   2 +-
 ...chePartitionedAtomicSetFailoverSelfTest.java |   5 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   6 +-
 modules/schema-import/README.txt                | 176 ++---
 .../ignite/schema/generator/CodeGenerator.java  | 198 +++---
 .../ignite/schema/generator/XmlGenerator.java   | 101 +--
 .../apache/ignite/schema/model/IndexItem.java   |  54 --
 .../ignite/schema/model/PojoDescriptor.java     |  72 +--
 .../ignite/schema/model/SchemaDescriptor.java   |   6 +-
 .../schema/parser/DatabaseMetadataParser.java   |  12 +-
 .../apache/ignite/schema/parser/DbTable.java    |  37 +-
 .../parser/dialect/DatabaseMetadataDialect.java |  32 +-
 .../parser/dialect/JdbcMetadataDialect.java     |  22 +-
 .../parser/dialect/OracleMetadataDialect.java   |  24 +-
 .../apache/ignite/schema/ui/ModalDialog.java    |   6 +-
 .../ignite/schema/ui/SchemaImportApp.java       |  13 +-
 .../schema/test/AbstractSchemaImportTest.java   |   4 +-
 .../schema/test/model/ignite-type-metadata.xml  | 610 +++++++++---------
 .../yardstick/config/ignite-store-config.xml    |  50 +-
 .../IgniteAtomicInvokeRetryBenchmark.java       |   2 +-
 .../failover/IgniteConsistencyException.java    |  64 ++
 ...IgniteTransactionalInvokeRetryBenchmark.java |   2 +-
 ...IgniteTransactionalWriteInvokeBenchmark.java | 135 +++-
 .../IgniteTransactionalWriteReadBenchmark.java  |   2 +-
 43 files changed, 3022 insertions(+), 1297 deletions(-)
----------------------------------------------------------------------



[46/50] [abbrv] ignite git commit: IGNITE-1983: .NET: Fixed continuous query tests.

Posted by sb...@apache.org.
IGNITE-1983: .NET: Fixed continuous query tests.


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

Branch: refs/heads/master
Commit: dcbfbd290eebfaaf23ea1ec48edec2dc59227121
Parents: e4109f9
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Nov 24 10:53:43 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 24 10:53:43 2015 +0300

----------------------------------------------------------------------
 .../Continuous/ContinuousQueryAbstractTest.cs   | 26 ++++++++++++--------
 1 file changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dcbfbd29/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index cb9542f..720483a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -76,7 +76,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
 
         /** Cache name. */
         private readonly string cacheName;
-        
+
         /// <summary>
         /// Constructor.
         /// </summary>
@@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 // Put from local node.
                 int key1 = PrimaryKey(cache1);
                 cache1.GetAndPut(key1, Entry(key1));
-                CheckFilterSingle(key1, null, Entry(key1));
+                CheckFilterSingle(key1, null, Entry(key1), !loc);
                 CheckCallbackSingle(key1, null, Entry(key1));
 
                 // Put from remote node.
@@ -322,7 +322,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 }
                 else
                 {
-                    CheckFilterSingle(key2, null, Entry(key2));
+                    CheckFilterSingle(key2, null, Entry(key2), true);
                     CheckCallbackSingle(key2, null, Entry(key2));
                 }
 
@@ -330,7 +330,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
 
                 // Ignored put from local node.
                 cache1.GetAndPut(key1, Entry(key1 + 1));
-                CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1));
+                CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1), !loc);
                 CheckNoCallback(100);
 
                 // Ignored put from remote node.
@@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 if (loc)
                     CheckNoFilter(100);
                 else
-                    CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1));
+                    CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1), true);
 
                 CheckNoCallback(100);
             }
@@ -868,9 +868,15 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         /// <param name="expKey">Expected key.</param>
         /// <param name="expOldVal">Expected old value.</param>
         /// <param name="expVal">Expected value.</param>
-        private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
+        /// <param name="hasBackup">Whether there is a backup node to check..</param>
+        private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, 
+            bool hasBackup = false)
         {
             CheckFilterSingle(expKey, expOldVal, expVal, 1000);
+
+            // Filter is called on each cache node (primary and backup)
+            if (hasBackup)
+                CheckFilterSingle(expKey, expOldVal, expVal, 1000);
         }
 
         /// <summary>
@@ -880,7 +886,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         /// <param name="expOldVal">Expected old value.</param>
         /// <param name="expVal">Expected value.</param>
         /// <param name="timeout">Timeout.</param>
-        private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
+        private static void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
         {
             FilterEvent evt;
 
@@ -895,7 +901,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         /// Ensure that no filter events are logged.
         /// </summary>
         /// <param name="timeout">Timeout.</param>
-        private void CheckNoFilter(int timeout)
+        private static void CheckNoFilter(int timeout)
         {
             FilterEvent evt;
 
@@ -908,7 +914,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         /// <param name="expKey">Expected key.</param>
         /// <param name="expOldVal">Expected old value.</param>
         /// <param name="expVal">Expected new value.</param>
-        private void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
+        private static void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
         {
             CheckCallbackSingle(expKey, expOldVal, expVal, 1000);
         }
@@ -920,7 +926,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         /// <param name="expOldVal">Expected old value.</param>
         /// <param name="expVal">Expected new value.</param>
         /// <param name="timeout">Timeout.</param>
-        private void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
+        private static void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
         {
             CallbackEvent evt;
 


[20/50] [abbrv] ignite git commit: Add the attribute only if binary marshaller is used.

Posted by sb...@apache.org.
Add the attribute only if binary marshaller is used.


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

Branch: refs/heads/master
Commit: df859c0a1b3c493d7df56a3e76699cac6169a06a
Parents: 802d48b
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Sat Nov 21 15:17:06 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Sat Nov 21 15:17:06 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/internal/IgniteKernal.java  | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/df859c0a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 249564a..082ffa5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -158,6 +158,7 @@ import org.apache.ignite.lifecycle.LifecycleBean;
 import org.apache.ignite.lifecycle.LifecycleEventType;
 import org.apache.ignite.marshaller.MarshallerExclusions;
 import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
+import org.apache.ignite.marshaller.portable.BinaryMarshaller;
 import org.apache.ignite.mxbean.ClusterLocalNodeMetricsMXBean;
 import org.apache.ignite.mxbean.IgniteMXBean;
 import org.apache.ignite.mxbean.ThreadPoolMXBean;
@@ -1276,9 +1277,11 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
         add(ATTR_MARSHALLER_USE_DFLT_SUID,
             getBoolean(IGNITE_OPTIMIZED_MARSHALLER_USE_DEFAULT_SUID, OptimizedMarshaller.USE_DFLT_SUID));
 
-        add(ATTR_MARSHALLER_COMPACT_FOOTER, cfg.getBinaryConfiguration() == null ?
-            BinaryConfiguration.DFLT_COMPACT_FOOTER :
-            cfg.getBinaryConfiguration().isCompactFooter());
+        if (cfg.getMarshaller() instanceof BinaryMarshaller) {
+            add(ATTR_MARSHALLER_COMPACT_FOOTER, cfg.getBinaryConfiguration() == null ?
+                BinaryConfiguration.DFLT_COMPACT_FOOTER :
+                cfg.getBinaryConfiguration().isCompactFooter());
+        }
 
         add(ATTR_USER_NAME, System.getProperty("user.name"));
         add(ATTR_GRID_NAME, gridName);


[31/50] [abbrv] ignite git commit: IGNITE-1968 .Net: Resolved failure in .NET services caused by recent changes to Java binary reader impl.

Posted by sb...@apache.org.
IGNITE-1968 .Net: Resolved failure in .NET services caused by recent changes to Java binary reader impl.


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

Branch: refs/heads/master
Commit: 171bbeefc6f695111607b16bd7be783d1421e8a0
Parents: 96ae696
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Mon Nov 23 11:49:35 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 23 11:49:35 2015 +0300

----------------------------------------------------------------------
 .../processors/platform/services/PlatformAbstractService.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/171bbeef/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java
index 18ab012..df71a24 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformAbstractService.java
@@ -195,12 +195,12 @@ public abstract class PlatformAbstractService implements PlatformService, Extern
             try (PlatformMemory inMem = platformCtx.memory().allocate()) {
                 PlatformInputStream in = inMem.input();
 
-                BinaryRawReaderEx reader = platformCtx.reader(in);
-
                 platformCtx.gateway().serviceInvokeMethod(ptr, outMem.pointer(), inMem.pointer());
 
                 in.synchronize();
 
+                BinaryRawReaderEx reader = platformCtx.reader(in);
+
                 return PlatformUtils.readInvocationResult(platformCtx, reader);
             }
         }


[24/50] [abbrv] ignite git commit: Fixed GridEventConsumeSelfTest.

Posted by sb...@apache.org.
Fixed GridEventConsumeSelfTest.


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

Branch: refs/heads/master
Commit: 15877a8baf8ab32efb2e3f945d7a993205ab11ae
Parents: 13e11b3
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Sun Nov 22 13:43:59 2015 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Sun Nov 22 13:43:59 2015 +0300

----------------------------------------------------------------------
 .../processors/continuous/GridContinuousProcessor.java         | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/15877a8b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index c07cc13..e218790 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -210,7 +210,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
                         if (msg.errs().isEmpty()) {
                             LocalRoutineInfo routine = locInfos.get(msg.routineId());
 
-                            if (routine != null) {
+                            if (routine != null && routine.handler().isForQuery()) {
                                 try {
                                     Map<Integer, Long> cntrs = msg.updateCounters();
 
@@ -889,7 +889,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
         }
 
         try {
-            if (ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName()) != null) {
+            if (hnd.isForQuery() && ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName()) != null) {
                 Map<Integer, Long> cntrs = ctx.cache().internalCache(hnd.cacheName())
                     .context().topology().updateCounters();
 
@@ -897,7 +897,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
             }
         }
         catch (Exception e) {
-            U.warn(log, "Failed to load partition counters.");
+            U.warn(log, "Failed to load partition counters.", e);
         }
 
         if (err != null)


[02/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1282

Posted by sb...@apache.org.
Merge branch ignite-1.5 into ignite-1282


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

Branch: refs/heads/master
Commit: 3d4ce809fc96d93936a69a6076e7141da41d739c
Parents: c505f48 900788b
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 14:03:43 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 14:03:43 2015 +0300

----------------------------------------------------------------------
 modules/camel/README.txt                        |   34 +
 modules/camel/licenses/apache-2.0.txt           |  202 ++
 modules/camel/pom.xml                           |  102 +
 .../ignite/stream/camel/CamelStreamer.java      |  237 ++
 .../stream/camel/IgniteCamelStreamerTest.java   |  420 ++++
 .../camel/IgniteCamelStreamerTestSuite.java     |   48 +
 .../src/test/resources/camel.test.properties    |   18 +
 .../ignite/codegen/MessageCodeGenerator.java    |    1 +
 .../java/org/apache/ignite/IgniteCache.java     |    3 +-
 .../java/org/apache/ignite/IgniteCompute.java   |    3 +-
 .../org/apache/ignite/compute/ComputeJob.java   |    2 +-
 .../internal/GridEventConsumeHandler.java       |   22 +-
 .../internal/GridMessageListenHandler.java      |   18 +
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../apache/ignite/internal/IgniteKernal.java    |    9 +-
 .../communication/GridIoMessageFactory.java     |   26 +-
 .../discovery/GridDiscoveryManager.java         |    2 +-
 .../processors/cache/GridCacheAdapter.java      |  151 +-
 .../processors/cache/GridCacheAtomicFuture.java |    6 +
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../processors/cache/GridCacheEntryEx.java      |   12 +-
 .../processors/cache/GridCacheFuture.java       |   13 -
 .../processors/cache/GridCacheGateway.java      |    1 -
 .../processors/cache/GridCacheIoManager.java    |   50 +-
 .../processors/cache/GridCacheMapEntry.java     |  158 +-
 .../processors/cache/GridCacheMessage.java      |   20 +-
 .../processors/cache/GridCacheMvcc.java         |    7 -
 .../processors/cache/GridCacheMvccFuture.java   |    7 +
 .../processors/cache/GridCacheMvccManager.java  |  150 +-
 .../GridCachePartitionExchangeManager.java      |   59 +-
 .../cache/GridCacheSharedContext.java           |   38 +-
 .../cache/GridCacheUpdateAtomicResult.java      |   15 +-
 .../cache/GridCacheUpdateTxResult.java          |   24 +-
 .../processors/cache/IgniteCacheProxy.java      |    3 +
 .../distributed/GridCacheTxRecoveryFuture.java  |   54 +-
 .../distributed/GridDistributedBaseMessage.java |   56 -
 .../distributed/GridDistributedLockRequest.java |    6 -
 .../GridDistributedLockResponse.java            |   32 +-
 .../distributed/GridDistributedTxMapping.java   |   78 -
 .../GridDistributedTxPrepareRequest.java        |   67 +-
 .../GridDistributedTxRemoteAdapter.java         |  158 +-
 .../dht/CacheDistributedGetFutureAdapter.java   |   27 +-
 .../cache/distributed/dht/CacheGetFuture.java   |   32 +
 .../dht/GridClientPartitionTopology.java        |   38 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |  141 ++
 .../distributed/dht/GridDhtLocalPartition.java  |   35 +
 .../distributed/dht/GridDhtLockFuture.java      |   79 +-
 .../distributed/dht/GridDhtLockRequest.java     |    2 +-
 .../dht/GridDhtPartitionTopology.java           |   26 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  112 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |   14 +-
 .../distributed/dht/GridDhtTxFinishFuture.java  |   38 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |  112 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   28 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   89 +-
 .../cache/distributed/dht/GridDhtTxMapping.java |  134 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  136 +-
 .../dht/GridDhtTxPrepareRequest.java            |   54 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   29 +-
 .../dht/GridPartitionedGetFuture.java           |   69 +-
 .../dht/GridPartitionedSingleGetFuture.java     |  697 ++++++
 .../dht/atomic/GridDhtAtomicCache.java          |  206 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  159 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |  121 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |    5 -
 .../dht/colocated/GridDhtColocatedCache.java    |  162 +-
 .../colocated/GridDhtColocatedLockFuture.java   |   81 +-
 .../GridDhtPartitionsExchangeFuture.java        |   35 +-
 .../preloader/GridDhtPartitionsFullMessage.java |   64 +-
 .../GridDhtPartitionsSingleMessage.java         |   56 +-
 .../distributed/near/CacheVersionedValue.java   |    2 +-
 .../distributed/near/GridNearAtomicCache.java   |   10 +-
 .../distributed/near/GridNearCacheAdapter.java  |    4 +-
 .../distributed/near/GridNearGetFuture.java     |   49 +-
 .../distributed/near/GridNearGetRequest.java    |    1 -
 .../distributed/near/GridNearGetResponse.java   |    2 -
 .../distributed/near/GridNearLockFuture.java    |   72 +-
 .../distributed/near/GridNearLockRequest.java   |    4 +-
 ...arOptimisticSerializableTxPrepareFuture.java |  124 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |  170 +-
 ...ridNearOptimisticTxPrepareFutureAdapter.java |   72 +-
 .../GridNearPessimisticTxPrepareFuture.java     |   59 +-
 .../near/GridNearSingleGetRequest.java          |  396 ++++
 .../near/GridNearSingleGetResponse.java         |  321 +++
 .../near/GridNearTransactionalCache.java        |   10 +-
 .../near/GridNearTxFinishFuture.java            |  103 +-
 .../cache/distributed/near/GridNearTxLocal.java |  273 ++-
 .../near/GridNearTxPrepareFutureAdapter.java    |   20 +-
 .../near/GridNearTxPrepareRequest.java          |   61 +-
 .../distributed/near/GridNearTxRemote.java      |   33 +-
 .../distributed/near/IgniteTxMappings.java      |   75 +
 .../distributed/near/IgniteTxMappingsImpl.java  |   92 +
 .../near/IgniteTxMappingsSingleImpl.java        |  101 +
 .../processors/cache/local/GridLocalCache.java  |    4 +-
 .../cache/local/GridLocalLockFuture.java        |    5 -
 .../CacheContinuousQueryBatchAck.java           |  163 ++
 .../continuous/CacheContinuousQueryEntry.java   |  196 +-
 .../continuous/CacheContinuousQueryHandler.java |  811 ++++++-
 .../CacheContinuousQueryListener.java           |   35 +
 .../continuous/CacheContinuousQueryManager.java |  151 +-
 .../cache/transactions/IgniteInternalTx.java    |   13 +-
 .../cache/transactions/IgniteTxAdapter.java     |   68 +-
 .../cache/transactions/IgniteTxEntry.java       |   29 +-
 .../cache/transactions/IgniteTxHandler.java     |   38 +-
 .../IgniteTxImplicitSingleStateImpl.java        |  266 +++
 .../transactions/IgniteTxLocalAdapter.java      | 1424 ++++++-----
 .../cache/transactions/IgniteTxLocalEx.java     |   30 +-
 .../cache/transactions/IgniteTxLocalState.java  |   44 +
 .../transactions/IgniteTxLocalStateAdapter.java |   41 +
 .../cache/transactions/IgniteTxManager.java     |   21 +-
 .../cache/transactions/IgniteTxMap.java         |    3 +-
 .../cache/transactions/IgniteTxRemoteEx.java    |   18 +-
 .../IgniteTxRemoteSingleStateImpl.java          |  108 +
 .../cache/transactions/IgniteTxRemoteState.java |   34 +
 .../IgniteTxRemoteStateAdapter.java             |  115 +
 .../transactions/IgniteTxRemoteStateImpl.java   |  124 +
 .../cache/transactions/IgniteTxState.java       |  177 ++
 .../cache/transactions/IgniteTxStateImpl.java   |  414 ++++
 .../clock/GridClockSyncProcessor.java           |   28 +-
 .../continuous/GridContinuousBatch.java         |   44 +
 .../continuous/GridContinuousBatchAdapter.java  |   46 +
 .../continuous/GridContinuousHandler.java       |   22 +
 .../continuous/GridContinuousProcessor.java     |  221 +-
 .../StartRoutineAckDiscoveryMessage.java        |   14 +-
 .../StartRoutineDiscoveryMessage.java           |   21 +-
 .../internal/util/UUIDCollectionMessage.java    |  114 +
 .../util/future/GridCompoundFuture.java         |   15 +-
 .../ignite/internal/util/lang/GridFunc.java     |    8 +-
 .../ignite/internal/util/nio/GridNioServer.java |   13 +-
 .../ignite/marshaller/MarshallerExclusions.java |    4 +-
 .../org/apache/ignite/mxbean/IgniteMXBean.java  |    8 +-
 .../org/apache/ignite/stream/StreamAdapter.java |   18 +-
 .../IgniteClientReconnectCacheTest.java         |   11 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   75 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |   15 -
 .../cache/GridCachePartitionedGetSelfTest.java  |    3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   10 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |   27 +-
 .../IgniteCacheP2pUnmarshallingErrorTest.java   |  184 +-
 .../CacheGetFutureHangsSelfTest.java            |    6 +
 .../GridCacheAbstractNodeRestartSelfTest.java   |    2 +
 .../IgniteCacheSingleGetMessageTest.java        |  357 +++
 .../GridCacheReplicatedMetricsSelfTest.java     |    9 -
 .../IgniteCacheTxStoreSessionTest.java          |    2 +-
 ...ContinuousQueryFailoverAbstractSelfTest.java | 2235 ++++++++++++++++++
 ...ryFailoverAtomicNearEnabledSelfSelfTest.java |   46 +
 ...FailoverAtomicPrimaryWriteOrderSelfTest.java |   44 +
 ...usQueryFailoverAtomicReplicatedSelfTest.java |   40 +
 ...inuousQueryFailoverTxReplicatedSelfTest.java |   32 +
 .../CacheContinuousQueryFailoverTxSelfTest.java |   39 +
 ...ridCacheContinuousQueryAbstractSelfTest.java |  153 +-
 .../GridCacheContinuousQueryTxSelfTest.java     |   49 +
 ...CacheContinuousQueryClientReconnectTest.java |  187 ++
 .../IgniteCacheContinuousQueryClientTest.java   |  157 +-
 ...cheContinuousQueryClientTxReconnectTest.java |   32 +
 .../p2p/GridP2PSameClassLoaderSelfTest.java     |   16 +-
 .../testframework/junits/GridAbstractTest.java  |    2 +-
 .../junits/common/GridCommonAbstractTest.java   |    3 +
 .../testsuites/IgniteCacheTestSuite3.java       |    2 +
 .../testsuites/IgniteCacheTestSuite4.java       |    3 +
 .../ignite/util/mbeans/GridMBeanSelfTest.java   |   33 +-
 modules/flume/README.txt                        |   72 +
 modules/flume/licenses/apache-2.0.txt           |  202 ++
 modules/flume/pom.xml                           |   77 +
 .../ignite/stream/flume/EventTransformer.java   |   36 +
 .../apache/ignite/stream/flume/IgniteSink.java  |  186 ++
 .../stream/flume/IgniteSinkConstants.java       |   35 +
 .../ignite/stream/flume/IgniteSinkTest.java     |  142 ++
 .../stream/flume/IgniteSinkTestSuite.java       |   37 +
 .../stream/flume/TestEventTransformer.java      |   66 +
 .../flume/src/test/resources/example-ignite.xml |   71 +
 .../IgniteCacheQuerySelfTestSuite.java          |   16 +-
 .../GridSpringResourceInjectionSelfTest.java    |  143 ++
 .../processors/resource/spring-resource.xml     |   27 +
 .../testsuites/IgniteResourceSelfTestSuite.java |    2 +
 modules/twitter/README.txt                      |   32 +
 modules/twitter/licenses/apache-2.0.txt         |  202 ++
 modules/twitter/pom.xml                         |  122 +
 .../ignite/stream/twitter/OAuthSettings.java    |   86 +
 .../ignite/stream/twitter/TwitterStreamer.java  |  295 +++
 .../twitter/IgniteTwitterStreamerTest.java      |  234 ++
 .../twitter/IgniteTwitterStreamerTestSuite.java |   32 +
 .../stream/twitter/TwitterStreamerImpl.java     |   79 +
 .../config/benchmark-multicast.properties       |    6 +-
 .../benchmark-query-put-separated.properties    |   87 +
 .../yardstick/cache/CacheEntryEventProbe.java   |  156 ++
 .../cache/IgniteSqlQueryPutBenchmark.java       |   31 +-
 .../IgniteSqlQueryPutSeparatedBenchmark.java    |   84 +
 parent/pom.xml                                  |    1 +
 pom.xml                                         |    3 +
 190 files changed, 15606 insertions(+), 2789 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --cc modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index b8ccc03,74c71c4..5a31415
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@@ -43,7 -43,10 +43,8 @@@ import org.apache.ignite.internal.GridD
  import org.apache.ignite.internal.GridDirectMap;
  import org.apache.ignite.internal.GridDirectTransient;
  import org.apache.ignite.internal.IgniteCodeGeneratingFail;
 -import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest;
 -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateRequest;
+ import org.apache.ignite.internal.util.UUIDCollectionMessage;
  import org.apache.ignite.internal.util.typedef.internal.SB;
  import org.apache.ignite.internal.util.typedef.internal.U;
  import org.apache.ignite.lang.IgniteUuid;

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 5ced545,8d363ad..512a801
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@@ -1205,14 -1186,15 +1215,16 @@@ public abstract class GridCacheMapEntr
                      val != null,
                      evtOld,
                      evtOld != null || hasValueUnlocked(),
 -                    subjId, null, taskName);
 +                    subjId, null, taskName,
 +                    keepPortable);
              }
  
-             if (cctx.isLocal() || cctx.isReplicated() || (tx != null && tx.local() && !isNear()))
-                 cctx.continuousQueries().onEntryUpdated(this, key, val, old, false);
+             if (cctx.isLocal() || cctx.isReplicated() ||
+                 (!isNear() && !(tx != null && tx.onePhaseCommit() && !tx.local())))
+                 cctx.continuousQueries().onEntryUpdated(key, val, old, isInternal() || !context().userCache(),
+                     partition(), tx.local(), false, updateCntr0, topVer);
  
 -            cctx.dataStructures().onEntryUpdated(key, false);
 +            cctx.dataStructures().onEntryUpdated(key, false, keepPortable);
          }
  
          if (log.isDebugEnabled())
@@@ -1224,9 -1206,9 +1236,9 @@@
              cctx.store().put(tx, keyValue(false), CU.value(val, cctx, false), newVer);
  
          if (intercept)
 -            cctx.config().getInterceptor().onAfterPut(new CacheLazyEntry(cctx, key, key0, val, val0));
 +            cctx.config().getInterceptor().onAfterPut(new CacheLazyEntry(cctx, key, key0, val, val0, keepPortable));
  
-         return valid ? new GridCacheUpdateTxResult(true, retval ? old : null) :
+         return valid ? new GridCacheUpdateTxResult(true, retval ? old : null, updateCntr0) :
              new GridCacheUpdateTxResult(false, null);
      }
  
@@@ -1377,14 -1366,15 +1397,16 @@@
                      evtOld != null || hasValueUnlocked(),
                      subjId,
                      null,
 -                    taskName);
 +                    taskName,
 +                    keepPortable);
              }
  
-             if (cctx.isLocal() || cctx.isReplicated() || (tx != null && tx.local() && !isNear()))
-                 cctx.continuousQueries().onEntryUpdated(this, key, null, old, false);
+             if (cctx.isLocal() || cctx.isReplicated() ||
+                 (!isNear() && !(tx != null && tx.onePhaseCommit() && !tx.local())))
+                 cctx.continuousQueries().onEntryUpdated(key, null, old, isInternal()
+                     || !context().userCache(),partition(), tx.local(), false, updateCntr0, topVer);
  
 -            cctx.dataStructures().onEntryUpdated(key, true);
 +            cctx.dataStructures().onEntryUpdated(key, true, keepPortable);
  
              deferred = cctx.deferredDelete() && !detached() && !isInternal();
  
@@@ -1718,9 -1707,14 +1740,14 @@@
              if (res)
                  updateMetrics(op, metrics);
  
-             cctx.continuousQueries().onEntryUpdated(this, key, val, old, false);
+             if (!isNear()) {
+                 long updateCntr = nextPartCounter(AffinityTopologyVersion.NONE);
+ 
+                 cctx.continuousQueries().onEntryUpdated(key, val, old, isInternal() || !context().userCache(),
+                     partition(), true, false, updateCntr, AffinityTopologyVersion.NONE);
+             }
  
 -            cctx.dataStructures().onEntryUpdated(key, op == GridCacheOperation.DELETE);
 +            cctx.dataStructures().onEntryUpdated(key, op == GridCacheOperation.DELETE, keepBinary);
  
              if (intercept) {
                  if (op == GridCacheOperation.UPDATE)
@@@ -2336,10 -2377,7 +2415,7 @@@
              if (res)
                  updateMetrics(op, metrics);
  
-             if (cctx.isReplicated() || primary)
-                 cctx.continuousQueries().onEntryUpdated(this, key, val, oldVal, false);
- 
 -            cctx.dataStructures().onEntryUpdated(key, op == GridCacheOperation.DELETE);
 +            cctx.dataStructures().onEntryUpdated(key, op == GridCacheOperation.DELETE, keepPortable);
  
              if (intercept) {
                  if (op == GridCacheOperation.UPDATE)
@@@ -3186,10 -3230,10 +3268,10 @@@
                  drReplicate(drType, val, ver);
  
                  if (!skipQryNtf) {
-                     if (cctx.isLocal() || cctx.isReplicated() || cctx.affinity().primary(cctx.localNode(), key, topVer))
-                         cctx.continuousQueries().onEntryUpdated(this, key, val, null, preload);
+                     cctx.continuousQueries().onEntryUpdated(key, val, null, this.isInternal()
+                         || !this.context().userCache(), this.partition(), true, preload, updateCntr, topVer);
  
 -                    cctx.dataStructures().onEntryUpdated(key, false);
 +                    cctx.dataStructures().onEntryUpdated(key, false, true);
                  }
  
                  if (cctx.store().isLocal()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index db19c67,55ca12d..2330a95
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@@ -707,11 -649,9 +651,10 @@@ public abstract class GridDhtTxLocalAda
                  passedKeys,
                  read,
                  needRetVal,
-                 skipped,
                  accessTtl,
                  null,
 -                skipStore);
 +                skipStore,
 +                keepBinary);
          }
          catch (IgniteCheckedException e) {
              setRollbackOnly();
@@@ -738,14 -677,11 +680,12 @@@
          final Collection<KeyCacheObject> passedKeys,
          final boolean read,
          final boolean needRetVal,
-         final Set<KeyCacheObject> skipped,
          final long accessTtl,
          @Nullable final CacheEntryPredicate[] filter,
 -        boolean skipStore) {
 +        boolean skipStore,
 +        boolean keepBinary) {
          if (log.isDebugEnabled())
-             log.debug("Before acquiring transaction lock on keys [passedKeys=" + passedKeys + ", skipped=" +
-                 skipped + ']');
+             log.debug("Before acquiring transaction lock on keys [keys=" + passedKeys + ']');
  
          if (passedKeys.isEmpty())
              return new GridFinishedFuture<>(ret);

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 255640f,3ee1048..cd76a56
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@@ -1765,8 -1875,7 +1881,8 @@@ public class GridDhtAtomicCache<K, V> e
                      req.invokeArguments(),
                      primary && writeThrough() && !req.skipStore(),
                      !req.skipStore(),
-                     req.returnValue(),
+                     sndPrevVal || req.returnValue(),
 +                    req.keepBinary(),
                      expiry,
                      true,
                      true,
@@@ -2036,8 -2156,7 +2164,8 @@@
                          null,
                          /*write-through*/false,
                          /*read-through*/false,
-                         /*retval*/false,
+                         /*retval*/sndPrevVal,
 +                        req.keepBinary(),
                          expiry,
                          /*event*/true,
                          /*metrics*/true,

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
index 7b95042,72a60d2..a8807e1
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
@@@ -139,9 -144,19 +144,22 @@@ public class GridDhtAtomicUpdateReques
      /** Task name hash. */
      private int taskNameHash;
  
+     /** Partition. */
+     private GridLongList updateCntrs;
+ 
+     /** On response flag. Access should be synced on future. */
+     @GridDirectTransient
+     private boolean onRes;
+ 
+     @GridDirectTransient
+     private List<Integer> partIds;
+ 
+     @GridDirectTransient
+     private List<CacheObject> localPrevVals;
+ 
 +    /** Keep portable flag. */
 +    private boolean keepBinary;
 +
      /**
       * Empty constructor required by {@link Externalizable}.
       */
@@@ -191,9 -205,10 +209,11 @@@
          this.taskNameHash = taskNameHash;
          this.invokeArgs = invokeArgs;
          this.addDepInfo = addDepInfo;
 +        this.keepBinary = keepBinary;
  
          keys = new ArrayList<>();
+         partIds = new ArrayList<>();
+         localPrevVals = new ArrayList<>();
  
          if (forceTransformBackups) {
              entryProcessors = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 648a248,706655b..49a267a
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@@ -251,8 -249,7 +251,8 @@@ public class GridNearAtomicCache<K, V> 
                          /*write-through*/false,
                          /*read-through*/false,
                          /*retval*/false,
 +                        keepPortable,
-                         /**expiry policy*/null,
+                         /*expiry policy*/null,
                          /*event*/true,
                          /*metrics*/true,
                          /*primary*/false,

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 685b998,dfaa44e..00f0a75
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@@ -562,8 -520,17 +545,10 @@@ public final class GridNearGetFuture<K
                              add(new GridFinishedFuture<>(Collections.singletonMap(key0, val0)));
                          }
                          else {
 -                            K key0 = key.value(cctx.cacheObjectContext(), true);
 -                            key0 = (K)cctx.unwrapPortableIfNeeded(key0, !deserializePortable);
 -
 -                            V val0;
 -
 -                            if (!skipVals) {
 -                                val0 = v.value(cctx.cacheObjectContext(), true);
 -                                val0 = (V)cctx.unwrapPortableIfNeeded(val0, !deserializePortable);
 -                            }
 -                            else
 -                                val0 = (V)Boolean.TRUE;
 +                            K key0 = (K)cctx.unwrapPortableIfNeeded(key, !deserializePortable);
-                             V val0 = (V)cctx.unwrapPortableIfNeeded(v, !deserializePortable);
++                            V val0 = !skipVals ? 
++                                (V)cctx.unwrapPortableIfNeeded(v, !deserializePortable) : 
++                                (V)Boolean.TRUE;
  
                              add(new GridFinishedFuture<>(Collections.singletonMap(key0, val0)));
                          }

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 4b5b204,1c01e4e..2eb4c68
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@@ -347,9 -332,8 +332,9 @@@ public class GridNearTxLocal extends Gr
          boolean readThrough,
          boolean async,
          final Collection<KeyCacheObject> keys,
-         boolean skipVals,
+         final boolean skipVals,
          final boolean needVer,
 +        boolean keepBinary,
          final GridInClosure3<KeyCacheObject, Object, GridCacheVersion> c
      ) {
          if (cacheCtx.isNear()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
index 58ee0c6,ba58f57..cef8371
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
@@@ -390,10 -392,9 +393,10 @@@ public class GridNearTxRemote extends G
                          -1L,
                          cached,
                          drVer,
 -                        skipStore);
 +                        skipStore,
 +                        keepBinary);
  
-                     writeMap.put(key, txEntry);
+                     txState.addWriteEntry(key, txEntry);
  
                      return true;
                  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 9f52699,cff62d9..fae7d8c
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@@ -2133,265 -2183,363 +2201,363 @@@ public abstract class IgniteTxLocalAdap
  
                  KeyCacheObject cacheKey = cacheCtx.toCacheKeyObject(key);
  
-                 IgniteTxKey txKey = cacheCtx.txKey(cacheKey);
- 
-                 IgniteTxEntry txEntry = entry(txKey);
- 
-                 // First time access.
-                 if (txEntry == null) {
-                     while (true) {
-                         GridCacheEntryEx entry = entryEx(cacheCtx, txKey, topologyVersion());
- 
-                         try {
-                             entry.unswap(false);
- 
-                             // Check if lock is being explicitly acquired by the same thread.
-                             if (!implicit && cctx.kernalContext().config().isCacheSanityCheckEnabled() &&
-                                 entry.lockedByThread(threadId, xidVer))
-                                 throw new IgniteCheckedException("Cannot access key within transaction if lock is " +
-                                     "externally held [key=" + key + ", entry=" + entry + ", xidVer=" + xidVer +
-                                     ", threadId=" + threadId +
-                                     ", locNodeId=" + cctx.localNodeId() + ']');
- 
-                             CacheObject old = null;
-                             GridCacheVersion readVer = null;
+                 boolean loadMissed = enlistWriteEntry(cacheCtx,
+                     cacheKey,
+                     val,
+                     entryProcessor,
+                     invokeArgs,
+                     expiryPlc,
+                     retval,
+                     lockOnly,
+                     filter,
+                     drVer,
+                     drTtl,
+                     drExpireTime,
+                     ret,
+                     enlisted,
+                     skipStore,
+                     singleRmv,
+                     hasFilters,
+                     needVal,
+                     needReadVer);
+ 
+                 if (loadMissed) {
+                     if (missedForLoad == null)
+                         missedForLoad = new HashSet<>();
+ 
+                     missedForLoad.add(cacheKey);
+                 }
+             }
  
-                             if (optimistic() && !implicit()) {
-                                 try {
-                                     if (needReadVer) {
-                                         T2<CacheObject, GridCacheVersion> res = primaryLocal(entry) ?
-                                             entry.innerGetVersioned(this,
-                                                 /*swap*/false,
-                                                 /*unmarshal*/retval,
-                                                 /*metrics*/retval,
-                                                 /*events*/retval,
-                                                 CU.subjectId(this, cctx),
-                                                 entryProcessor,
-                                                 resolveTaskName(),
-                                                 null,
-                                                 keepBinary) : null;
+             if (missedForLoad != null) {
+                 return loadMissing(cacheCtx,
+                     missedForLoad,
+                     filter,
+                     ret,
+                     needReadVer,
+                     singleRmv,
+                     hasFilters,
+                     skipStore,
+                     retval);
+             }
  
-                                         if (res != null) {
-                                             old = res.get1();
-                                             readVer = res.get2();
-                                         }
-                                     }
-                                     else {
-                                         old = entry.innerGet(this,
-                                             /*swap*/false,
-                                             /*read-through*/false,
-                                             /*fail-fast*/false,
-                                             /*unmarshal*/retval,
-                                             /*metrics*/retval,
-                                             /*events*/retval,
-                                             /*temporary*/false,
-                                             CU.subjectId(this, cctx),
-                                             entryProcessor,
-                                             resolveTaskName(),
-                                             null,
-                                             keepBinary);
-                                     }
-                                 }
-                                 catch (ClusterTopologyCheckedException e) {
-                                     entry.context().evicts().touch(entry, topologyVersion());
+             return new GridFinishedFuture<>();
+         }
+         catch (IgniteCheckedException e) {
+             return new GridFinishedFuture<>(e);
+         }
+     }
  
-                                     throw e;
-                                 }
-                             }
-                             else
-                                 old = retval ? entry.rawGetOrUnmarshal(false) : entry.rawGet();
+     /**
+      * @param cacheCtx Cache context.
+      * @param keys Keys to load.
+      * @param filter Filter.
+      * @param ret Return value.
+      * @param needReadVer Read version flag.
+      * @param singleRmv {@code True} for single remove operation.
+      * @param hasFilters {@code True} if filters not empty.
+      * @param skipStore Skip store flag.
+      * @param retval Return value flag.
+      * @return Load future.
+      */
+     private IgniteInternalFuture<Void> loadMissing(
+         final GridCacheContext cacheCtx,
+         final Set<KeyCacheObject> keys,
+         final CacheEntryPredicate[] filter,
+         final GridCacheReturn ret,
+         final boolean needReadVer,
+         final boolean singleRmv,
+         final boolean hasFilters,
+         final boolean skipStore,
+         final boolean retval) {
+         GridInClosure3<KeyCacheObject, Object, GridCacheVersion> c =
+             new GridInClosure3<KeyCacheObject, Object, GridCacheVersion>() {
+                 @Override public void apply(KeyCacheObject key,
+                     @Nullable Object val,
+                     @Nullable GridCacheVersion loadVer) {
+                     if (log.isDebugEnabled())
+                         log.debug("Loaded value from remote node [key=" + key + ", val=" + val + ']');
  
-                             if (old != null && hasFilters && !filter(entry.context(), cacheKey, old, filter)) {
-                                 skipped = skip(skipped, cacheKey);
+                     IgniteTxEntry e = entry(new IgniteTxKey(key, cacheCtx.cacheId()));
  
-                                 ret.set(cacheCtx, old, false, keepBinary);
+                     assert e != null;
  
-                                 if (!readCommitted()) {
-                                     // Enlist failed filters as reads for non-read-committed mode,
-                                     // so future ops will get the same values.
-                                     txEntry = addEntry(READ,
-                                         old,
-                                         null,
-                                         null,
-                                         entry,
-                                         null,
-                                         CU.empty0(),
-                                         false,
-                                         -1L,
-                                         -1L,
-                                         null,
-                                         skipStore,
-                                         keepBinary);
+                     if (needReadVer) {
+                         assert loadVer != null;
  
-                                     txEntry.markValid();
+                         e.serializableReadVersion(singleRmv && val != null ? SER_READ_NOT_EMPTY_VER : loadVer);
+                     }
  
-                                     if (needReadVer) {
-                                         assert readVer != null;
+                     if (singleRmv) {
+                         assert !hasFilters && !retval;
+                         assert val == null || Boolean.TRUE.equals(val) : val;
  
-                                         txEntry.serializableReadVersion(singleRmv ? SER_READ_NOT_EMPTY_VER : readVer);
-                                     }
-                                 }
 -                        ret.set(cacheCtx, null, val != null);
++                        ret.set(cacheCtx, null, val != null, keepBinary);
+                     }
+                     else {
+                         CacheObject cacheVal = cacheCtx.toCacheObject(val);
  
-                                 if (readCommitted())
-                                     cacheCtx.evicts().touch(entry, topologyVersion());
+                         if (e.op() == TRANSFORM) {
+                             GridCacheVersion ver;
  
-                                 break; // While.
+                             try {
+                                 ver = e.cached().version();
                              }
+                             catch (GridCacheEntryRemovedException ex) {
+                                 assert optimistic() : e;
  
-                             final GridCacheOperation op = lockOnly ? NOOP : rmv ? DELETE :
-                                 entryProcessor != null ? TRANSFORM : old != null ? UPDATE : CREATE;
+                                 if (log.isDebugEnabled())
+                                     log.debug("Failed to get entry version: [msg=" + ex.getMessage() + ']');
  
-                             txEntry = addEntry(op,
-                                 cacheCtx.toCacheObject(val),
-                                 entryProcessor,
-                                 invokeArgs,
-                                 entry,
-                                 expiryPlc,
-                                 filter,
-                                 true,
-                                 drTtl,
-                                 drExpireTime,
-                                 drVer,
-                                 skipStore,
-                                 keepBinary);
+                                 ver = null;
+                             }
  
-                             if (!implicit() && readCommitted() && !cacheCtx.offheapTiered())
-                                 cacheCtx.evicts().touch(entry, topologyVersion());
+                             addInvokeResult(e, cacheVal, ret, ver);
+                         }
+                         else {
+                             boolean success = !hasFilters || isAll(e.context(), key, cacheVal, filter);
  
-                             enlisted.add(cacheKey);
+                             ret.set(cacheCtx, cacheVal, success);
+                         }
+                     }
+                 }
+             };
  
-                             if (!pessimistic() && !implicit()) {
-                                 txEntry.markValid();
+         return loadMissing(
+             cacheCtx,
+             /*read through*/cacheCtx.config().isLoadPreviousValue() && !skipStore,
+             /*async*/true,
+             keys,
+             /*skipVals*/singleRmv,
+             needReadVer,
+             c);
+     }
  
-                                 if (old == null) {
-                                     if (needVal) {
-                                         if (missedForLoad == null)
-                                             missedForLoad = new HashSet<>();
+     /**
+      * @param cacheCtx Cache context.
+      * @param cacheKey Key.
+      * @param val Value.
+      * @param entryProcessor Entry processor.
+      * @param invokeArgs Optional arguments for EntryProcessor.
+      * @param expiryPlc Explicitly specified expiry policy for entry.
+      * @param retval Return value flag.
+      * @param lockOnly
+      * @param filter Filter.
+      * @param drVer DR version.
+      * @param drTtl DR ttl.
+      * @param drExpireTime DR expire time.
+      * @param ret Return value.
+      * @param enlisted Enlisted keys collection.
+      * @param skipStore Skip store flag.
+      * @param singleRmv {@code True} for single remove operation.
+      * @param hasFilters {@code True} if filters not empty.
+      * @param needVal {@code True} if value is needed.
+      * @param needReadVer {@code True} if need read entry version.
+      * @return {@code True} if entry value should be loaded.
+      * @throws IgniteCheckedException If failed.
+      */
+     private boolean enlistWriteEntry(GridCacheContext cacheCtx,
+         final KeyCacheObject cacheKey,
+         final @Nullable Object val,
+         final @Nullable EntryProcessor<?, ?, ?> entryProcessor,
+         final @Nullable Object[] invokeArgs,
+         final @Nullable ExpiryPolicy expiryPlc,
+         final boolean retval,
+         final boolean lockOnly,
+         final CacheEntryPredicate[] filter,
+         final GridCacheVersion drVer,
+         final long drTtl,
+         long drExpireTime,
+         final GridCacheReturn ret,
+         @Nullable final Collection<KeyCacheObject> enlisted,
+         boolean skipStore,
+         boolean singleRmv,
+         boolean hasFilters,
+         final boolean needVal,
+         boolean needReadVer
+     ) throws IgniteCheckedException {
+         boolean loadMissed = false;
  
-                                         missedForLoad.add(cacheKey);
-                                     }
-                                     else {
-                                         assert !implicit() || !transform : this;
-                                         assert txEntry.op() != TRANSFORM : txEntry;
+         final boolean rmv = val == null && entryProcessor == null;
  
-                                         if (retval)
-                                             ret.set(cacheCtx, null, true, keepBinary);
-                                         else
-                                             ret.success(true);
-                                     }
-                                 }
-                                 else {
-                                     if (needReadVer) {
-                                         assert readVer != null;
+         IgniteTxKey txKey = cacheCtx.txKey(cacheKey);
  
-                                         txEntry.serializableReadVersion(singleRmv ? SER_READ_NOT_EMPTY_VER : readVer);
-                                     }
+         IgniteTxEntry txEntry = entry(txKey);
  
-                                     if (retval && !transform)
-                                         ret.set(cacheCtx, old, true, keepBinary);
-                                     else {
-                                         if (txEntry.op() == TRANSFORM) {
-                                             GridCacheVersion ver;
+         // First time access.
+         if (txEntry == null) {
+             while (true) {
+                 GridCacheEntryEx entry = entryEx(cacheCtx, txKey, topologyVersion());
  
-                                             try {
-                                                 ver = entry.version();
-                                             }
-                                             catch (GridCacheEntryRemovedException ex) {
-                                                 assert optimistic() : txEntry;
+                 try {
+                     entry.unswap(false);
+ 
+                     // Check if lock is being explicitly acquired by the same thread.
+                     if (!implicit && cctx.kernalContext().config().isCacheSanityCheckEnabled() &&
+                         entry.lockedByThread(threadId, xidVer)) {
+                         throw new IgniteCheckedException("Cannot access key within transaction if lock is " +
+                             "externally held [key=" + CU.value(cacheKey, cacheCtx, false) +
+                             ", entry=" + entry +
+                             ", xidVer=" + xidVer +
+                             ", threadId=" + threadId +
+                             ", locNodeId=" + cctx.localNodeId() + ']');
+                     }
  
-                                                 if (log.isDebugEnabled())
-                                                     log.debug("Failed to get entry version " +
-                                                         "[err=" + ex.getMessage() + ']');
+                     CacheObject old = null;
+                     GridCacheVersion readVer = null;
  
-                                                 ver = null;
-                                             }
+                     if (optimistic() && !implicit()) {
+                         try {
+                             if (needReadVer) {
+                                 T2<CacheObject, GridCacheVersion> res = primaryLocal(entry) ?
+                                     entry.innerGetVersioned(this,
+                                         /*swap*/false,
+                                         /*unmarshal*/retval,
+                                         /*metrics*/retval,
+                                         /*events*/retval,
+                                         CU.subjectId(this, cctx),
+                                         entryProcessor,
+                                         resolveTaskName(),
+                                         null) : null;
  
-                                             addInvokeResult(txEntry, old, ret, ver);
-                                         }
-                                         else
-                                             ret.success(true);
-                                     }
+                                 if (res != null) {
+                                     old = res.get1();
+                                     readVer = res.get2();
                                  }
                              }
-                             // Pessimistic.
                              else {
-                                 if (retval && !transform)
-                                     ret.set(cacheCtx, old, true, keepBinary);
-                                 else
-                                     ret.success(true);
+                                 old = entry.innerGet(this,
+                                     /*swap*/false,
+                                     /*read-through*/false,
+                                     /*fail-fast*/false,
+                                     /*unmarshal*/retval,
+                                     /*metrics*/retval,
+                                     /*events*/retval,
+                                     /*temporary*/false,
+                                     CU.subjectId(this, cctx),
+                                     entryProcessor,
+                                     resolveTaskName(),
+                                     null);
                              }
- 
-                             break; // While.
                          }
-                         catch (GridCacheEntryRemovedException ignore) {
-                             if (log.isDebugEnabled())
-                                 log.debug("Got removed entry in transaction putAll0 method: " + entry);
+                         catch (ClusterTopologyCheckedException e) {
+                             entry.context().evicts().touch(entry, topologyVersion());
+ 
+                             throw e;
                          }
                      }
-                 }
-                 else {
-                     if (entryProcessor == null && txEntry.op() == TRANSFORM)
-                         throw new IgniteCheckedException("Failed to enlist write value for key (cannot have update value in " +
-                             "transaction after EntryProcessor is applied): " + key);
- 
-                     GridCacheEntryEx entry = txEntry.cached();
+                     else
+                         old = retval ? entry.rawGetOrUnmarshal(false) : entry.rawGet();
  
-                     CacheObject v = txEntry.value();
+                     if (old != null && hasFilters && !filter(entry.context(), cacheKey, old, filter)) {
+                         ret.set(cacheCtx, old, false);
  
-                     boolean del = txEntry.op() == DELETE && rmv;
+                         if (!readCommitted()) {
+                             // Enlist failed filters as reads for non-read-committed mode,
+                             // so future ops will get the same values.
+                             txEntry = addEntry(READ,
+                                 old,
+                                 null,
+                                 null,
+                                 entry,
+                                 null,
+                                 CU.empty0(),
+                                 false,
+                                 -1L,
+                                 -1L,
+                                 null,
+                                 skipStore);
  
-                     if (!del) {
-                         if (hasFilters && !filter(entry.context(), cacheKey, v, filter)) {
-                             skipped = skip(skipped, cacheKey);
+                             txEntry.markValid();
  
-                             ret.set(cacheCtx, v, false, keepBinary);
+                             if (needReadVer) {
+                                 assert readVer != null;
  
-                             continue;
+                                 txEntry.serializableReadVersion(singleRmv ? SER_READ_NOT_EMPTY_VER : readVer);
+                             }
                          }
  
-                         GridCacheOperation op = rmv ? DELETE : entryProcessor != null ? TRANSFORM :
-                             v != null ? UPDATE : CREATE;
+                         if (readCommitted())
+                             cacheCtx.evicts().touch(entry, topologyVersion());
  
-                         txEntry = addEntry(op,
-                             cacheCtx.toCacheObject(val),
-                             entryProcessor,
-                             invokeArgs,
-                             entry,
-                             expiryPlc,
-                             filter,
-                             true,
-                             drTtl,
-                             drExpireTime,
-                             drVer,
-                             skipStore,
-                             keepBinary);
+                         break; // While.
+                     }
+ 
+                     final GridCacheOperation op = lockOnly ? NOOP : rmv ? DELETE :
+                         entryProcessor != null ? TRANSFORM : old != null ? UPDATE : CREATE;
+ 
+                     txEntry = addEntry(op,
+                         cacheCtx.toCacheObject(val),
+                         entryProcessor,
+                         invokeArgs,
+                         entry,
+                         expiryPlc,
+                         filter,
+                         true,
+                         drTtl,
+                         drExpireTime,
+                         drVer,
+                         skipStore);
  
+                     if (!implicit() && readCommitted() && !cacheCtx.offheapTiered())
+                         cacheCtx.evicts().touch(entry, topologyVersion());
+ 
+                     if (enlisted != null)
                          enlisted.add(cacheKey);
  
-                         if (txEntry.op() == TRANSFORM) {
-                             GridCacheVersion ver;
+                     if (!pessimistic() && !implicit()) {
+                         txEntry.markValid();
  
-                             try {
-                                 ver = entry.version();
-                             }
-                             catch (GridCacheEntryRemovedException e) {
-                                 assert optimistic() : txEntry;
+                         if (old == null) {
+                             if (needVal)
+                                 loadMissed = true;
+                             else {
+                                 assert !implicit() || !transform : this;
+                                 assert txEntry.op() != TRANSFORM : txEntry;
  
-                                 if (log.isDebugEnabled())
-                                     log.debug("Failed to get entry version: [msg=" + e.getMessage() + ']');
+                                 if (retval)
+                                     ret.set(cacheCtx, null, true);
+                                 else
+                                     ret.success(true);
+                             }
+                         }
+                         else {
+                             if (needReadVer) {
+                                 assert readVer != null;
  
-                                 ver = null;
+                                 txEntry.serializableReadVersion(singleRmv ? SER_READ_NOT_EMPTY_VER : readVer);
                              }
  
-                             addInvokeResult(txEntry, txEntry.value(), ret, ver);
-                         }
-                     }
+                             if (retval && !transform)
+                                 ret.set(cacheCtx, old, true);
+                             else {
+                                 if (txEntry.op() == TRANSFORM) {
+                                     GridCacheVersion ver;
  
-                     if (!pessimistic()) {
-                         txEntry.markValid();
+                                     try {
+                                         ver = entry.version();
+                                     }
+                                     catch (GridCacheEntryRemovedException ex) {
+                                         assert optimistic() : txEntry;
  
+                                         if (log.isDebugEnabled())
+                                             log.debug("Failed to get entry version " +
+                                                 "[err=" + ex.getMessage() + ']');
+ 
+                                         ver = null;
+                                     }
+ 
+                                     addInvokeResult(txEntry, old, ret, ver);
+                                 }
+                                 else
+                                     ret.success(true);
+                             }
+                         }
+                     }
+                     // Pessimistic.
+                     else {
                          if (retval && !transform)
-                             ret.set(cacheCtx, v, true, keepBinary);
+                             ret.set(cacheCtx, old, true);
                          else
                              ret.success(true);
                      }
@@@ -2829,19 -3081,15 +3101,16 @@@
                  drMap,
                  null,
                  opCtx != null && opCtx.skipStore(),
 -                false);
 +                false,
 +                opCtx != null && opCtx.isKeepBinary());
  
              if (pessimistic()) {
-                 // Loose all skipped.
-                 final Set<KeyCacheObject> loaded = loadFut.get();
- 
-                 final Collection<KeyCacheObject> keys = F.view(enlisted, F0.notIn(loaded));
+                 assert loadFut == null || loadFut.isDone() : loadFut;
  
                  if (log.isDebugEnabled())
-                     log.debug("Before acquiring transaction lock for put on keys: " + keys);
+                     log.debug("Before acquiring transaction lock for put on keys: " + enlisted);
  
-                 IgniteInternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(keys,
+                 IgniteInternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(enlisted,
                      lockTimeout(),
                      this,
                      false,
@@@ -3029,141 -3292,131 +3313,132 @@@
  
          init();
  
-         try {
-             Collection<KeyCacheObject> enlisted = new ArrayList<>();
- 
-             CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
+         final Collection<KeyCacheObject> enlisted = new ArrayList<>();
  
-             ExpiryPolicy plc;
+         CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
  
-             if (!F.isEmpty(filter))
-                 plc = opCtx != null ? opCtx.expiry() : null;
-             else
-                 plc = null;
+         ExpiryPolicy plc;
  
-             final IgniteInternalFuture<Set<KeyCacheObject>> loadFut = enlistWrite(
-                 cacheCtx,
-                 keys0,
-                 plc,
-                 implicit,
-                 /** lookup map */null,
-                 /** invoke map */null,
-                 /** invoke arguments */null,
-                 retval,
-                 /** lock only */false,
-                 filter,
-                 ret,
-                 enlisted,
-                 null,
-                 drMap,
-                 opCtx != null && opCtx.skipStore(),
-                 singleRmv,
-                 opCtx != null && opCtx.isKeepBinary()
-             );
+         if (!F.isEmpty(filter))
+             plc = opCtx != null ? opCtx.expiry() : null;
+         else
+             plc = null;
  
-             if (log.isDebugEnabled())
-                 log.debug("Remove keys: " + enlisted);
+         final IgniteInternalFuture<Void> loadFut = enlistWrite(
+             cacheCtx,
+             keys0,
+             plc,
+             /** lookup map */null,
+             /** invoke map */null,
+             /** invoke arguments */null,
+             retval,
+             /** lock only */false,
+             filter,
+             ret,
+             enlisted,
+             null,
+             drMap,
+             opCtx != null && opCtx.skipStore(),
 -            singleRmv
++            singleRmv,
++            opCtx != null && opCtx.isKeepBinary()
+         );
  
-             // Acquire locks only after having added operation to the write set.
-             // Otherwise, during rollback we will not know whether locks need
-             // to be rolled back.
-             if (pessimistic()) {
-                 // Loose all skipped.
-                 final Collection<KeyCacheObject> passedKeys = F.view(enlisted, F0.notIn(loadFut.get()));
+         if (log.isDebugEnabled())
+             log.debug("Remove keys: " + enlisted);
  
-                 if (log.isDebugEnabled())
-                     log.debug("Before acquiring transaction lock for remove on keys: " + passedKeys);
+         // Acquire locks only after having added operation to the write set.
+         // Otherwise, during rollback we will not know whether locks need
+         // to be rolled back.
+         if (pessimistic()) {
+             assert loadFut.isDone() : loadFut;
  
-                 IgniteInternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(passedKeys,
-                     lockTimeout(),
-                     this,
-                     false,
-                     retval,
-                     isolation,
-                     isInvalidate(),
-                     -1L);
+             if (log.isDebugEnabled())
+                 log.debug("Before acquiring transaction lock for remove on keys: " + enlisted);
  
-                 PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
-                     @Override protected GridCacheReturn postLock(GridCacheReturn ret)
-                         throws IgniteCheckedException
-                     {
-                         if (log.isDebugEnabled())
-                             log.debug("Acquired transaction lock for remove on keys: " + passedKeys);
+             IgniteInternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(enlisted,
+                 lockTimeout(),
+                 this,
+                 false,
+                 retval,
+                 isolation,
+                 isInvalidate(),
+                 -1L);
+ 
+             PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
+                 @Override protected GridCacheReturn postLock(GridCacheReturn ret)
+                     throws IgniteCheckedException
+                 {
+                     if (log.isDebugEnabled())
+                         log.debug("Acquired transaction lock for remove on keys: " + enlisted);
  
-                         postLockWrite(cacheCtx,
-                             passedKeys,
-                             loadFut.get(),
-                             ret,
+                     postLockWrite(cacheCtx,
+                         enlisted,
+                         ret,
                              /*remove*/true,
-                             retval,
+                         retval,
                              /*read*/false,
-                             -1L,
-                             filter,
+                         -1L,
+                         filter,
                              /*computeInvoke*/false);
  
-                         return ret;
-                     }
-                 };
+                     return ret;
+                 }
+             };
  
-                 if (fut.isDone()) {
+             if (fut.isDone()) {
+                 try {
+                     return nonInterruptable(plc1.apply(fut.get(), null));
+                 }
+                 catch (GridClosureException e) {
+                     return new GridFinishedFuture<>(e.unwrap());
+                 }
+                 catch (IgniteCheckedException e) {
                      try {
-                         return nonInterruptable(plc1.apply(fut.get(), null));
+                         return nonInterruptable(plc1.apply(false, e));
                      }
-                     catch (GridClosureException e) {
-                         return new GridFinishedFuture<>(e.unwrap());
-                     }
-                     catch (IgniteCheckedException e) {
-                         try {
-                             return nonInterruptable(plc1.apply(false, e));
-                         }
-                         catch (Exception e1) {
-                             return new GridFinishedFuture<>(e1);
-                         }
+                     catch (Exception e1) {
+                         return new GridFinishedFuture<>(e1);
                      }
                  }
-                 else
-                     return nonInterruptable(new GridEmbeddedFuture<>(
-                         fut,
-                         plc1
-                     ));
              }
-             else {
-                 if (implicit()) {
-                     // Should never load missing values for implicit transaction as values will be returned
-                     // with prepare response, if required.
-                     assert loadFut.isDone();
- 
-                     return nonInterruptable(commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() {
-                         @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut)
-                             throws IgniteCheckedException {
-                             try {
-                                 txFut.get();
+             else
+                 return nonInterruptable(new GridEmbeddedFuture<>(
+                     fut,
+                     plc1
+                 ));
+         }
+         else {
+             if (implicit()) {
+                 // Should never load missing values for implicit transaction as values will be returned
+                 // with prepare response, if required.
+                 assert loadFut.isDone();
  
-                                 return implicitRes;
-                             }
-                             catch (IgniteCheckedException | RuntimeException e) {
-                                 rollbackAsync();
+                 return nonInterruptable(commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() {
+                     @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut)
+                         throws IgniteCheckedException {
+                         try {
+                             txFut.get();
  
-                                 throw e;
-                             }
+                             return implicitRes;
                          }
-                     }));
-                 }
-                 else
-                     return nonInterruptable(loadFut.chain(new CX1<IgniteInternalFuture<Set<KeyCacheObject>>, GridCacheReturn>() {
-                         @Override public GridCacheReturn applyx(IgniteInternalFuture<Set<KeyCacheObject>> f)
-                             throws IgniteCheckedException {
-                             f.get();
+                         catch (IgniteCheckedException | RuntimeException e) {
+                             rollbackAsync();
  
-                             return ret;
+                             throw e;
                          }
-                     }));
+                     }
+                 }));
              }
-         }
-         catch (IgniteCheckedException e) {
-             setRollbackOnly();
+             else {
+                 return nonInterruptable(loadFut.chain(new CX1<IgniteInternalFuture<Void>, GridCacheReturn>() {
+                     @Override public GridCacheReturn applyx(IgniteInternalFuture<Void> f)
+                         throws IgniteCheckedException {
+                         f.get();
  
-             return new GridFinishedFuture<>(e);
+                         return ret;
+                     }
+                 }));
+             }
          }
      }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
----------------------------------------------------------------------
diff --cc modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
index db44fac,99b2423..dfa4cbc
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
@@@ -74,21 -76,6 +76,11 @@@ public class IgniteSqlQueryPutBenchmar
          return true;
      }
  
 +    /** {@inheritDoc} */
 +    @Override public void onWarmupFinished() {
 +        super.onWarmupFinished();
- 
-         resCnt.reset();
-         cnt.reset();
-     }
- 
-     /** {@inheritDoc} */
-     @Override public void tearDown() throws Exception {
-         ignite().log().info("Average number of entries per query: " + ((double)resCnt.longValue() / cnt.longValue()));
- 
-         super.tearDown();
 +    }
 +
      /**
       * @param minSalary Min salary.
       * @param maxSalary Max salary.

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/parent/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3d4ce809/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 68e57c6,1008981..115df88
--- a/pom.xml
+++ b/pom.xml
@@@ -73,10 -73,14 +73,13 @@@
          <module>modules/cloud</module>
          <module>modules/mesos</module>
          <module>modules/kafka</module>
+         <module>modules/flume</module>
          <module>modules/yarn</module>
          <module>modules/jms11</module>
+         <module>modules/twitter</module>
          <module>modules/mqtt</module>
          <module>modules/zookeeper</module>
+         <module>modules/camel</module>
 -        <module>modules/platform</module>
      </modules>
  
      <profiles>


[37/50] [abbrv] ignite git commit: Muted GridCachePartitionedAtomicSetFailoverSelfTest.testNodeRestart

Posted by sb...@apache.org.
Muted GridCachePartitionedAtomicSetFailoverSelfTest.testNodeRestart


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

Branch: refs/heads/master
Commit: 59fc24f40b61efd00542a89b47ca3155b6793943
Parents: d71f612
Author: nikolay tikhonov <nt...@gridgain.com>
Authored: Mon Nov 23 16:04:54 2015 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Mon Nov 23 16:04:54 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheMapEntry.java     | 3 ++-
 .../GridCachePartitionedAtomicSetFailoverSelfTest.java          | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/59fc24f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 2b40351..ac42121 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -3296,7 +3296,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         if (!cctx.isLocal() && !isNear()) {
             GridDhtLocalPartition locPart = cctx.topology().localPartition(partition(), topVer, false);
 
-            assert locPart != null;
+            if (locPart == null)
+                return 0;
 
             updateCntr = locPart.nextUpdateCounter();
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/59fc24f4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
index d542af9..8ff95c7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
@@ -37,4 +37,9 @@ public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetF
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }
+
+    /** {@inheritDoc} */
+    @Override public void testNodeRestart() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-170");
+    }
 }
\ No newline at end of file


[17/50] [abbrv] ignite git commit: IGNITE-1282 - Fixed test.

Posted by sb...@apache.org.
IGNITE-1282 - Fixed test.


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

Branch: refs/heads/master
Commit: ae5fb3e387bb2e349b4a9e12ebf9c72012e3a380
Parents: 80abb06
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 21:05:19 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 21:05:19 2015 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ae5fb3e3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
index e5c9425..4d9456a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
@@ -26,6 +26,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.lang.IgniteBiPredicate;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
 import org.apache.ignite.marshaller.portable.BinaryMarshaller;
 
 /**
@@ -93,7 +94,7 @@ public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnm
     private boolean portableMarshaller() {
         IgniteEx kernal = (IgniteEx)ignite(0);
 
-        return BinaryMarshaller.class.getSimpleName().equals(kernal.context().config().getMarshaller().getClass()
+        return !OptimizedMarshaller.class.getSimpleName().equals(kernal.context().config().getMarshaller().getClass()
             .getSimpleName());
     }
 }
\ No newline at end of file


[39/50] [abbrv] ignite git commit: Merge remote-tracking branch 'apache/ignite-1.5' into ignite-1.5

Posted by sb...@apache.org.
Merge remote-tracking branch 'apache/ignite-1.5' into ignite-1.5


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

Branch: refs/heads/master
Commit: 2ae17094f58b4bfafd006dc2fc14bf9c0a6f8abc
Parents: fa7a4bc 59fc24f
Author: ashutak <as...@gridgain.com>
Authored: Mon Nov 23 16:27:01 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Mon Nov 23 16:27:01 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheMapEntry.java     | 3 ++-
 .../GridCachePartitionedAtomicSetFailoverSelfTest.java          | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[03/50] [abbrv] ignite git commit: Merge branch ignite-1.5 into ignite-1282

Posted by sb...@apache.org.
Merge branch ignite-1.5 into ignite-1282


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

Branch: refs/heads/master
Commit: 9b6adb2903d69ac6e5cbf6e1677ee2ec9447fb2c
Parents: 3d4ce80
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 14:04:22 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 14:04:22 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     |  4 +-
 .../GridDistributedTxPrepareRequest.java        |  3 +-
 .../dht/GridPartitionedSingleGetFuture.java     |  6 +-
 .../dht/colocated/GridDhtColocatedCache.java    |  2 +-
 .../transactions/IgniteTxLocalAdapter.java      | 71 ++++++++++++--------
 5 files changed, 50 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9b6adb29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 512a801..2b40351 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1986,7 +1986,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                                     (EntryProcessor<Object, Object, ?>)writeObj;
 
                                 CacheInvokeEntry<Object, Object> entry =
-                                    new CacheInvokeEntry<>(cctx, key, prevVal, version());
+                                    new CacheInvokeEntry<>(cctx, key, prevVal, version(), keepPortable);
 
                                 try {
                                     entryProcessor.process(entry, invokeArgs);
@@ -1994,7 +1994,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                                     evtVal = entry.modified() ?
                                         cctx.toCacheObject(cctx.unwrapTemporary(entry.getValue())) : prevVal;
                                 }
-                                catch (Exception e) {
+                                catch (Exception ignore) {
                                     evtVal = prevVal;
                                 }
                             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9b6adb29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index 95176ff..e595942 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -329,8 +329,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
         }
 
         // Marshal txNodes only if there is a node in topology with an older version.
-        if (ctx.exchange().minimumNodeVersion(topologyVersion())
-            .compareTo(TX_NODES_DIRECT_MARSHALLABLE_SINCE) < 0) {
+        if (ctx.exchange().minimumNodeVersion(topologyVersion()).compareTo(TX_NODES_DIRECT_MARSHALLABLE_SINCE) < 0) {
             if (txNodes != null && txNodesBytes == null)
                 txNodesBytes = ctx.marshaller().marshal(txNodes);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9b6adb29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index 8f2357b..32f4e80 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -347,7 +347,8 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im
                                 subjId,
                                 null,
                                 taskName,
-                                expiryPlc);
+                                expiryPlc,
+                                true);
 
                             if (res != null) {
                                 v = res.get1();
@@ -366,7 +367,8 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im
                                 subjId,
                                 null,
                                 taskName,
-                                expiryPlc);
+                                expiryPlc,
+                                true);
                         }
 
                         colocated.context().evicts().touch(entry, topVer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9b6adb29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index 72f5cf5..b69b42c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -239,7 +239,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
                         }
                     });
                 }
-            });
+            }, opCtx);
         }
 
         AffinityTopologyVersion topVer = tx == null ?

http://git-wip-us.apache.org/repos/asf/ignite/blob/9b6adb29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index fae7d8c..7c6a1d4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -67,7 +67,6 @@ import org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException
 import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
 import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.GridLeanMap;
-import org.apache.ignite.internal.util.GridLongList;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -2047,7 +2046,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         final CacheEntryPredicate[] filter,
         final GridCacheReturn ret,
         boolean skipStore,
-        final boolean singleRmv) {
+        final boolean singleRmv,
+        boolean keepBinary) {
         try {
             addActiveCache(cacheCtx);
 
@@ -2076,7 +2076,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 singleRmv,
                 hasFilters,
                 needVal,
-                needReadVer);
+                needReadVer,
+                keepBinary);
 
             if (loadMissed) {
                 return loadMissing(cacheCtx,
@@ -2087,7 +2088,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     singleRmv,
                     hasFilters,
                     skipStore,
-                    retval);
+                    retval,
+                    keepBinary);
             }
 
             return new GridFinishedFuture<>();
@@ -2146,8 +2148,6 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
 
         boolean rmv = lookup == null && invokeMap == null;
 
-        Set<KeyCacheObject> missedForLoad = null;
-
         final boolean hasFilters = !F.isEmptyOrNulls(filter) && !F.isAlwaysTrue(filter);
         final boolean needVal = singleRmv || retval || hasFilters;
         final boolean needReadVer = needVal && (serializable() && optimistic());
@@ -2157,6 +2157,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
             if (invokeMap != null)
                 transform = true;
 
+            Set<KeyCacheObject> missedForLoad = null;
+
             for (Object key : keys) {
                 if (key == null) {
                     rollback();
@@ -2219,7 +2221,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     singleRmv,
                     hasFilters,
                     needVal,
-                    needReadVer);
+                    needReadVer,
+                    keepBinary);
 
                 if (loadMissed) {
                     if (missedForLoad == null)
@@ -2238,7 +2241,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     singleRmv,
                     hasFilters,
                     skipStore,
-                    retval);
+                    retval,
+                    keepBinary);
             }
 
             return new GridFinishedFuture<>();
@@ -2269,7 +2273,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         final boolean singleRmv,
         final boolean hasFilters,
         final boolean skipStore,
-        final boolean retval) {
+        final boolean retval,
+        final boolean keepBinary) {
         GridInClosure3<KeyCacheObject, Object, GridCacheVersion> c =
             new GridInClosure3<KeyCacheObject, Object, GridCacheVersion>() {
                 @Override public void apply(KeyCacheObject key,
@@ -2317,7 +2322,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                         else {
                             boolean success = !hasFilters || isAll(e.context(), key, cacheVal, filter);
 
-                            ret.set(cacheCtx, cacheVal, success);
+                            ret.set(cacheCtx, cacheVal, success, keepBinary);
                         }
                     }
                 }
@@ -2330,6 +2335,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
             keys,
             /*skipVals*/singleRmv,
             needReadVer,
+            keepBinary,
             c);
     }
 
@@ -2341,7 +2347,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
      * @param invokeArgs Optional arguments for EntryProcessor.
      * @param expiryPlc Explicitly specified expiry policy for entry.
      * @param retval Return value flag.
-     * @param lockOnly
+     * @param lockOnly Lock only flag.
      * @param filter Filter.
      * @param drVer DR version.
      * @param drTtl DR ttl.
@@ -2358,10 +2364,10 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
      */
     private boolean enlistWriteEntry(GridCacheContext cacheCtx,
         final KeyCacheObject cacheKey,
-        final @Nullable Object val,
-        final @Nullable EntryProcessor<?, ?, ?> entryProcessor,
-        final @Nullable Object[] invokeArgs,
-        final @Nullable ExpiryPolicy expiryPlc,
+        @Nullable final Object val,
+        @Nullable final EntryProcessor<?, ?, ?> entryProcessor,
+        @Nullable final Object[] invokeArgs,
+        @Nullable final ExpiryPolicy expiryPlc,
         final boolean retval,
         final boolean lockOnly,
         final CacheEntryPredicate[] filter,
@@ -2374,7 +2380,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         boolean singleRmv,
         boolean hasFilters,
         final boolean needVal,
-        boolean needReadVer
+        boolean needReadVer,
+        boolean keepBinary
     ) throws IgniteCheckedException {
         boolean loadMissed = false;
 
@@ -2418,7 +2425,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                                         CU.subjectId(this, cctx),
                                         entryProcessor,
                                         resolveTaskName(),
-                                        null) : null;
+                                        null,
+                                        keepBinary) : null;
 
                                 if (res != null) {
                                     old = res.get1();
@@ -2437,7 +2445,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                                     CU.subjectId(this, cctx),
                                     entryProcessor,
                                     resolveTaskName(),
-                                    null);
+                                    null,
+                                    keepBinary);
                             }
                         }
                         catch (ClusterTopologyCheckedException e) {
@@ -2450,7 +2459,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                         old = retval ? entry.rawGetOrUnmarshal(false) : entry.rawGet();
 
                     if (old != null && hasFilters && !filter(entry.context(), cacheKey, old, filter)) {
-                        ret.set(cacheCtx, old, false);
+                        ret.set(cacheCtx, old, false, keepBinary);
 
                         if (!readCommitted()) {
                             // Enlist failed filters as reads for non-read-committed mode,
@@ -2466,7 +2475,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                                 -1L,
                                 -1L,
                                 null,
-                                skipStore);
+                                skipStore,
+                                keepBinary);
 
                             txEntry.markValid();
 
@@ -2497,7 +2507,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                         drTtl,
                         drExpireTime,
                         drVer,
-                        skipStore);
+                        skipStore,
+                        keepBinary);
 
                     if (!implicit() && readCommitted() && !cacheCtx.offheapTiered())
                         cacheCtx.evicts().touch(entry, topologyVersion());
@@ -2516,7 +2527,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                                 assert txEntry.op() != TRANSFORM : txEntry;
 
                                 if (retval)
-                                    ret.set(cacheCtx, null, true);
+                                    ret.set(cacheCtx, null, true, keepBinary);
                                 else
                                     ret.success(true);
                             }
@@ -2529,7 +2540,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                             }
 
                             if (retval && !transform)
-                                ret.set(cacheCtx, old, true);
+                                ret.set(cacheCtx, old, true, keepBinary);
                             else {
                                 if (txEntry.op() == TRANSFORM) {
                                     GridCacheVersion ver;
@@ -2557,7 +2568,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     // Pessimistic.
                     else {
                         if (retval && !transform)
-                            ret.set(cacheCtx, old, true);
+                            ret.set(cacheCtx, old, true, keepBinary);
                         else
                             ret.success(true);
                     }
@@ -2583,7 +2594,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
 
             if (!del) {
                 if (hasFilters && !filter(entry.context(), cacheKey, v, filter)) {
-                    ret.set(cacheCtx, v, false);
+                    ret.set(cacheCtx, v, false, keepBinary);
 
                     return loadMissed;
                 }
@@ -2602,7 +2613,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     drTtl,
                     drExpireTime,
                     drVer,
-                    skipStore);
+                    skipStore,
+                    keepBinary);
 
                 if (enlisted != null)
                     enlisted.add(cacheKey);
@@ -2630,7 +2642,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 txEntry.markValid();
 
                 if (retval && !transform)
-                    ret.set(cacheCtx, v, true);
+                    ret.set(cacheCtx, v, true, keepBinary);
                 else
                     ret.success(true);
             }
@@ -2904,7 +2916,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         final GridCacheContext cacheCtx,
         K key,
         @Nullable V val,
-        @Nullable EntryProcessor entryProcessor,
+        @Nullable EntryProcessor<K, V, Object> entryProcessor,
         @Nullable final Object[] invokeArgs,
         final boolean retval,
         @Nullable final CacheEntryPredicate[] filter
@@ -2932,7 +2944,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 filter,
                 ret,
                 opCtx != null && opCtx.skipStore(),
-                /*singleRmv*/false);
+                /*singleRmv*/false,
+                opCtx != null && opCtx.isKeepBinary());
 
             if (pessimistic()) {
                 assert loadFut == null || loadFut.isDone() : loadFut;


[14/50] [abbrv] ignite git commit: Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5-tx-futs-opts

Posted by sb...@apache.org.
Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.5-tx-futs-opts


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

Branch: refs/heads/master
Commit: d92de42de528893920f51711acaa66b6d882549f
Parents: 5e6d0ff ab8298a
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Nov 20 19:18:01 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Nov 20 19:18:01 2015 +0300

----------------------------------------------------------------------
 .../stream/camel/IgniteCamelStreamerTest.java   |  16 +-
 .../camel/IgniteCamelStreamerTestSuite.java     |   1 -
 .../internal/MarshallerContextAdapter.java      |   4 +-
 .../GridCachePartitionExchangeManager.java      |  34 ++-
 .../dht/GridClientPartitionTopology.java        |  38 +--
 .../dht/GridDhtPartitionTopology.java           |  12 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  45 +--
 .../distributed/dht/GridDhtTxPrepareFuture.java |   1 -
 .../dht/GridPartitionedGetFuture.java           |   2 +-
 .../dht/preloader/GridDhtPartitionFullMap.java  |  41 ++-
 .../dht/preloader/GridDhtPartitionMap.java      | 148 +--------
 .../dht/preloader/GridDhtPartitionMap2.java     | 306 +++++++++++++++++++
 .../GridDhtPartitionsExchangeFuture.java        |  24 +-
 .../GridDhtPartitionsSingleMessage.java         |   6 +-
 .../distributed/near/GridNearCacheAdapter.java  |   1 -
 ...arOptimisticSerializableTxPrepareFuture.java |   3 -
 .../near/GridNearOptimisticTxPrepareFuture.java |   1 -
 .../near/GridNearTxFinishFuture.java            |   4 -
 .../distributed/near/GridNearTxRemote.java      |   1 -
 .../processors/cache/local/GridLocalCache.java  |   1 -
 .../cache/local/GridLocalLockFuture.java        |   2 -
 .../cache/transactions/IgniteInternalTx.java    |   1 -
 .../cache/transactions/IgniteTxAdapter.java     |   1 -
 .../transactions/IgniteTxLocalAdapter.java      |   1 -
 .../cache/transactions/IgniteTxManager.java     |   1 -
 .../cache/transactions/IgniteTxStateImpl.java   |   1 -
 .../ignite/internal/visor/cache/VisorCache.java |   6 +-
 .../org/apache/ignite/stream/StreamAdapter.java |   1 -
 .../resources/META-INF/classnames.properties    |   1 +
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |  12 +-
 .../dht/GridCacheDhtPreloadSelfTest.java        |   4 +-
 .../distributed/dht/GridCacheDhtTestUtils.java  |   8 +-
 ...cingDelayedPartitionMapExchangeSelfTest.java | 178 +++++++++++
 .../testsuites/IgniteCacheTestSuite3.java       |   2 +
 .../h2/twostep/GridReduceQueryExecutor.java     |   4 +-
 .../cache/WaitMapExchangeFinishCallable.java    |   4 +-
 .../IgniteFailoverAbstractBenchmark.java        |   4 +-
 37 files changed, 661 insertions(+), 259 deletions(-)
----------------------------------------------------------------------



[44/50] [abbrv] ignite git commit: ignite-1.5 Reworked code generation in order to avoid compiler error: "java: code too large".

Posted by sb...@apache.org.
ignite-1.5 Reworked code generation in order to avoid compiler error: "java: code too large".


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

Branch: refs/heads/master
Commit: fe53753368b001ea2c3d568f77b7f2b03c937bb9
Parents: d71f612
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Nov 23 22:06:37 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Nov 23 22:06:37 2015 +0700

----------------------------------------------------------------------
 .../ignite/schema/generator/CodeGenerator.java  | 185 +++++++++----------
 1 file changed, 91 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fe537533/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
index 283ccc1..92167e5 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
@@ -71,11 +71,11 @@ public class CodeGenerator {
         "void",         "volatile",      "while"
     ));
 
-    /** java.lang.*  */
-    private  static final String JAVA_LANG_PKG = "java.lang.";
+    /** java.lang.* */
+    private static final String JAVA_LANG_PKG = "java.lang.";
 
-    /** java.util.*  */
-    private  static final String JAVA_UTIL_PKG = "java.util.";
+    /** java.util.* */
+    private static final String JAVA_UTIL_PKG = "java.util.";
 
     /** Regexp to validate java identifier. */
     private static final Pattern VALID_JAVA_IDENTIFIER =
@@ -547,43 +547,15 @@ public class CodeGenerator {
 
             if (javaTypeName.startsWith(JAVA_LANG_PKG))
                 javaTypeName = javaTypeName.substring(JAVA_LANG_PKG.length());
-            else  if (javaTypeName.startsWith(JAVA_UTIL_PKG))
+            else if (javaTypeName.startsWith(JAVA_UTIL_PKG))
                 javaTypeName = javaTypeName.substring(JAVA_UTIL_PKG.length());
 
             add2(src, owner + ".add(new JdbcTypeField(Types." + field.dbTypeName() + ", \"" + field.dbName() + "\", " +
-                    javaTypeName + ".class, \"" + field.javaName() + "\"));");
+                javaTypeName + ".class, \"" + field.javaName() + "\"));");
         }
     }
 
     /**
-     * Add query fields.
-     *
-     * @param src Source code lines.
-     * @param fields List of fields to add.
-     * @param comment Commentary text.
-     * @param first {@code true} if variable should be declared.
-     * @return {@code false} if variable was declared.
-     */
-    private static boolean addQueryFields(Collection<String> src, Collection<PojoField> fields, String comment,
-        boolean first) {
-        if (fields.isEmpty())
-            return first;
-
-        add2(src, comment);
-        add2(src, (first ? "LinkedHashMap<String, String> " : "") + "fields = new LinkedHashMap<>();");
-        add0(src, "");
-
-        for (PojoField field : fields)
-            add2(src, "fields.put(\"" + field.javaName() + "\", \"" + javaTypeName(field) + "\");");
-
-        add0(src, "");
-        add2(src, "qryEntity.setFields(fields);");
-        add0(src, "");
-
-        return false;
-    }
-
-    /**
      * Generate java snippet for cache configuration with JDBC store and types metadata.
      *
      * @param pojos POJO descriptors.
@@ -612,39 +584,23 @@ public class CodeGenerator {
         Collection<String> src = new ArrayList<>(256);
 
         header(src, pkg, "java.sql.*;java.util.*;" +
-            "org.apache.ignite.cache.*;org.apache.ignite.cache.store.jdbc.*;" +
-            "org.apache.ignite.configuration.*;" + pkg + ".*",
+                "org.apache.ignite.cache.*;org.apache.ignite.cache.store.jdbc.*;" +
+                "org.apache.ignite.configuration.*",
             "CacheConfig", "CacheConfig");
 
-        add1(src, "/**");
-        add1(src, "* Configure cache.");
-        add1(src, "*");
-        add1(src, "* @param cacheName Cache name.");
-        add1(src, "* @param storeFactory Cache store factory.");
-        add1(src, "*/");
-        add1(src, "public static <K, V> CacheConfiguration<K, V> cache(String cacheName," +
-            " CacheJdbcPojoStoreFactory<K, V> storeFactory) {");
-        add2(src, "if (storeFactory == null)");
-        add3(src, " throw new IllegalArgumentException(\"Cache store factory cannot be null.\");");
-        add0(src, "");
-        add2(src, "CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(cacheName);");
-        add0(src, "");
-        add2(src, "ccfg.setCacheStoreFactory(storeFactory);");
-        add2(src, "ccfg.setReadThrough(true);");
-        add2(src, "ccfg.setWriteThrough(true);");
-        add0(src, "");
-
-        add2(src, "// Configure JDBC types. ");
-        add2(src, "Collection<JdbcType> jdbcTypes = new ArrayList<>();");
-        add0(src, "");
-
-        boolean first = true;
-
+        // Generate methods for each type in order to avoid compiler error "java: code too large".
         for (PojoDescriptor pojo : pojos) {
             String tbl = pojo.table();
+            String valClsName = pojo.valueClassName();
 
-            add2(src, "// " + tbl + ".");
-            add2(src, (first ? "JdbcType " : "") + "jdbcType = new JdbcType();");
+            add1(src, "/**");
+            add1(src, "* Create JDBC type for " + tbl + ".");
+            add1(src, "*");
+            add1(src, "* @param cacheName Cache name.");
+            add1(src, "*/");
+            add1(src, "private static JdbcType jdbcType" + valClsName + "(String cacheName) {");
+
+            add2(src, "JdbcType jdbcType = new JdbcType();");
             add0(src, "");
 
             add2(src, "jdbcType.setCacheName(cacheName);");
@@ -654,70 +610,68 @@ public class CodeGenerator {
             add2(src, "jdbcType.setDatabaseTable(\"" + tbl + "\");");
 
             // Java info.
-            add2(src, "jdbcType.setKeyType(" + pojo.keyClassName() + ".class.getName());");
-            add2(src, "jdbcType.setValueType(" + pojo.valueClassName() + ".class.getName());");
+            add2(src, "jdbcType.setKeyType(\"" + pkg + "." + pojo.keyClassName() + "\");");
+            add2(src, "jdbcType.setValueType(\"" + pkg + "." + valClsName + "\");");
             add0(src, "");
 
             // Key fields.
             add2(src, "// Key fields for " + tbl + ".");
-            add2(src, (first ? "Collection<JdbcTypeField> " : "") + "keys = new ArrayList<>();");
+            add2(src, "Collection<JdbcTypeField> keys = new ArrayList<>();");
             addFields(src, "keys", pojo.keyFields());
             add2(src, "jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));");
             add0(src, "");
 
             // Value fields.
             add2(src, "// Value fields for " + tbl + ".");
-            add2(src, (first ? "Collection<JdbcTypeField> " : "") + "vals = new ArrayList<>();");
+            add2(src, "Collection<JdbcTypeField> vals = new ArrayList<>();");
             addFields(src, "vals", pojo.valueFields(includeKeys));
             add2(src, "jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));");
             add0(src, "");
-
-            add2(src, "jdbcTypes.add(jdbcType);");
+            add2(src, "return jdbcType;");
+            add1(src, "}");
             add0(src, "");
 
-            first = false;
-        }
+            add1(src, "/**");
+            add1(src, "* Create SQL Query descriptor for " + tbl + ".");
+            add1(src, "*/");
+            add1(src, "private static QueryEntity queryEntity" + valClsName + "() {");
 
-        add2(src, "storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));");
-        add0(src, "");
+            // Query entity.
+            add2(src, "QueryEntity qryEntity = new QueryEntity();");
+            add0(src, "");
+            add2(src, "qryEntity.setKeyType(\"" + pkg + "." + pojo.keyClassName() + "\");");
+            add2(src, "qryEntity.setValueType(\"" + pkg + "." + valClsName + "\");");
 
-        // Queries entities.
-        add2(src, "// Configure query entities. ");
-        add2(src, "Collection<QueryEntity> qryEntities = new ArrayList<>();");
-        add0(src, "");
+            add0(src, "");
 
-        first = true;
-        boolean firstIdxs = true;
-        boolean firstIdx = true;
+            // Query fields.
+            add2(src, "// Query fields for " + tbl + ".");
+            add2(src, "LinkedHashMap<String, String> fields = new LinkedHashMap<>();");
+            add0(src, "");
 
-        for (PojoDescriptor pojo : pojos) {
-            String tbl = pojo.table();
+            for (PojoField field : pojo.fields())
+                add2(src, "fields.put(\"" + field.javaName() + "\", \"" + javaTypeName(field) + "\");");
 
-            add2(src, (first ? "QueryEntity " : "") + "qryEntity = new QueryEntity();");
             add0(src, "");
-            add2(src, "qryEntity.setKeyType(" + pojo.keyClassName() + ".class.getName());");
-            add2(src, "qryEntity.setValueType(" + pojo.valueClassName() + ".class.getName());");
+            add2(src, "qryEntity.setFields(fields);");
             add0(src, "");
 
-            // Query fields.
-            addQueryFields(src, pojo.fields(), "// Query fields for " + tbl + ".", first);
-
             // Indexes.
             Collection<QueryIndex> idxs = pojo.indexes();
 
             if (!idxs.isEmpty()) {
                 add2(src, "// Indexes for " + tbl + ".");
-                add2(src, (firstIdxs ? "Collection<QueryIndex> " : "") + "idxs = new ArrayList<>();");
+                add2(src, "Collection<QueryIndex> idxs = new ArrayList<>();");
                 add0(src, "");
 
-                firstIdxs = false;
+                boolean firstIdx = true;
 
                 for (QueryIndex idx : idxs) {
                     if (idx.getFields().size() == 1) {
                         Map.Entry<String, Boolean> fld = F.first(idx.getFields().entrySet());
 
                         add2(src, "idxs.add(new QueryIndex(\"" + fld.getKey() + "\", " + fld.getValue() + ", \"" +
-                            idx.getName()  + "\"));");
+                            idx.getName() + "\"));");
                         add0(src, "");
                     }
                     else {
@@ -732,7 +686,7 @@ public class CodeGenerator {
                         add0(src, "");
 
                         for (Map.Entry<String, Boolean> idxFld : idx.getFields().entrySet())
-                            add2(src, "idxFlds.put(\"" + idxFld.getKey()  + "\", " + idxFld.getValue() + ");");
+                            add2(src, "idxFlds.put(\"" + idxFld.getKey() + "\", " + idxFld.getValue() + ");");
 
                         add0(src, "");
 
@@ -750,12 +704,55 @@ public class CodeGenerator {
                 add0(src, "");
             }
 
-            add2(src, "ccfg.setQueryEntities(qryEntities);");
-            add0(src, "");
+            add2(src, "return qryEntity;");
 
-            first = false;
+            add1(src, "}");
+            add0(src, "");
         }
 
+        add1(src, "/**");
+        add1(src, "* Configure cache.");
+        add1(src, "*");
+        add1(src, "* @param cacheName Cache name.");
+        add1(src, "* @param storeFactory Cache store factory.");
+        add1(src, "*/");
+        add1(src, "public static <K, V> CacheConfiguration<K, V> cache(String cacheName," +
+            " CacheJdbcPojoStoreFactory<K, V> storeFactory) {");
+        add2(src, "if (storeFactory == null)");
+        add3(src, " throw new IllegalArgumentException(\"Cache store factory cannot be null.\");");
+        add0(src, "");
+        add2(src, "CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(cacheName);");
+        add0(src, "");
+        add2(src, "ccfg.setCacheStoreFactory(storeFactory);");
+        add2(src, "ccfg.setReadThrough(true);");
+        add2(src, "ccfg.setWriteThrough(true);");
+        add0(src, "");
+
+        add2(src, "// Configure JDBC types. ");
+        add2(src, "Collection<JdbcType> jdbcTypes = new ArrayList<>();");
+        add0(src, "");
+
+        for (PojoDescriptor pojo : pojos)
+            add2(src, "jdbcTypes.add(jdbcType" + pojo.valueClassName() + "(cacheName));");
+
+        add0(src, "");
+
+        add2(src, "storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));");
+        add0(src, "");
+
+
+        add2(src, "// Configure query entities. ");
+        add2(src, "Collection<QueryEntity> qryEntities = new ArrayList<>();");
+        add0(src, "");
+
+        for (PojoDescriptor pojo : pojos)
+            add2(src, "qryEntities.add(queryEntity" + pojo.valueClassName() + "());");
+
+        add0(src, "");
+
+        add2(src, "ccfg.setQueryEntities(qryEntities);");
+        add0(src, "");
+
         add2(src, "return ccfg;");
         add1(src, "}");
 


[38/50] [abbrv] ignite git commit: ignite-yardstick: added debug info into IgniteTransactionalWriteInvokeBenchmark

Posted by sb...@apache.org.
ignite-yardstick: added debug info into IgniteTransactionalWriteInvokeBenchmark


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

Branch: refs/heads/master
Commit: fa7a4bce65421da4f86c72e78850d987278f8e8f
Parents: d71f612
Author: ashutak <as...@gridgain.com>
Authored: Mon Nov 23 16:26:29 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Mon Nov 23 16:26:29 2015 +0300

----------------------------------------------------------------------
 .../IgniteAtomicInvokeRetryBenchmark.java       |   2 +-
 .../failover/IgniteConsistencyException.java    |  64 +++++++++
 ...IgniteTransactionalInvokeRetryBenchmark.java |   2 +-
 ...IgniteTransactionalWriteInvokeBenchmark.java | 135 ++++++++++++++-----
 .../IgniteTransactionalWriteReadBenchmark.java  |   2 +-
 5 files changed, 171 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java
index c0567ef..6e65746 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicInvokeRetryBenchmark.java
@@ -110,7 +110,7 @@ public class IgniteAtomicInvokeRetryBenchmark extends IgniteFailoverAbstractBenc
 
                                 }
 
-                                throw new IllegalStateException("Cache and local map are in inconsistent state " +
+                                throw new IgniteConsistencyException("Cache and local map are in inconsistent state " +
                                     "[badKeys=" + badCacheEntries.keySet() + ']');
                             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java
new file mode 100644
index 0000000..e1fcbfa
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteConsistencyException.java
@@ -0,0 +1,64 @@
+/*
+ * 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.yardstick.cache.failover;
+
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Ignite consistency exception.
+ */
+public class IgniteConsistencyException extends RuntimeException {
+    /** */
+    private static final long serialVersionUID = 0;
+
+    /**
+     * Create empty exception.
+     */
+    public IgniteConsistencyException() {
+        // No-op.
+    }
+
+    /**
+     * Creates new exception with given error message.
+     *
+     * @param msg Error message.
+     */
+    public IgniteConsistencyException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates new grid exception with given throwable as a cause and
+     * source of error message.
+     *
+     * @param cause Non-null throwable cause.
+     */
+    public IgniteConsistencyException(Throwable cause) {
+        this(cause.getMessage(), cause);
+    }
+
+    /**
+     * Creates new exception with given error message and optional nested exception.
+     *
+     * @param msg Error message.
+     * @param cause Optional nested exception (can be {@code null}).
+     */
+    public IgniteConsistencyException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalInvokeRetryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalInvokeRetryBenchmark.java
index f8a1689..16b0959 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalInvokeRetryBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalInvokeRetryBenchmark.java
@@ -122,7 +122,7 @@ public class IgniteTransactionalInvokeRetryBenchmark extends IgniteFailoverAbstr
                                     }
                                 }
 
-                                throw new IllegalStateException("Cache and local map are in inconsistent state.");
+                                throw new IgniteConsistencyException("Cache and local map are in inconsistent state.");
                             }
 
                             println("Cache validation successfully finished in "

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
index 2c4050b..a52ea78 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
@@ -17,14 +17,25 @@
 
 package org.apache.ignite.yardstick.cache.failover;
 
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.Callable;
 import javax.cache.processor.EntryProcessorException;
 import javax.cache.processor.MutableEntry;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.cache.CacheEntryProcessor;
+import org.apache.ignite.cache.affinity.Affinity;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
+import org.apache.ignite.internal.util.typedef.F;
+import org.yardstickframework.BenchmarkConfiguration;
 
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -44,12 +55,40 @@ import static org.yardstickframework.BenchmarkUtils.println;
  * </ul>
  */
 public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstractBenchmark<String, Long> {
+    /** */
+    private static final Long INITIAL_VALUE = 1L;
+
     /** {@inheritDoc} */
-    @Override public boolean test(Map<Object, Object> ctx) throws Exception {
-        final int k = nextRandom(args.range());
+    @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+        super.setUp(cfg);
 
         assert args.keysCount() > 0 : "Count of keys: " + args.keysCount();
 
+        println(cfg, "Populating data...");
+
+        long start = System.nanoTime();
+
+        if (cfg.memberId() == 0) {
+            try (IgniteDataStreamer<String, Long> dataLdr = ignite().dataStreamer(cacheName())) {
+                for (int k = 0; k < args.range() && !Thread.currentThread().isInterrupted(); k++) {
+                    dataLdr.addData("key-" + k + "-master", INITIAL_VALUE);
+
+                    for (int i = 0; i < args.keysCount(); i++)
+                        dataLdr.addData("key-" + k + "-" + i, INITIAL_VALUE);
+
+                    if (k % 100000 == 0)
+                        println(cfg, "Populated accounts: " + k);
+                }
+            }
+        }
+
+        println(cfg, "Finished populating data in " + ((System.nanoTime() - start) / 1_000_000) + " ms.");
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+        final int k = nextRandom(args.range());
+
         final String[] keys = new String[args.keysCount()];
 
         final String masterKey = "key-" + k + "-master";
@@ -59,8 +98,10 @@ public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstr
 
         final int scenario = nextRandom(2);
 
-        return doInTransaction(ignite().transactions(), PESSIMISTIC, REPEATABLE_READ, new Callable<Boolean>() {
-            @Override public Boolean call() throws Exception {
+        final Set<String> badKeys = new LinkedHashSet<>();
+
+        doInTransaction(ignite().transactions(), PESSIMISTIC, REPEATABLE_READ, new Callable<Void>() {
+            @Override public Void call() throws Exception {
                 final int timeout = args.cacheOperationTimeoutMillis();
 
                 switch (scenario) {
@@ -81,46 +122,40 @@ public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstr
 
                         Set<Long> values = new HashSet<>(map.values());
 
-                        if (values.size() != 1) {
-                            // Print all usefull information and finish.
-                            println(cfg, "Got different values for keys [map=" + map + "]");
-
-                            println(cfg, "Cache content:");
-
-                            for (int k = 0; k < args.range(); k++) {
-                                for (int i = 0; i < args.keysCount(); i++) {
-                                    String key = "key-" + k + "-" + i;
-
-                                    asyncCache.get(key);
-                                    Long val = asyncCache.<Long>future().get(timeout);
-
-                                    if (val != null)
-                                        println(cfg, "Entry [key=" + key + ", val=" + val + "]");
-                                }
-                            }
-
-                            throw new IllegalStateException("Found different values for keys (see above information).");
-                        }
+                        if (values.size() != 1)
+                            throw new IgniteConsistencyException("Found different values for keys [map="+map+"]");
 
                         break;
                     case 1: // Invoke scenario.
                         asyncCache.get(masterKey);
                         Long val = asyncCache.<Long>future().get(timeout);
 
-                        asyncCache.put(masterKey, val == null ? 0 : val + 1);
+                        if (val == null)
+                            badKeys.add(masterKey);
+
+                        asyncCache.put(masterKey, val == null ? -1 : val + 1);
                         asyncCache.future().get(timeout);
 
                         for (String key : keys) {
-                            asyncCache.invoke(key, new IncrementCacheEntryProcessor());
-                            asyncCache.future().get(timeout);
+                            asyncCache.invoke(key, new IncrementCacheEntryProcessor(), cacheName());
+                            Object o = asyncCache.future().get(timeout);
+
+                            if (o != null)
+                                badKeys.add(key);
                         }
 
                         break;
                 }
 
-                return true;
+                return null;
             }
         });
+
+        if (!F.isEmpty(badKeys))
+            throw new IgniteConsistencyException("Found unexpected null-value(s) for the following " +
+                "key(s) (look for debug information on server nodes): " + badKeys);
+
+        return true;
     }
 
     /** {@inheritDoc} */
@@ -130,14 +165,52 @@ public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstr
 
     /**
      */
-    private static class IncrementCacheEntryProcessor implements CacheEntryProcessor<String, Long, Void> {
+    private static class IncrementCacheEntryProcessor implements CacheEntryProcessor<String, Long, Object> {
         /** */
         private static final long serialVersionUID = 0;
 
         /** {@inheritDoc} */
-        @Override public Void process(MutableEntry<String, Long> entry,
+        @Override public Object process(MutableEntry<String, Long> entry,
             Object... arguments) throws EntryProcessorException {
-            entry.setValue(entry.getValue() == null ? 0 : entry.getValue() + 1);
+            if (entry.getValue() == null) {
+                String cacheName = (String)arguments[0];
+
+                IgniteKernal kernal = (IgniteKernal)entry.unwrap(Ignite.class);
+
+                Affinity<String> aff = kernal.affinity(cacheName);
+
+                final int partIdx = aff.partition(entry.getKey());
+
+                final Collection<ClusterNode> nodes = aff.mapKeyToPrimaryAndBackups(entry.getKey());
+
+                List<GridDhtLocalPartition> locPartitions = kernal.cachex(cacheName).context().topology().
+                    localPartitions();
+
+                GridDhtLocalPartition part = null;
+
+                for (GridDhtLocalPartition p : locPartitions) {
+                    if (p.id() == partIdx) {
+                        part = p;
+
+                        break;
+                    }
+                }
+
+                kernal.log().warning("Found unexpected null-value, debug info:"
+                        + "\n    entry=" + entry
+                        + "\n    key=" + entry.getKey()
+                        + "\n    locNodeId=" + kernal.cluster().localNode().id()
+                        + "\n    primaryAndBackupsNodes=" + nodes
+                        + "\n    part=" + part
+                        + "\n    partIdx=" + partIdx
+                        + "\n    locParts=" + locPartitions
+                        + "\n    allPartMap=" + kernal.cachex(cacheName).context().topology().partitionMap(true)
+                );
+
+                return new Object(); // non-null value.
+            }
+
+            entry.setValue(entry.getValue() + 1);
 
             return null;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa7a4bce/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
index f278e8a..c4314ed 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
@@ -80,7 +80,7 @@ public class IgniteTransactionalWriteReadBenchmark extends IgniteFailoverAbstrac
                         }
                     }
 
-                    throw new IllegalStateException("Found different values for keys (see above information).");
+                    throw new IgniteConsistencyException("Found different values for keys (see above information).");
                 }
 
                 final Long oldVal = map.get(keys[0]);


[10/50] [abbrv] ignite git commit: Merge branch 'ignite-1282' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1282

Posted by sb...@apache.org.
Merge branch 'ignite-1282' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1282


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

Branch: refs/heads/master
Commit: a28649e0d5aa15af82678a67590f0ee238012284
Parents: 0410f0e f37863a
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 20 15:37:13 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 20 15:37:13 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryReaderExImpl.java   | 65 ++++++++++++--------
 .../portable/PortableClassDescriptor.java       | 16 +++++
 .../platform/cache/PlatformCache.java           |  9 ++-
 .../Cache/CacheTestAsyncWrapper.cs              |  1 -
 .../Cache/Query/CacheQueriesTest.cs             |  2 -
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs | 14 +----
 .../Impl/Cache/CacheEntryFilterHolder.cs        | 15 -----
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  | 15 +----
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |  2 +-
 9 files changed, 62 insertions(+), 77 deletions(-)
----------------------------------------------------------------------



[50/50] [abbrv] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5'

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5'

Conflicts:
	modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java


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

Branch: refs/heads/master
Commit: c88ab6ffe496032d13ed442e64eb09c3e12b481c
Parents: a144b84 1136933
Author: Anton Vinogradov <av...@apache.org>
Authored: Tue Nov 24 12:16:05 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Tue Nov 24 12:16:05 2015 +0300

----------------------------------------------------------------------
 .gitignore                                      |    6 +
 assembly/release-fabric-base.xml                |   94 +
 .../config/binary/example-ignite-binary.xml     |   44 +
 examples/config/example-default.xml             |   76 +
 examples/config/example-ignite.xml              |   56 +-
 examples/schema-import/bin/db-init.sql          |    3 +-
 .../org/apache/ignite/schema/CacheConfig.java   |    7 +-
 .../java/org/apache/ignite/schema/Demo.java     |   20 +-
 .../apache/ignite/examples/binary/Address.java  |   72 +
 .../apache/ignite/examples/binary/Employee.java |   93 +
 .../ignite/examples/binary/EmployeeKey.java     |   90 +
 .../binary/ExampleBinaryNodeStartup.java        |   36 +
 .../ignite/examples/binary/Organization.java    |   93 +
 .../examples/binary/OrganizationType.java       |   32 +
 ...ComputeClientBinaryTaskExecutionExample.java |  153 +
 .../binary/computegrid/ComputeClientTask.java   |  116 +
 .../binary/computegrid/package-info.java        |   21 +
 .../CacheClientBinaryPutGetExample.java         |  230 ++
 .../datagrid/CacheClientBinaryQueryExample.java |  330 ++
 .../examples/binary/datagrid/package-info.java  |   21 +
 .../ignite/examples/binary/package-info.java    |   21 +
 .../CacheClientPortableExampleTest.java         |   46 +
 .../ComputeClientPortableExampleTest.java       |   37 +
 .../testsuites/IgniteExamplesSelfTestSuite.java |    6 +
 .../ignite/codegen/MessageCodeGenerator.java    |   11 +-
 modules/core/pom.xml                            |   21 +
 ...processors.platform.PlatformBootstrapFactory |    2 +
 .../src/main/java/org/apache/ignite/Ignite.java |    7 +
 .../java/org/apache/ignite/IgniteBinary.java    |  357 ++
 .../java/org/apache/ignite/IgniteCache.java     |   41 +
 .../org/apache/ignite/IgniteDataStreamer.java   |   16 +
 .../org/apache/ignite/binary/BinaryField.java   |   46 +
 .../apache/ignite/binary/BinaryIdMapper.java    |   54 +
 .../binary/BinaryInvalidTypeException.java      |   58 +
 .../org/apache/ignite/binary/BinaryObject.java  |  149 +
 .../ignite/binary/BinaryObjectBuilder.java      |  135 +
 .../ignite/binary/BinaryObjectException.java    |   57 +
 .../apache/ignite/binary/BinaryRawReader.java   |  240 ++
 .../apache/ignite/binary/BinaryRawWriter.java   |  225 ++
 .../org/apache/ignite/binary/BinaryReader.java  |  290 ++
 .../apache/ignite/binary/BinarySerializer.java  |   47 +
 .../org/apache/ignite/binary/BinaryType.java    |   68 +
 .../ignite/binary/BinaryTypeConfiguration.java  |  112 +
 .../org/apache/ignite/binary/BinaryWriter.java  |  273 ++
 .../org/apache/ignite/binary/Binarylizable.java |   48 +
 .../org/apache/ignite/binary/package-info.java  |   22 +
 .../ignite/cache/CacheKeyConfiguration.java     |   92 +
 .../apache/ignite/cache/CacheTypeMetadata.java  |   67 +-
 .../org/apache/ignite/cache/QueryEntity.java    |  217 ++
 .../org/apache/ignite/cache/QueryIndex.java     |  227 ++
 .../org/apache/ignite/cache/QueryIndexType.java |   38 +
 .../store/jdbc/CacheAbstractJdbcStore.java      |  638 ++-
 .../store/jdbc/CacheJdbcBlobStoreFactory.java   |   14 +-
 .../cache/store/jdbc/CacheJdbcPojoStore.java    |  444 ++-
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   |  277 +-
 .../ignite/cache/store/jdbc/JdbcType.java       |  255 ++
 .../cache/store/jdbc/JdbcTypeDefaultHasher.java |   43 +
 .../ignite/cache/store/jdbc/JdbcTypeField.java  |  172 +
 .../ignite/cache/store/jdbc/JdbcTypeHasher.java |   34 +
 .../configuration/BinaryConfiguration.java      |  139 +
 .../configuration/CacheConfiguration.java       |  692 +++-
 .../configuration/IgniteConfiguration.java      |   75 +-
 .../configuration/PlatformConfiguration.java    |   25 +
 .../internal/GridEventConsumeHandler.java       |    6 +-
 .../ignite/internal/GridKernalContextImpl.java  |    4 +-
 .../internal/GridMessageListenHandler.java      |    6 +-
 .../org/apache/ignite/internal/IgniteEx.java    |    9 -
 .../apache/ignite/internal/IgniteKernal.java    |   39 +-
 .../ignite/internal/IgniteNodeAttributes.java   |    6 +
 .../internal/client/GridClientCompute.java      |    2 +-
 .../impl/connection/GridClientConnection.java   |    2 +-
 .../GridClientConnectionManagerAdapter.java     |    2 +-
 .../connection/GridClientNioTcpConnection.java  |    6 +-
 .../communication/GridIoMessageFactory.java     |    4 +-
 .../swapspace/GridSwapSpaceManager.java         |   34 -
 .../portable/BinaryCachingMetadataHandler.java  |   70 +
 .../internal/portable/BinaryEnumCache.java      |   69 +
 .../internal/portable/BinaryFieldAccessor.java  |  805 ++++
 .../internal/portable/BinaryFieldImpl.java      |  116 +
 .../portable/BinaryInternalIdMapper.java        |  161 +
 .../internal/portable/BinaryMetadata.java       |  166 +
 .../portable/BinaryMetadataCollector.java       |  277 ++
 .../portable/BinaryMetadataHandler.java         |   44 +
 .../portable/BinaryNoopMetadataHandler.java     |   53 +
 .../internal/portable/BinaryObjectEx.java       |  245 ++
 .../internal/portable/BinaryObjectImpl.java     |  575 +++
 .../portable/BinaryObjectOffheapImpl.java       |  429 ++
 .../internal/portable/BinaryRawReaderEx.java    |   33 +
 .../internal/portable/BinaryRawWriterEx.java    |   60 +
 .../internal/portable/BinaryReaderExImpl.java   | 1997 ++++++++++
 .../internal/portable/BinaryReaderHandles.java  |  108 +
 .../portable/BinaryReaderHandlesHolder.java     |   46 +
 .../portable/BinaryReaderHandlesHolderImpl.java |   44 +
 .../portable/BinaryThreadLocalContext.java      |   69 +
 .../internal/portable/BinaryTypeImpl.java       |   81 +
 .../internal/portable/BinaryWriteMode.java      |  178 +
 .../internal/portable/BinaryWriterExImpl.java   | 1817 +++++++++
 .../internal/portable/BinaryWriterHandles.java  |  101 +
 .../portable/BinaryWriterSchemaHolder.java      |  148 +
 .../portable/GridPortableMarshaller.java        |   78 +-
 .../portable/PortableClassDescriptor.java       | 1011 ++---
 .../internal/portable/PortableContext.java      |  542 +--
 .../portable/PortableMetaDataCollector.java     |  258 --
 .../portable/PortableMetaDataHandler.java       |   44 -
 .../internal/portable/PortableMetaDataImpl.java |  150 -
 .../internal/portable/PortableObjectEx.java     |  214 -
 .../internal/portable/PortableObjectImpl.java   |  391 --
 .../portable/PortableObjectOffheapImpl.java     |  243 --
 .../portable/PortablePositionReadable.java      |   47 +
 .../internal/portable/PortablePrimitives.java   |  779 +---
 .../internal/portable/PortableRawReaderEx.java  |   33 -
 .../internal/portable/PortableRawWriterEx.java  |   60 -
 .../portable/PortableReaderContext.java         |   82 -
 .../internal/portable/PortableReaderExImpl.java | 3157 ---------------
 .../internal/portable/PortableSchema.java       |  466 +++
 .../portable/PortableSchemaRegistry.java        |  172 +
 .../PortableThreadLocalMemoryAllocator.java     |  162 -
 .../ignite/internal/portable/PortableUtils.java | 1504 ++++++-
 .../internal/portable/PortableWriterExImpl.java | 1854 ---------
 .../internal/portable/api/IgnitePortables.java  |  362 --
 .../internal/portable/api/PortableBuilder.java  |  136 -
 .../portable/api/PortableException.java         |   57 -
 .../internal/portable/api/PortableIdMapper.java |   54 -
 .../api/PortableInvalidClassException.java      |   58 -
 .../portable/api/PortableMarshalAware.java      |   48 -
 .../portable/api/PortableMarshaller.java        |  357 --
 .../internal/portable/api/PortableMetadata.java |   60 -
 .../internal/portable/api/PortableObject.java   |  152 -
 .../portable/api/PortableProtocolVersion.java   |   41 -
 .../portable/api/PortableRawReader.java         |  234 --
 .../portable/api/PortableRawWriter.java         |  219 --
 .../internal/portable/api/PortableReader.java   |  284 --
 .../portable/api/PortableSerializer.java        |   47 -
 .../portable/api/PortableTypeConfiguration.java |  195 -
 .../internal/portable/api/PortableWriter.java   |  266 --
 .../builder/BinaryObjectBuilderImpl.java        |  577 +++
 .../portable/builder/PortableBuilderEnum.java   |    8 +-
 .../portable/builder/PortableBuilderImpl.java   |  533 ---
 .../portable/builder/PortableBuilderReader.java |  221 +-
 .../PortableBuilderSerializationAware.java      |    2 +-
 .../builder/PortableBuilderSerializer.java      |   36 +-
 .../builder/PortableEnumArrayLazyValue.java     |   12 +-
 .../portable/builder/PortableLazyArrayList.java |    8 +-
 .../builder/PortableLazyLinkedList.java         |    8 +-
 .../portable/builder/PortableLazyMap.java       |    8 +-
 .../portable/builder/PortableLazyMapEntry.java  |    2 +-
 .../portable/builder/PortableLazySet.java       |    8 +-
 .../builder/PortableModifiableLazyValue.java    |    2 +-
 .../builder/PortableObjectArrayLazyValue.java   |    8 +-
 .../builder/PortablePlainLazyValue.java         |    2 +-
 .../builder/PortablePlainPortableObject.java    |   22 +-
 .../portable/builder/PortableValueWithType.java |   13 +-
 .../streams/PortableAbstractInputStream.java    |   48 +-
 .../streams/PortableAbstractOutputStream.java   |   44 +-
 .../streams/PortableHeapInputStream.java        |   34 +-
 .../streams/PortableHeapOutputStream.java       |  106 +-
 .../portable/streams/PortableInputStream.java   |   12 +-
 .../streams/PortableMemoryAllocator.java        |   67 +-
 .../streams/PortableMemoryAllocatorChunk.java   |  117 +
 .../streams/PortableOffheapInputStream.java     |   17 +-
 .../streams/PortableOffheapOutputStream.java    |   59 +-
 .../portable/streams/PortableOutputStream.java  |   94 +
 .../streams/PortableSimpleMemoryAllocator.java  |   66 -
 .../affinity/GridAffinityAssignmentCache.java   |    3 +-
 .../affinity/GridAffinityProcessor.java         |    5 +-
 .../processors/cache/CacheInvokeEntry.java      |   11 +-
 .../processors/cache/CacheLazyEntry.java        |   23 +-
 .../internal/processors/cache/CacheObject.java  |   11 +-
 .../processors/cache/CacheObjectAdapter.java    |    2 +-
 .../cache/CacheObjectByteArrayImpl.java         |    7 +-
 .../processors/cache/CacheObjectContext.java    |  128 +-
 .../processors/cache/CacheObjectImpl.java       |    5 +
 .../processors/cache/CacheOperationContext.java |   22 +-
 .../processors/cache/GridCacheAdapter.java      |   98 +-
 .../cache/GridCacheConcurrentMap.java           |   10 +-
 .../processors/cache/GridCacheContext.java      |   14 +-
 .../processors/cache/GridCacheEntryEx.java      |   15 +-
 .../processors/cache/GridCacheEventManager.java |   31 +-
 .../cache/GridCacheEvictionManager.java         |    5 +-
 .../processors/cache/GridCacheMapEntry.java     |  160 +-
 .../processors/cache/GridCacheMvccManager.java  |   29 +-
 .../processors/cache/GridCacheProcessor.java    |    7 +
 .../processors/cache/GridCacheProxyImpl.java    |    4 +-
 .../processors/cache/GridCacheReturn.java       |   27 +-
 .../processors/cache/GridCacheSwapManager.java  |   37 +-
 .../processors/cache/GridCacheUtils.java        |    3 +
 .../processors/cache/IgniteCacheProxy.java      |   11 +-
 .../processors/cache/IgniteInternalCache.java   |    6 +-
 .../processors/cache/KeyCacheObjectImpl.java    |    5 +
 .../CacheDataStructuresManager.java             |    4 +-
 .../GridDistributedCacheAdapter.java            |   40 +-
 .../distributed/GridDistributedCacheEntry.java  |    9 +-
 .../distributed/GridDistributedLockRequest.java |   17 +
 .../GridDistributedTxPrepareRequest.java        |    3 +-
 .../GridDistributedTxRemoteAdapter.java         |    3 +
 .../distributed/dht/GridDhtCacheEntry.java      |    5 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   24 +-
 .../distributed/dht/GridDhtLocalPartition.java  |    3 +-
 .../distributed/dht/GridDhtLockFuture.java      |   87 +-
 .../distributed/dht/GridDhtLockRequest.java     |    3 +
 .../dht/GridDhtTransactionalCacheAdapter.java   |   21 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   17 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   15 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   12 +-
 .../dht/GridPartitionedGetFuture.java           |    6 +-
 .../dht/GridPartitionedSingleGetFuture.java     |   14 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   74 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |    6 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |   42 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   15 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |   68 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |    5 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   31 +-
 .../colocated/GridDhtColocatedLockFuture.java   |  605 +--
 .../dht/preloader/GridDhtForceKeysFuture.java   |    2 +-
 .../dht/preloader/GridDhtPartitionDemander.java |    2 +-
 .../distributed/near/GridNearAtomicCache.java   |    4 +
 .../distributed/near/GridNearCacheEntry.java    |   17 +-
 .../distributed/near/GridNearGetFuture.java     |   55 +-
 .../distributed/near/GridNearLockFuture.java    |  747 ++--
 .../distributed/near/GridNearLockMapping.java   |    6 +-
 .../distributed/near/GridNearLockRequest.java   |    2 +
 .../near/GridNearTransactionalCache.java        |    8 +-
 .../cache/distributed/near/GridNearTxLocal.java |    9 +-
 .../distributed/near/GridNearTxRemote.java      |   12 +-
 .../cache/local/GridLocalCacheEntry.java        |   16 +-
 .../cache/local/GridLocalLockFuture.java        |    3 +-
 .../local/atomic/GridLocalAtomicCache.java      |  108 +-
 .../CacheDefaultPortableAffinityKeyMapper.java  |    8 +-
 .../portable/CacheObjectBinaryProcessor.java    |   97 +
 .../CacheObjectBinaryProcessorImpl.java         |  848 ++++
 .../portable/CacheObjectPortableContext.java    |  133 -
 .../portable/CacheObjectPortableProcessor.java  |  103 -
 .../CacheObjectPortableProcessorImpl.java       | 1035 -----
 .../cache/portable/IgniteBinaryImpl.java        |  165 +
 .../cache/portable/IgnitePortablesImpl.java     |  177 -
 .../cache/portable/PortableMetaDataKey.java     |   82 -
 .../cache/portable/PortableMetadataKey.java     |   82 +
 .../cache/query/GridCacheQueryManager.java      |  298 +-
 .../cache/query/GridCacheQueryRequest.java      |    4 +-
 .../continuous/CacheContinuousQueryEvent.java   |   10 +-
 .../continuous/CacheContinuousQueryHandler.java |    7 +-
 .../cache/store/CacheOsStoreManager.java        |    4 +-
 .../store/GridCacheStoreManagerAdapter.java     |   47 +-
 .../transactions/IgniteTransactionsImpl.java    |   10 +-
 .../cache/transactions/IgniteTxAdapter.java     |    5 +-
 .../cache/transactions/IgniteTxEntry.java       |   57 +-
 .../transactions/IgniteTxLocalAdapter.java      |  145 +-
 .../cache/transactions/IgniteTxLocalEx.java     |    1 +
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |    6 +
 .../IgniteCacheObjectProcessorImpl.java         |    9 +
 .../processors/cacheobject/NoOpBinary.java      |   75 +
 .../continuous/GridContinuousHandler.java       |    6 +-
 .../continuous/GridContinuousProcessor.java     |   50 +-
 .../datastreamer/DataStreamProcessor.java       |    1 +
 .../datastreamer/DataStreamerEntry.java         |    6 +-
 .../datastreamer/DataStreamerImpl.java          |   16 +-
 .../datastreamer/DataStreamerRequest.java       |   58 +-
 .../datastreamer/DataStreamerUpdateJob.java     |   10 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   26 +-
 .../processors/hadoop/HadoopJobProperty.java    |    2 +-
 .../platform/PlatformAbstractBootstrap.java     |   48 +
 .../PlatformAbstractConfigurationClosure.java   |   61 +
 .../platform/PlatformAbstractPredicate.java     |   67 +
 .../platform/PlatformAbstractTarget.java        |  320 ++
 .../processors/platform/PlatformBootstrap.java  |   35 +
 .../platform/PlatformBootstrapFactory.java      |   37 +
 .../platform/PlatformConfiguration.java         |   25 -
 .../platform/PlatformConfigurationEx.java       |   48 +
 .../processors/platform/PlatformContext.java    |   26 +-
 .../platform/PlatformContextImpl.java           |  618 +++
 .../platform/PlatformExtendedException.java     |    4 +-
 .../processors/platform/PlatformIgnition.java   |  189 +
 .../platform/PlatformNoopProcessor.java         |    6 +
 .../processors/platform/PlatformProcessor.java  |   11 +
 .../platform/PlatformProcessorImpl.java         |  374 ++
 .../platform/cache/PlatformCache.java           | 1090 ++++++
 .../cache/PlatformCacheEntryFilterImpl.java     |  106 +
 .../cache/PlatformCacheEntryProcessorImpl.java  |  220 ++
 .../platform/cache/PlatformCacheIterator.java   |   72 +
 .../PlatformCachePartialUpdateException.java    |   59 +
 .../cache/affinity/PlatformAffinity.java        |  297 ++
 .../query/PlatformAbstractQueryCursor.java      |  192 +
 .../query/PlatformContinuousQueryImpl.java      |  235 ++
 .../PlatformContinuousQueryRemoteFilter.java    |  188 +
 .../cache/query/PlatformFieldsQueryCursor.java  |   49 +
 .../cache/query/PlatformQueryCursor.java        |   45 +
 .../cache/store/PlatformCacheStoreCallback.java |   61 +
 .../platform/cluster/PlatformClusterGroup.java  |  335 ++
 .../cluster/PlatformClusterNodeFilterImpl.java  |   78 +
 .../platform/compute/PlatformAbstractJob.java   |  156 +
 .../platform/compute/PlatformAbstractTask.java  |  206 +
 .../PlatformBalancingMultiClosureTask.java      |   83 +
 ...tformBalancingSingleClosureAffinityTask.java |   88 +
 .../PlatformBalancingSingleClosureTask.java     |   81 +
 .../PlatformBroadcastingMultiClosureTask.java   |   87 +
 .../PlatformBroadcastingSingleClosureTask.java  |   84 +
 .../platform/compute/PlatformClosureJob.java    |  104 +
 .../platform/compute/PlatformCompute.java       |  332 ++
 .../platform/compute/PlatformFullJob.java       |  220 ++
 .../platform/compute/PlatformFullTask.java      |  192 +
 .../platform/cpp/PlatformCppBootstrap.java      |   31 +
 .../cpp/PlatformCppBootstrapFactory.java        |   39 +
 .../cpp/PlatformCppConfigurationClosure.java    |  114 +
 .../cpp/PlatformCppConfigurationEx.java         |   82 +
 .../datastreamer/PlatformDataStreamer.java      |  227 ++
 .../PlatformStreamReceiverImpl.java             |  119 +
 .../datastructures/PlatformAtomicLong.java      |  149 +
 .../dotnet/PlatformDotNetBootstrap.java         |   31 +
 .../dotnet/PlatformDotNetBootstrapFactory.java  |   39 +
 .../dotnet/PlatformDotNetCacheStore.java        |  484 +++
 .../dotnet/PlatformDotNetConfiguration.java     |  119 -
 .../PlatformDotNetConfigurationClosure.java     |  258 ++
 .../dotnet/PlatformDotNetConfigurationEx.java   |   91 +
 .../PlatformDotNetPortableConfiguration.java    |  228 --
 ...PlatformDotNetPortableTypeConfiguration.java |  248 --
 .../platform/dotnet/PlatformDotNetService.java  |   27 +
 .../dotnet/PlatformDotNetServiceImpl.java       |   47 +
 .../events/PlatformEventFilterListenerImpl.java |  186 +
 .../platform/events/PlatformEvents.java         |  396 ++
 .../lifecycle/PlatformLifecycleBean.java        |   75 +
 .../platform/memory/PlatformAbstractMemory.java |  121 +
 .../PlatformBigEndianInputStreamImpl.java       |  136 +
 .../PlatformBigEndianOutputStreamImpl.java      |  196 +
 .../platform/memory/PlatformExternalMemory.java |   55 +
 .../memory/PlatformInputStreamImpl.java         |  351 ++
 .../memory/PlatformMemoryManagerImpl.java       |   85 +
 .../platform/memory/PlatformMemoryPool.java     |  140 +
 .../platform/memory/PlatformMemoryUtils.java    |  467 +++
 .../memory/PlatformOutputStreamImpl.java        |  342 ++
 .../platform/memory/PlatformPooledMemory.java   |   64 +
 .../platform/memory/PlatformUnpooledMemory.java |   51 +
 .../messaging/PlatformMessageFilterImpl.java    |  110 +
 .../messaging/PlatformMessageLocalFilter.java   |  102 +
 .../platform/messaging/PlatformMessaging.java   |  166 +
 .../services/PlatformAbstractService.java       |  230 ++
 .../platform/services/PlatformServices.java     |  275 ++
 .../transactions/PlatformTransactions.java      |  259 ++
 .../platform/utils/PlatformFutureUtils.java     |  397 ++
 .../platform/utils/PlatformReaderBiClosure.java |   34 +
 .../platform/utils/PlatformReaderClosure.java   |   34 +
 .../platform/utils/PlatformUtils.java           |  809 ++++
 .../platform/utils/PlatformWriterBiClosure.java |   34 +
 .../platform/utils/PlatformWriterClosure.java   |   33 +
 .../processors/query/GridQueryIndexing.java     |   18 +-
 .../processors/query/GridQueryProcessor.java    |  680 ++--
 .../client/message/GridClientTaskRequest.java   |    6 +-
 .../ignite/internal/util/GridEnumCache.java     |   56 -
 .../ignite/internal/util/IgniteUtils.java       |   34 +-
 .../ignite/internal/util/nio/GridNioServer.java |    4 +-
 .../ignite/internal/visor/cache/VisorCache.java |    4 +-
 .../marshaller/portable/BinaryMarshaller.java   |  146 +
 .../marshaller/portable/package-info.java       |   22 +
 .../platform/cpp/PlatformCppConfiguration.java  |   47 +
 .../ignite/platform/cpp/package-info.java       |   22 +
 .../PlatformDotNetBinaryConfiguration.java      |  170 +
 .../PlatformDotNetBinaryTypeConfiguration.java  |  171 +
 .../dotnet/PlatformDotNetCacheStoreFactory.java |  117 +
 .../dotnet/PlatformDotNetConfiguration.java     |   97 +
 .../dotnet/PlatformDotNetLifecycleBean.java     |   86 +
 .../ignite/platform/dotnet/package-info.java    |   22 +
 .../apache/ignite/platform/package-info.java    |   22 +
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   51 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |    2 +
 .../apache/ignite/spi/swapspace/SwapKey.java    |    9 +-
 .../resources/META-INF/classnames.properties    |  268 +-
 .../CacheJdbcPojoStoreAbstractSelfTest.java     |  395 ++
 ...dbcPojoStoreOptimizedMarshallerSelfTest.java |   31 +
 ...JdbcPojoStorePortableMarshallerSelfTest.java |   85 +
 .../store/jdbc/CacheJdbcPojoStoreTest.java      |  200 +-
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |    2 +-
 .../portable/BinaryFieldsAbstractSelfTest.java  |  719 ++++
 .../portable/BinaryFieldsHeapSelfTest.java      |   32 +
 .../portable/BinaryFieldsOffheapSelfTest.java   |   61 +
 .../BinaryFooterOffsetsAbstractSelfTest.java    |  206 +
 .../BinaryFooterOffsetsHeapSelfTest.java        |   32 +
 .../BinaryFooterOffsetsOffheapSelfTest.java     |   61 +
 .../portable/BinaryMarshallerSelfTest.java      | 3671 ++++++++++++++++++
 .../BinaryObjectBuilderAdditionalSelfTest.java  | 1292 ++++++
 .../portable/BinaryObjectBuilderSelfTest.java   | 1069 +++++
 .../GridPortableAffinityKeySelfTest.java        |  225 ++
 ...idPortableMarshallerCtxDisabledSelfTest.java |  248 ++
 .../portable/GridPortableMetaDataSelfTest.java  |  372 ++
 .../portable/GridPortableWildcardsSelfTest.java |  465 +++
 .../portable/TestCachingMetadataHandler.java    |   45 +
 .../GridBinaryMarshalerAwareTestClass.java      |   67 +
 .../mutabletest/GridPortableTestClasses.java    |  443 +++
 .../portable/mutabletest/package-info.java      |   22 +
 .../BinaryFieldsHeapNonCompactSelfTest.java     |   30 +
 .../BinaryFieldsOffheapNonCompactSelfTest.java  |   30 +
 ...naryFooterOffsetsHeapNonCompactSelfTest.java |   30 +
 ...yFooterOffsetsOffheapNonCompactSelfTest.java |   30 +
 .../BinaryMarshallerNonCompactSelfTest.java     |   30 +
 ...jectBuilderAdditionalNonCompactSelfTest.java |   30 +
 .../BinaryObjectBuilderNonCompactSelfTest.java  |   30 +
 .../ignite/internal/portable/package-info.java  |   22 +
 .../portable/test/GridPortableTestClass1.java   |   28 +
 .../portable/test/GridPortableTestClass2.java   |   24 +
 .../internal/portable/test/package-info.java    |   22 +
 .../test/subpackage/GridPortableTestClass3.java |   24 +
 .../portable/test/subpackage/package-info.java  |   22 +
 .../cache/CacheNearReaderUpdateTest.java        |   62 +-
 .../cache/GridCacheAbstractSelfTest.java        |    9 +-
 ...heOffHeapTieredEvictionAbstractSelfTest.java |    2 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   13 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |   30 +-
 ...IgniteCacheAbstractExecutionContextTest.java |    5 +
 ...chePartitionedAtomicSetFailoverSelfTest.java |    5 +
 ...tractDistributedByteArrayValuesSelfTest.java |    4 +
 ...naryObjectsAbstractDataStreamerSelfTest.java |  192 +
 ...aryObjectsAbstractMultiThreadedSelfTest.java |  233 ++
 .../GridCacheBinaryObjectsAbstractSelfTest.java |  981 +++++
 ...ntNodeBinaryObjectMetadataMultinodeTest.java |  295 ++
 ...CacheClientNodeBinaryObjectMetadataTest.java |  221 ++
 .../GridCachePortableStoreAbstractSelfTest.java |  300 ++
 .../GridCachePortableStoreObjectsSelfTest.java  |   55 +
 ...GridCachePortableStorePortablesSelfTest.java |   66 +
 ...ridPortableCacheEntryMemorySizeSelfTest.java |   48 +
 ...leDuplicateIndexObjectsAbstractSelfTest.java |  161 +
 .../DataStreamProcessorPortableSelfTest.java    |   71 +
 .../GridDataStreamerImplSelfTest.java           |  345 ++
 ...ridCacheAffinityRoutingPortableSelfTest.java |   54 +
 ...lyPortableDataStreamerMultiNodeSelfTest.java |   29 +
 ...rtableDataStreamerMultithreadedSelfTest.java |   47 +
 ...artitionedOnlyPortableMultiNodeSelfTest.java |   28 +
 ...tionedOnlyPortableMultithreadedSelfTest.java |   47 +
 ...AtomicNearDisabledOffheapTieredSelfTest.java |   29 +
 ...BinaryObjectsAtomicNearDisabledSelfTest.java |   51 +
 ...inaryObjectsAtomicOffheapTieredSelfTest.java |   29 +
 .../GridCacheBinaryObjectsAtomicSelfTest.java   |   51 +
 ...tionedNearDisabledOffheapTieredSelfTest.java |   30 +
 ...yObjectsPartitionedNearDisabledSelfTest.java |   51 +
 ...ObjectsPartitionedOffheapTieredSelfTest.java |   30 +
 ...idCacheBinaryObjectsPartitionedSelfTest.java |   51 +
 .../GridCacheMemoryModePortableSelfTest.java    |   36 +
 ...acheOffHeapTieredAtomicPortableSelfTest.java |   48 +
 ...eapTieredEvictionAtomicPortableSelfTest.java |   96 +
 ...heOffHeapTieredEvictionPortableSelfTest.java |   96 +
 .../GridCacheOffHeapTieredPortableSelfTest.java |   48 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 +
 ...xObjectPartitionedTransactionalSelfTest.java |   41 +
 ...sNearPartitionedByteArrayValuesSelfTest.java |   41 +
 ...sPartitionedOnlyByteArrayValuesSelfTest.java |   42 +
 ...ridCacheBinaryObjectsReplicatedSelfTest.java |   51 +
 ...idCacheBinaryObjectsAtomicLocalSelfTest.java |   32 +
 ...BinaryObjectsLocalOffheapTieredSelfTest.java |   29 +
 .../GridCacheBinaryObjectsLocalSelfTest.java    |   51 +
 ...ContinuousQueryFailoverAbstractSelfTest.java |    2 +-
 .../CacheVersionedEntryAbstractTest.java        |    2 +-
 .../continuous/GridEventConsumeSelfTest.java    |  113 +-
 .../DataStreamProcessorSelfTest.java            |    8 +
 .../loadtests/hashmap/GridHashMapLoadTest.java  |    3 +-
 .../platform/PlatformComputeBinarizable.java    |   42 +
 .../PlatformComputeBinarizableArgTask.java      |  119 +
 .../platform/PlatformComputeBroadcastTask.java  |   73 +
 .../platform/PlatformComputeDecimalTask.java    |  106 +
 .../platform/PlatformComputeEchoTask.java       |  206 +
 .../ignite/platform/PlatformComputeEnum.java    |   28 +
 .../PlatformComputeJavaBinarizable.java         |   39 +
 .../platform/PlatformEventsWriteEventTask.java  |  144 +
 .../ignite/platform/PlatformMaxMemoryTask.java  |   57 +
 .../ignite/platform/PlatformMinMemoryTask.java  |   57 +
 .../lifecycle/PlatformJavaLifecycleBean.java    |   47 +
 .../lifecycle/PlatformJavaLifecycleTask.java    |   65 +
 .../file/GridFileSwapSpaceSpiSelfTest.java      |   11 +-
 .../testframework/junits/GridAbstractTest.java  |    4 +-
 .../ignite/testframework/junits/IgniteMock.java |    6 +
 .../multijvm/IgniteCacheProcessProxy.java       |    7 +-
 .../junits/multijvm/IgniteProcessProxy.java     |    4 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    6 +-
 .../IgnitePortableCacheFullApiTestSuite.java    |   37 +
 .../IgnitePortableCacheTestSuite.java           |  103 +
 .../IgnitePortableObjectsTestSuite.java         |  110 +
 .../ignite/portable/test1/1.1/test1-1.1.jar     |  Bin 0 -> 2548 bytes
 .../ignite/portable/test1/1.1/test1-1.1.pom     |    9 +
 .../portable/test1/maven-metadata-local.xml     |   12 +
 .../ignite/portable/test2/1.1/test2-1.1.jar     |  Bin 0 -> 1361 bytes
 .../ignite/portable/test2/1.1/test2-1.1.pom     |    9 +
 .../portable/test2/maven-metadata-local.xml     |   12 +
 .../HadoopDefaultMapReducePlannerSelfTest.java  |    6 -
 .../processors/query/h2/IgniteH2Indexing.java   |   25 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    |    8 +-
 .../query/h2/opt/GridLuceneIndex.java           |    4 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |    3 +-
 ...CacheOffheapTieredMultithreadedSelfTest.java |   25 +-
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |   22 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   22 +-
 .../query/IgniteSqlSplitterSelfTest.java        |   54 +
 .../h2/GridIndexingSpiAbstractSelfTest.java     |    7 +-
 .../IgnitePortableCacheQueryTestSuite.java      |  117 +
 modules/platform/licenses/apache-2.0.txt        |  202 -
 modules/platform/pom.xml                        |   80 -
 modules/platform/src/main/cpp/README.txt        |  103 -
 .../platform/src/main/cpp/common/Makefile.am    |   45 -
 .../platform/src/main/cpp/common/configure.ac   |   62 -
 .../src/main/cpp/common/ignite-common.pc.in     |    9 -
 .../src/main/cpp/common/include/Makefile.am     |   22 -
 .../common/include/ignite/common/concurrent.h   |  210 -
 .../cpp/common/include/ignite/common/exports.h  |  145 -
 .../cpp/common/include/ignite/common/java.h     |  652 ----
 .../cpp/common/os/linux/include/Makefile.am     |   21 -
 .../os/linux/include/ignite/common/common.h     |   81 -
 .../linux/include/ignite/common/concurrent_os.h |  394 --
 .../src/main/cpp/common/os/linux/src/common.cpp |   59 -
 .../cpp/common/os/linux/src/concurrent_os.cpp   |  175 -
 .../os/win/include/ignite/common/common.h       |   56 -
 .../win/include/ignite/common/concurrent_os.h   |  406 --
 .../src/main/cpp/common/os/win/src/common.cpp   |   65 -
 .../cpp/common/os/win/src/concurrent_os.cpp     |  151 -
 .../src/main/cpp/common/project/README.TXT      |    1 -
 .../src/main/cpp/common/project/vs/README.TXT   |    1 -
 .../main/cpp/common/project/vs/common.vcxproj   |  202 -
 .../common/project/vs/common.vcxproj.filters    |   54 -
 .../src/main/cpp/common/project/vs/module.def   |   99 -
 .../src/main/cpp/common/project/vs/targetver.h  |   25 -
 .../src/main/cpp/common/src/concurrent.cpp      |   94 -
 .../src/main/cpp/common/src/exports.cpp         |  413 --
 .../platform/src/main/cpp/common/src/java.cpp   | 2205 -----------
 .../platform/src/main/cpp/core-test/Makefile.am |   49 -
 .../main/cpp/core-test/config/cache-query.xml   |   91 -
 .../main/cpp/core-test/config/cache-test.xml    |  129 -
 .../src/main/cpp/core-test/configure.ac         |   62 -
 .../src/main/cpp/core-test/include/Makefile.am  |   22 -
 .../include/ignite/portable_test_defs.h         |  320 --
 .../include/ignite/portable_test_utils.h        |  516 ---
 .../cpp/core-test/include/teamcity_messages.h   |   55 -
 .../src/main/cpp/core-test/project/README.TXT   |    1 -
 .../main/cpp/core-test/project/vs/README.TXT    |    1 -
 .../cpp/core-test/project/vs/core-test.vcxproj  |  174 -
 .../project/vs/core-test.vcxproj.filters        |   68 -
 .../main/cpp/core-test/src/cache_query_test.cpp |  656 ----
 .../src/main/cpp/core-test/src/cache_test.cpp   |  486 ---
 .../main/cpp/core-test/src/concurrent_test.cpp  |  186 -
 .../cpp/core-test/src/handle_registry_test.cpp  |  176 -
 .../main/cpp/core-test/src/ignition_test.cpp    |  102 -
 .../src/portable_reader_writer_raw_test.cpp     | 1532 --------
 .../src/portable_reader_writer_test.cpp         | 1951 ----------
 .../cpp/core-test/src/portable_session_test.cpp |  257 --
 .../cpp/core-test/src/portable_test_defs.cpp    |   65 -
 .../main/cpp/core-test/src/teamcity_boost.cpp   |  159 -
 .../cpp/core-test/src/teamcity_messages.cpp     |  150 -
 modules/platform/src/main/cpp/core/Makefile.am  |   66 -
 modules/platform/src/main/cpp/core/configure.ac |   62 -
 modules/platform/src/main/cpp/core/ignite.pc.in |    9 -
 .../src/main/cpp/core/include/Makefile.am       |   61 -
 .../main/cpp/core/include/ignite/cache/cache.h  | 1153 ------
 .../cpp/core/include/ignite/cache/cache_entry.h |  118 -
 .../core/include/ignite/cache/cache_peek_mode.h |   71 -
 .../cpp/core/include/ignite/cache/query/query.h |   27 -
 .../include/ignite/cache/query/query_argument.h |  125 -
 .../include/ignite/cache/query/query_cursor.h   |  191 -
 .../include/ignite/cache/query/query_scan.h     |  151 -
 .../core/include/ignite/cache/query/query_sql.h |  253 --
 .../include/ignite/cache/query/query_text.h     |  159 -
 .../src/main/cpp/core/include/ignite/guid.h     |  112 -
 .../src/main/cpp/core/include/ignite/ignite.h   |  154 -
 .../core/include/ignite/ignite_configuration.h  |   92 -
 .../main/cpp/core/include/ignite/ignite_error.h |  260 --
 .../src/main/cpp/core/include/ignite/ignition.h |  195 -
 .../core/include/ignite/impl/cache/cache_impl.h |  418 --
 .../ignite/impl/cache/query/query_impl.h        |  115 -
 .../core/include/ignite/impl/handle_registry.h  |  202 -
 .../include/ignite/impl/ignite_environment.h    |  130 -
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  146 -
 .../core/include/ignite/impl/interop/interop.h  |   25 -
 .../ignite/impl/interop/interop_input_stream.h  |  234 --
 .../ignite/impl/interop/interop_memory.h        |  280 --
 .../ignite/impl/interop/interop_output_stream.h |  234 --
 .../cpp/core/include/ignite/impl/operations.h   |  452 ---
 .../ignite/impl/portable/portable_common.h      |  146 -
 .../ignite/impl/portable/portable_id_resolver.h |  106 -
 .../impl/portable/portable_metadata_handler.h   |  102 -
 .../impl/portable/portable_metadata_manager.h   |  120 -
 .../impl/portable/portable_metadata_snapshot.h  |  122 -
 .../impl/portable/portable_metadata_updater.h   |   53 -
 .../portable/portable_metadata_updater_impl.h   |   65 -
 .../ignite/impl/portable/portable_reader_impl.h | 1130 ------
 .../ignite/impl/portable/portable_utils.h       |  344 --
 .../ignite/impl/portable/portable_writer_impl.h |  859 ----
 .../cpp/core/include/ignite/portable/portable.h |   29 -
 .../include/ignite/portable/portable_consts.h   |  106 -
 .../ignite/portable/portable_containers.h       |  525 ---
 .../ignite/portable/portable_raw_reader.h       |  324 --
 .../ignite/portable/portable_raw_writer.h       |  300 --
 .../include/ignite/portable/portable_reader.h   |  355 --
 .../include/ignite/portable/portable_type.h     |  293 --
 .../include/ignite/portable/portable_writer.h   |  335 --
 .../main/cpp/core/os/linux/include/Makefile.am  |   20 -
 .../core/os/linux/include/ignite/impl/utils.h   |  155 -
 .../main/cpp/core/os/linux/src/impl/utils.cpp   |  439 ---
 .../cpp/core/os/win/include/ignite/impl/utils.h |  155 -
 .../src/main/cpp/core/os/win/src/impl/utils.cpp |  453 ---
 .../src/main/cpp/core/project/README.TXT        |    1 -
 .../src/main/cpp/core/project/vs/README.TXT     |    1 -
 .../src/main/cpp/core/project/vs/core.vcxproj   |  272 --
 .../cpp/core/project/vs/core.vcxproj.filters    |  246 --
 modules/platform/src/main/cpp/core/src/guid.cpp |   65 -
 .../platform/src/main/cpp/core/src/ignite.cpp   |   43 -
 .../src/main/cpp/core/src/ignite_error.cpp      |  222 --
 .../platform/src/main/cpp/core/src/ignition.cpp |  468 ---
 .../main/cpp/core/src/impl/cache/cache_impl.cpp |  388 --
 .../core/src/impl/cache/query/query_impl.cpp    |  193 -
 .../main/cpp/core/src/impl/handle_registry.cpp  |  234 --
 .../cpp/core/src/impl/ignite_environment.cpp    |  167 -
 .../src/main/cpp/core/src/impl/ignite_impl.cpp  |   42 -
 .../src/impl/interop/interop_input_stream.cpp   |  215 -
 .../core/src/impl/interop/interop_memory.cpp    |  182 -
 .../src/impl/interop/interop_output_stream.cpp  |  215 -
 .../impl/portable/portable_metadata_handler.cpp |   78 -
 .../impl/portable/portable_metadata_manager.cpp |  201 -
 .../portable/portable_metadata_snapshot.cpp     |   70 -
 .../impl/portable/portable_metadata_updater.cpp |   32 -
 .../portable/portable_metadata_updater_impl.cpp |   94 -
 .../src/impl/portable/portable_reader_impl.cpp  |  683 ----
 .../core/src/impl/portable/portable_utils.cpp   |  214 -
 .../src/impl/portable/portable_writer_impl.cpp  |  600 ---
 .../core/src/portable/portable_containers.cpp   |   76 -
 .../core/src/portable/portable_raw_reader.cpp   |  135 -
 .../core/src/portable/portable_raw_writer.cpp   |  147 -
 .../cpp/core/src/portable/portable_reader.cpp   |  142 -
 .../cpp/core/src/portable/portable_type.cpp     |   51 -
 .../cpp/core/src/portable/portable_writer.cpp   |  154 -
 .../platform/src/main/cpp/project/vs/ignite.sln |   48 -
 .../Apache.Ignite.Core.csproj                   |  376 --
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |   67 -
 .../Cache/CacheEntryProcessorException.cs       |   79 -
 .../Apache.Ignite.Core/Cache/CacheException.cs  |   68 -
 .../Cache/CachePartialUpdateException.cs        |  119 -
 .../Apache.Ignite.Core/Cache/CachePeekMode.cs   |   68 -
 .../Cache/Event/CacheEntryEventType.cs          |   41 -
 .../Cache/Event/ICacheEntryEvent.cs             |   40 -
 .../Cache/Event/ICacheEntryEventFilter.cs       |   31 -
 .../Cache/Event/ICacheEntryEventListener.cs     |   33 -
 .../Cache/Expiry/ExpiryPolicy.cs                |   89 -
 .../Cache/Expiry/IExpiryPolicy.cs               |   59 -
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  542 ---
 .../Apache.Ignite.Core/Cache/ICacheAffinity.cs  |  161 -
 .../Apache.Ignite.Core/Cache/ICacheEntry.cs     |   37 -
 .../Cache/ICacheEntryFilter.cs                  |   34 -
 .../Cache/ICacheEntryProcessor.cs               |   45 -
 .../Cache/ICacheEntryProcessorResult.cs         |   40 -
 .../Apache.Ignite.Core/Cache/ICacheLock.cs      |   58 -
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |  486 ---
 .../Cache/IMutableCacheEntry.cs                 |   47 -
 .../Cache/Query/Continuous/ContinuousQuery.cs   |  170 -
 .../Query/Continuous/IContinuousQueryHandle.cs  |   51 -
 .../Cache/Query/IQueryCursor.cs                 |   40 -
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   82 -
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |   77 -
 .../Cache/Query/SqlFieldsQuery.cs               |   81 -
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |  119 -
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |  104 -
 .../Store/CacheParallelLoadStoreAdapter.cs      |  205 -
 .../Cache/Store/CacheStoreAdapter.cs            |  146 -
 .../Cache/Store/CacheStoreException.cs          |   66 -
 .../Cache/Store/ICacheStore.cs                  |  184 -
 .../Cache/Store/ICacheStoreSession.cs           |   42 -
 .../Cluster/ClusterGroupEmptyException.cs       |   70 -
 .../Cluster/ClusterTopologyException.cs         |   69 -
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |   80 -
 .../Apache.Ignite.Core/Cluster/IClusterGroup.cs |  229 --
 .../Cluster/IClusterMetrics.cs                  |  515 ---
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |  138 -
 .../Cluster/IClusterNodeFilter.cs               |   32 -
 .../Common/AsyncSupportedAttribute.cs           |   33 -
 .../Apache.Ignite.Core/Common/IAsyncSupport.cs  |   52 -
 .../dotnet/Apache.Ignite.Core/Common/IFuture.cs |  115 -
 .../Common/IgniteException.cs                   |   66 -
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |  138 -
 .../ComputeExecutionRejectedException.cs        |   69 -
 .../Compute/ComputeJobAdapter.cs                |  122 -
 .../Compute/ComputeJobFailoverException.cs      |   72 -
 .../Compute/ComputeJobResultPolicy.cs           |   45 -
 .../Compute/ComputeTaskAdapter.cs               |   93 -
 .../Compute/ComputeTaskCancelledException.cs    |   69 -
 .../ComputeTaskNoResultCacheAttribute.cs        |   35 -
 .../Compute/ComputeTaskSplitAdapter.cs          |   95 -
 .../Compute/ComputeTaskTimeoutException.cs      |   67 -
 .../Compute/ComputeUserUndeclaredException.cs   |   70 -
 .../Apache.Ignite.Core/Compute/ICompute.cs      |  274 --
 .../Apache.Ignite.Core/Compute/IComputeFunc.cs  |   55 -
 .../Apache.Ignite.Core/Compute/IComputeJob.cs   |   58 -
 .../Compute/IComputeJobResult.cs                |   73 -
 .../Compute/IComputeReducer.cs                  |   39 -
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |  132 -
 .../Datastream/IDataStreamer.cs                 |  206 -
 .../Datastream/IStreamReceiver.cs               |   38 -
 .../Datastream/StreamTransformer.cs             |   73 -
 .../Datastream/StreamVisitor.cs                 |   55 -
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |  176 -
 .../Events/CacheQueryExecutedEvent.cs           |   97 -
 .../Events/CacheQueryReadEvent.cs               |  134 -
 .../Events/CacheRebalancingEvent.cs             |   98 -
 .../Events/CheckpointEvent.cs                   |   50 -
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   80 -
 .../Apache.Ignite.Core/Events/EventBase.cs      |  160 -
 .../Apache.Ignite.Core/Events/EventReader.cs    |   72 -
 .../Apache.Ignite.Core/Events/EventType.cs      |  514 ---
 .../dotnet/Apache.Ignite.Core/Events/IEvent.cs  |   74 -
 .../Apache.Ignite.Core/Events/IEventFilter.cs   |   36 -
 .../dotnet/Apache.Ignite.Core/Events/IEvents.cs |  182 -
 .../Apache.Ignite.Core/Events/JobEvent.cs       |  100 -
 .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs |   50 -
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |   91 -
 .../main/dotnet/Apache.Ignite.Core/IIgnite.cs   |  168 -
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  140 -
 .../main/dotnet/Apache.Ignite.Core/Ignition.cs  |  657 ----
 .../Impl/Cache/CacheAffinityImpl.cs             |  275 --
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |  126 -
 .../Impl/Cache/CacheEntryFilterHolder.cs        |  147 -
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  145 -
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   65 -
 .../Cache/CacheEntryProcessorResultHolder.cs    |  127 -
 .../Impl/Cache/CacheEnumerable.cs               |   82 -
 .../Impl/Cache/CacheEnumerator.cs               |  117 -
 .../Impl/Cache/CacheEnumeratorProxy.cs          |  156 -
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  940 -----
 .../Apache.Ignite.Core/Impl/Cache/CacheLock.cs  |  171 -
 .../Impl/Cache/CacheMetricsImpl.cs              |  248 --
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   63 -
 .../Impl/Cache/CacheProxyImpl.cs                |  499 ---
 .../Impl/Cache/Event/CacheEntryCreateEvent.cs   |   74 -
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |   74 -
 .../Impl/Cache/Event/CacheEntryUpdateEvent.cs   |   79 -
 .../Impl/Cache/MutableCacheEntry.cs             |  163 -
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 --
 .../Query/Continuous/ContinuousQueryFilter.cs   |  125 -
 .../Continuous/ContinuousQueryFilterHolder.cs   |  118 -
 .../Continuous/ContinuousQueryHandleImpl.cs     |  216 --
 .../Query/Continuous/ContinuousQueryUtils.cs    |  115 -
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   54 -
 .../Impl/Cache/Query/QueryCursor.cs             |   50 -
 .../Impl/Cache/Store/CacheStore.cs              |  263 --
 .../Impl/Cache/Store/CacheStoreSession.cs       |   53 -
 .../Impl/Cache/Store/CacheStoreSessionProxy.cs  |   63 -
 .../Impl/Cluster/ClusterGroupImpl.cs            |  577 ---
 .../Impl/Cluster/ClusterMetricsImpl.cs          |  292 --
 .../Impl/Cluster/ClusterNodeImpl.cs             |  221 --
 .../Impl/Cluster/IClusterGroupEx.cs             |   35 -
 .../Impl/Collections/CollectionExtensions.cs    |   45 -
 .../Impl/Collections/MultiValueDictionary.cs    |  143 -
 .../Impl/Collections/ReadOnlyCollection.cs      |  102 -
 .../Impl/Collections/ReadOnlyDictionary.cs      |  149 -
 .../Impl/Common/AsyncResult.cs                  |   71 -
 .../Impl/Common/CompletedAsyncResult.cs         |   70 -
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   70 -
 .../Impl/Common/DelegateConverter.cs            |  253 --
 .../Impl/Common/DelegateTypeDescriptor.cs       |  314 --
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  286 --
 .../Impl/Common/FutureConverter.cs              |   62 -
 .../Impl/Common/FutureType.cs                   |   52 -
 .../Impl/Common/IFutureConverter.cs             |   34 -
 .../Impl/Common/IFutureInternal.cs              |   46 -
 .../Impl/Common/IgniteArgumentCheck.cs          |   76 -
 .../Impl/Common/LoadedAssembliesResolver.cs     |   96 -
 .../Impl/Common/PortableResultWrapper.cs        |   68 -
 .../Impl/Common/TypeCaster.cs                   |   72 -
 .../Closure/ComputeAbstractClosureTask.cs       |  101 -
 .../Impl/Compute/Closure/ComputeActionJob.cs    |   83 -
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |   89 -
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   56 -
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |   76 -
 .../Closure/ComputeReducingClosureTask.cs       |   61 -
 .../Compute/Closure/ComputeSingleClosureTask.cs |   48 -
 .../Compute/Closure/IComputeResourceInjector.cs |   31 -
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  213 -
 .../Impl/Compute/ComputeAsync.cs                |  261 --
 .../Impl/Compute/ComputeFunc.cs                 |  119 -
 .../Impl/Compute/ComputeImpl.cs                 |  645 ---
 .../Impl/Compute/ComputeJob.cs                  |  163 -
 .../Impl/Compute/ComputeJobHolder.cs            |  246 --
 .../Compute/ComputeJobResultGenericWrapper.cs   |   70 -
 .../Impl/Compute/ComputeJobResultImpl.cs        |   96 -
 .../Impl/Compute/ComputeOutFunc.cs              |  123 -
 .../Impl/Compute/ComputeTaskHolder.cs           |  484 ---
 .../Impl/Datastream/DataStreamerBatch.cs        |  269 --
 .../Impl/Datastream/DataStreamerEntry.cs        |   64 -
 .../Impl/Datastream/DataStreamerImpl.cs         |  832 ----
 .../Impl/Datastream/DataStreamerRemoveEntry.cs  |   48 -
 .../Impl/Datastream/StreamReceiverHolder.cs     |  144 -
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |  498 ---
 .../Impl/Events/EventsAsync.cs                  |  158 -
 .../Impl/Events/RemoteListenEventFilter.cs      |   85 -
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  204 -
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   69 -
 .../Impl/Handle/HandleRegistry.cs               |  340 --
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |   35 -
 .../Apache.Ignite.Core/Impl/IInteropCallback.cs |   34 -
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  549 ---
 .../Impl/IgniteConfigurationEx.cs               |   57 -
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |  490 ---
 .../Apache.Ignite.Core/Impl/IgniteProxy.cs      |  351 --
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  438 ---
 .../Impl/Interop/InteropDotNetConfiguration.cs  |   62 -
 .../InteropDotNetPortableConfiguration.cs       |  127 -
 .../InteropDotNetPortableTypeConfiguration.cs   |  151 -
 .../Impl/InteropExceptionHolder.cs              |   85 -
 .../Impl/LifecycleBeanHolder.cs                 |   66 -
 .../Impl/Memory/IPlatformMemory.cs              |   65 -
 .../Impl/Memory/InteropExternalMemory.cs        |   46 -
 .../Impl/Memory/InteropMemoryUtils.cs           |   38 -
 .../Memory/PlatformBigEndianMemoryStream.cs     |  483 ---
 .../Impl/Memory/PlatformMemory.cs               |   78 -
 .../Impl/Memory/PlatformMemoryManager.cs        |  107 -
 .../Impl/Memory/PlatformMemoryPool.cs           |  106 -
 .../Impl/Memory/PlatformMemoryStream.cs         |  677 ----
 .../Impl/Memory/PlatformMemoryUtils.cs          |  463 ---
 .../Impl/Memory/PlatformPooledMemory.cs         |   70 -
 .../Impl/Memory/PlatformRawMemory.cs            |   89 -
 .../Impl/Memory/PlatformUnpooledMemory.cs       |   52 -
 .../Impl/Messaging/MessageFilterHolder.cs       |  179 -
 .../Impl/Messaging/Messaging.cs                 |  262 --
 .../Impl/Messaging/MessagingAsync.cs            |   68 -
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   47 -
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  715 ----
 .../Portable/IPortableSystemTypeSerializer.cs   |   34 -
 .../Impl/Portable/IPortableTypeDescriptor.cs    |  124 -
 .../Impl/Portable/IPortableWriteAware.cs        |   34 -
 .../Impl/Portable/Io/IPortableStream.cs         |  320 --
 .../Impl/Portable/Io/PortableAbstractStream.cs  | 1298 -------
 .../Impl/Portable/Io/PortableHeapStream.cs      |  447 ---
 .../Impl/Portable/Io/PortableStreamAdapter.cs   |  114 -
 .../Metadata/IPortableMetadataHandler.cs        |   41 -
 .../Metadata/PortableHashsetMetadataHandler.cs  |   69 -
 .../Portable/Metadata/PortableMetadataHolder.cs |  149 -
 .../Portable/Metadata/PortableMetadataImpl.cs   |  200 -
 .../Impl/Portable/PortableBuilderField.cs       |   73 -
 .../Impl/Portable/PortableBuilderImpl.cs        |  923 -----
 .../Impl/Portable/PortableCollectionInfo.cs     |  251 --
 .../Impl/Portable/PortableFullTypeDescriptor.cs |  203 -
 .../Impl/Portable/PortableHandleDictionary.cs   |  187 -
 .../Portable/PortableMarshalAwareSerializer.cs  |   45 -
 .../Impl/Portable/PortableMarshaller.cs         |  603 ---
 .../Impl/Portable/PortableMode.cs               |   40 -
 .../Impl/Portable/PortableObjectHandle.cs       |   59 -
 .../PortableOrSerializableObjectHolder.cs       |   66 -
 .../Portable/PortableReaderHandleDictionary.cs  |   42 -
 .../Impl/Portable/PortableReaderImpl.cs         | 1013 -----
 .../Impl/Portable/PortableReflectiveRoutines.cs |  483 ---
 .../Portable/PortableReflectiveSerializer.cs    |  218 --
 .../Portable/PortableSurrogateTypeDescriptor.cs |  133 -
 .../Impl/Portable/PortableSystemHandlers.cs     | 1336 -------
 .../Portable/PortableSystemTypeSerializer.cs    |   62 -
 .../Impl/Portable/PortableUserObject.cs         |  385 --
 .../Impl/Portable/PortableUtils.cs              | 2039 ----------
 .../Impl/Portable/PortableWriterImpl.cs         | 1305 -------
 .../Impl/Portable/PortablesImpl.cs              |  205 -
 .../Impl/Portable/SerializableObjectHolder.cs   |   66 -
 .../Impl/Portable/TypeResolver.cs               |  227 --
 .../Impl/Resource/IResourceInjector.cs          |   27 -
 .../Impl/Resource/ResourceFieldInjector.cs      |   47 -
 .../Impl/Resource/ResourceMethodInjector.cs     |   48 -
 .../Impl/Resource/ResourceProcessor.cs          |  105 -
 .../Impl/Resource/ResourcePropertyInjector.cs   |   47 -
 .../Impl/Resource/ResourceTypeDescriptor.cs     |  291 --
 .../Impl/Services/ServiceContext.cs             |   60 -
 .../Impl/Services/ServiceDescriptor.cs          |  106 -
 .../Impl/Services/ServiceProxy.cs               |   71 -
 .../Impl/Services/ServiceProxyInvoker.cs        |  136 -
 .../Impl/Services/ServiceProxySerializer.cs     |  140 -
 .../Impl/Services/Services.cs                   |  316 --
 .../Impl/Services/ServicesAsync.cs              |   89 -
 .../Impl/Transactions/AsyncTransaction.cs       |   78 -
 .../Impl/Transactions/Transaction.cs            |  155 -
 .../Impl/Transactions/TransactionImpl.cs        |  489 ---
 .../Impl/Transactions/TransactionMetricsImpl.cs |   62 -
 .../Impl/Transactions/TransactionsImpl.cs       |  201 -
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |   42 -
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |   99 -
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        | 1154 ------
 .../Impl/Unmanaged/UnmanagedContext.cs          |   53 -
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |   68 -
 .../Impl/Unmanaged/UnmanagedTarget.cs           |   77 -
 .../Impl/Unmanaged/UnmanagedUtils.cs            | 1263 ------
 .../Lifecycle/ILifecycleBean.cs                 |   64 -
 .../Lifecycle/LifecycleEventType.cs             |   49 -
 .../Messaging/IMessageFilter.cs                 |   35 -
 .../Apache.Ignite.Core/Messaging/IMessaging.cs  |  105 -
 .../Portable/IPortableBuilder.cs                |   78 -
 .../Portable/IPortableIdMapper.cs               |   40 -
 .../Portable/IPortableMarshalAware.cs           |   39 -
 .../Portable/IPortableMetadata.cs               |   61 -
 .../Portable/IPortableNameMapper.cs             |   39 -
 .../Portable/IPortableObject.cs                 |   44 -
 .../Portable/IPortableRawReader.cs              |  264 --
 .../Portable/IPortableRawWriter.cs              |  221 --
 .../Portable/IPortableReader.cs                 |  340 --
 .../Portable/IPortableSerializer.cs             |   39 -
 .../Portable/IPortableWriter.cs                 |  259 --
 .../Apache.Ignite.Core/Portable/IPortables.cs   |  120 -
 .../Portable/PortableConfiguration.cs           |  122 -
 .../Portable/PortableException.cs               |   64 -
 .../Portable/PortableTypeConfiguration.cs       |  162 -
 .../Portable/PortableTypeNames.cs               |  115 -
 .../Properties/AssemblyInfo.cs                  |   46 -
 .../Resource/InstanceResourceAttribute.cs       |   35 -
 .../Resource/StoreSessionResourceAttribute.cs   |   32 -
 .../Apache.Ignite.Core/Services/IService.cs     |   51 -
 .../Services/IServiceContext.cs                 |   69 -
 .../Services/IServiceDescriptor.cs              |   96 -
 .../Apache.Ignite.Core/Services/IServices.cs    |  181 -
 .../Services/ServiceConfiguration.cs            |   62 -
 .../Services/ServiceInvocationException.cs      |  101 -
 .../Transactions/ITransaction.cs                |  230 --
 .../Transactions/ITransactionMetrics.cs         |   47 -
 .../Transactions/ITransactions.cs               |   73 -
 .../Transactions/TransactionConcurrency.cs      |   36 -
 .../TransactionHeuristicException.cs            |   72 -
 .../Transactions/TransactionIsolation.cs        |   41 -
 .../TransactionOptimisticException.cs           |   69 -
 .../TransactionRollbackException.cs             |   68 -
 .../Transactions/TransactionState.cs            |   70 -
 .../Transactions/TransactionTimeoutException.cs |   69 -
 .../platform/src/main/dotnet/Apache.Ignite.sln  |   68 -
 .../main/dotnet/Apache.Ignite.sln.DotSettings   |    4 -
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   76 -
 .../src/main/dotnet/Apache.Ignite/App.config    |   56 -
 .../Config/AppSettingsConfigurator.cs           |  113 -
 .../Apache.Ignite/Config/ArgsConfigurator.cs    |  164 -
 .../Apache.Ignite/Config/ConfigValueParser.cs   |   42 -
 .../Apache.Ignite/Config/IConfigurator.cs       |   34 -
 .../main/dotnet/Apache.Ignite/IgniteRunner.cs   |  171 -
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   35 -
 .../Apache.Ignite/Service/IgniteService.cs      |  219 --
 .../Apache.Ignite/Service/NativeMethods.cs      |   57 -
 .../Apache.Ignite/Service/ServiceDescription.cs |   32 -
 ...processors.platform.PlatformBootstrapFactory |    2 -
 .../platform/PlatformAbstractBootstrap.java     |   48 -
 .../PlatformAbstractConfigurationClosure.java   |   61 -
 .../platform/PlatformAbstractPredicate.java     |   67 -
 .../platform/PlatformAbstractTarget.java        |  320 --
 .../processors/platform/PlatformBootstrap.java  |   35 -
 .../platform/PlatformBootstrapFactory.java      |   37 -
 .../platform/PlatformConfigurationEx.java       |   48 -
 .../platform/PlatformContextImpl.java           |  621 ---
 .../processors/platform/PlatformIgnition.java   |  189 -
 .../platform/PlatformProcessorImpl.java         |  359 --
 .../platform/cache/PlatformCache.java           | 1090 ------
 .../cache/PlatformCacheEntryFilterImpl.java     |  106 -
 .../cache/PlatformCacheEntryProcessorImpl.java  |  220 --
 .../platform/cache/PlatformCacheIterator.java   |   72 -
 .../PlatformCachePartialUpdateException.java    |   59 -
 .../cache/affinity/PlatformAffinity.java        |  296 --
 .../query/PlatformAbstractQueryCursor.java      |  192 -
 .../query/PlatformContinuousQueryImpl.java      |  235 --
 .../PlatformContinuousQueryRemoteFilter.java    |  188 -
 .../cache/query/PlatformFieldsQueryCursor.java  |   49 -
 .../cache/query/PlatformQueryCursor.java        |   45 -
 .../cache/store/PlatformCacheStoreCallback.java |   61 -
 .../platform/cluster/PlatformClusterGroup.java  |  335 --
 .../cluster/PlatformClusterNodeFilterImpl.java  |   78 -
 .../platform/compute/PlatformAbstractJob.java   |  156 -
 .../platform/compute/PlatformAbstractTask.java  |  206 -
 .../PlatformBalancingMultiClosureTask.java      |   83 -
 ...tformBalancingSingleClosureAffinityTask.java |   88 -
 .../PlatformBalancingSingleClosureTask.java     |   81 -
 .../PlatformBroadcastingMultiClosureTask.java   |   87 -
 .../PlatformBroadcastingSingleClosureTask.java  |   84 -
 .../platform/compute/PlatformClosureJob.java    |  104 -
 .../platform/compute/PlatformCompute.java       |  332 --
 .../platform/compute/PlatformFullJob.java       |  220 --
 .../platform/compute/PlatformFullTask.java      |  192 -
 .../platform/cpp/PlatformCppBootstrap.java      |   31 -
 .../cpp/PlatformCppBootstrapFactory.java        |   39 -
 .../cpp/PlatformCppConfigurationClosure.java    |   99 -
 .../cpp/PlatformCppConfigurationEx.java         |   82 -
 .../datastreamer/PlatformDataStreamer.java      |  226 --
 .../PlatformStreamReceiverImpl.java             |  119 -
 .../dotnet/PlatformDotNetBootstrap.java         |   31 -
 .../dotnet/PlatformDotNetBootstrapFactory.java  |   39 -
 .../dotnet/PlatformDotNetCacheStore.java        |  497 ---
 .../PlatformDotNetConfigurationClosure.java     |  254 --
 .../dotnet/PlatformDotNetConfigurationEx.java   |   90 -
 .../platform/dotnet/PlatformDotNetService.java  |   27 -
 .../dotnet/PlatformDotNetServiceImpl.java       |   47 -
 .../events/PlatformEventFilterListenerImpl.java |  163 -
 .../platform/events/PlatformEvents.java         |  396 --
 .../lifecycle/PlatformLifecycleBean.java        |   75 -
 .../platform/memory/PlatformAbstractMemory.java |  121 -
 .../PlatformBigEndianInputStreamImpl.java       |  126 -
 .../PlatformBigEndianOutputStreamImpl.java      |  161 -
 .../platform/memory/PlatformExternalMemory.java |   55 -
 .../memory/PlatformInputStreamImpl.java         |  331 --
 .../memory/PlatformMemoryManagerImpl.java       |   85 -
 .../platform/memory/PlatformMemoryPool.java     |  140 -
 .../platform/memory/PlatformMemoryUtils.java    |  467 ---
 .../memory/PlatformOutputStreamImpl.java        |  267 --
 .../platform/memory/PlatformPooledMemory.java   |   64 -
 .../platform/memory/PlatformUnpooledMemory.java |   51 -
 .../messaging/PlatformMessageFilterImpl.java    |  110 -
 .../messaging/PlatformMessageLocalFilter.java   |  102 -
 .../platform/messaging/PlatformMessaging.java   |  166 -
 .../services/PlatformAbstractService.java       |  230 --
 .../platform/services/PlatformServices.java     |  275 --
 .../transactions/PlatformTransactions.java      |  259 --
 .../platform/utils/PlatformFutureUtils.java     |  397 --
 .../platform/utils/PlatformReaderBiClosure.java |   34 -
 .../platform/utils/PlatformReaderClosure.java   |   34 -
 .../platform/utils/PlatformUtils.java           |  768 ----
 .../platform/utils/PlatformWriterBiClosure.java |   34 -
 .../platform/utils/PlatformWriterClosure.java   |   33 -
 .../platform/cpp/PlatformCppConfiguration.java  |   47 -
 .../ignite/platform/cpp/package-info.java       |   22 -
 .../dotnet/PlatformDotNetCacheStoreFactory.java |  139 -
 .../dotnet/PlatformDotNetLifecycleBean.java     |  109 -
 .../ignite/platform/dotnet/package-info.java    |   22 -
 .../apache/ignite/platform/package-info.java    |   22 -
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   52 -
 .../Properties/AssemblyInfo.cs                  |   49 -
 .../TestClass.cs                                |   35 -
 .../Apache.Ignite.Core.Tests.csproj             |  225 --
 .../Cache/CacheAbstractTest.cs                  | 3252 ----------------
 .../Cache/CacheAffinityTest.cs                  |  139 -
 .../Cache/CacheDynamicStartTest.cs              |  281 --
 .../Cache/CacheEntryTest.cs                     |   69 -
 .../Cache/CacheForkedTest.cs                    |   81 -
 .../Cache/CacheLocalAtomicTest.cs               |   57 -
 .../Cache/CacheLocalTest.cs                     |   56 -
 .../CachePartitionedAtomicNearEnabledTest.cs    |   50 -
 .../Cache/CachePartitionedAtomicTest.cs         |   50 -
 .../Cache/CachePartitionedNearEnabledTest.cs    |   50 -
 .../Cache/CachePartitionedTest.cs               |   50 -
 .../Cache/CacheReplicatedAtomicTest.cs          |   60 -
 .../Cache/CacheReplicatedTest.cs                |   60 -
 .../Cache/CacheTestAsyncWrapper.cs              |  436 ---
 .../Cache/Query/CacheQueriesTest.cs             |  928 -----
 .../Continuous/ContinuousQueryAbstractTest.cs   | 1181 ------
 .../ContinuousQueryAtomicBackupTest.cs          |   33 -
 .../ContinuousQueryAtomicNoBackupTest.cs        |   34 -
 .../ContinuousQueryNoBackupAbstractTest.cs      |   72 -
 .../ContinuousQueryTransactionalBackupTest.cs   |   34 -
 .../ContinuousQueryTransactionalNoBackupTest.cs |   33 -
 .../Cache/Store/CacheParallelLoadStoreTest.cs   |  110 -
 .../Cache/Store/CacheStoreSessionTest.cs        |  285 --
 .../Cache/Store/CacheStoreTest.cs               |  510 ---
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   91 -
 .../Cache/Store/CacheTestStore.cs               |  155 -
 .../Compute/AbstractTaskTest.cs                 |  217 --
 .../Compute/ClosureTaskTest.cs                  |  390 --
 .../Compute/ComputeApiTest.cs                   | 1281 ------
 .../Compute/ComputeMultithreadedTest.cs         |  269 --
 .../Compute/FailoverTaskSelfTest.cs             |  246 --
 .../Forked/ForkedPortableClosureTaskTest.cs     |   30 -
 .../Compute/Forked/ForkedResourceTaskTest.cs    |   33 -
 .../Forked/ForkedSerializableClosureTaskTest.cs |   33 -
 .../Compute/Forked/ForkedTaskAdapterTest.cs     |   30 -
 .../Compute/IgniteExceptionTaskSelfTest.cs      |  753 ----
 .../Compute/PortableClosureTaskTest.cs          |  217 --
 .../Compute/PortableTaskTest.cs                 |  253 --
 .../Compute/ResourceTaskTest.cs                 |  568 ---
 .../Compute/SerializableClosureTaskTest.cs      |  217 --
 .../Compute/TaskAdapterTest.cs                  |  274 --
 .../Compute/TaskResultTest.cs                   |  437 ---
 .../Config/Apache.Ignite.exe.config.test        |   41 -
 .../Config/Cache/Store/cache-store-session.xml  |   80 -
 .../Config/Compute/compute-grid1.xml            |   90 -
 .../Config/Compute/compute-grid2.xml            |   63 -
 .../Config/Compute/compute-grid3.xml            |   52 -
 .../Config/Compute/compute-standalone.xml       |   87 -
 .../Config/Dynamic/dynamic-client.xml           |   51 -
 .../Config/Dynamic/dynamic-data-no-cfg.xml      |   47 -
 .../Config/Dynamic/dynamic-data.xml             |   65 -
 .../Config/Lifecycle/lifecycle-beans.xml        |   66 -
 .../Config/Lifecycle/lifecycle-no-beans.xml     |   44 -
 .../Config/cache-portables.xml                  |   78 -
 .../Config/cache-query-continuous.xml           |  171 -
 .../Config/cache-query.xml                      |  100 -
 .../Config/marshaller-default.xml               |   43 -
 .../Config/marshaller-invalid.xml               |   46 -
 .../Config/marshaller-portable.xml              |   43 -
 .../native-client-test-cache-affinity.xml       |   70 -
 .../native-client-test-cache-parallel-store.xml |   69 -
 .../Config/native-client-test-cache-store.xml   |  125 -
 .../Config/native-client-test-cache.xml         |  194 -
 .../Config/portable.xml                         |   56 -
 .../Config/start-test-grid1.xml                 |   54 -
 .../Config/start-test-grid2.xml                 |   45 -
 .../Config/start-test-grid3.xml                 |   43 -
 .../Dataload/DataStreamerTest.cs                |  592 ---
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  961 -----
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |  352 --
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  443 ---
 .../Apache.Ignite.Core.Tests/FutureTest.cs      |  278 --
 .../IgniteManagerTest.cs                        |   51 -
 .../IgniteStartStopTest.cs                      |  422 --
 .../Apache.Ignite.Core.Tests/LifecycleTest.cs   |  288 --
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |  243 --
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |   71 -
 .../Memory/InteropMemoryTest.cs                 |  213 -
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |  646 ---
 .../Portable/PortableApiSelfTest.cs             | 1787 ---------
 .../Portable/PortableSelfTest.cs                | 2078 ----------
 .../PortableConfigurationTest.cs                |  173 -
 .../Process/IIgniteProcessOutputReader.cs       |   35 -
 .../Process/IgniteProcess.cs                    |  283 --
 .../Process/IgniteProcessConsoleOutputReader.cs |   40 -
 .../Properties/AssemblyInfo.cs                  |   35 -
 .../Query/ImplicitPortablePerson.cs             |   46 -
 .../Query/NoDefPortablePerson.cs                |   35 -
 .../Query/PortablePerson.cs                     |   69 -
 .../SerializationTest.cs                        |  240 --
 .../Services/ServiceProxyTest.cs                |  741 ----
 .../Services/ServicesAsyncWrapper.cs            |  174 -
 .../Services/ServicesTest.cs                    |  823 ----
 .../Services/ServicesTestAsync.cs               |   33 -
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |   71 -
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |  292 --
 .../TypeResolverTest.cs                         |  107 -
 .../platform/PlatformComputeBroadcastTask.java  |   73 -
 .../platform/PlatformComputeDecimalTask.java    |  106 -
 .../platform/PlatformComputeEchoTask.java       |  188 -
 .../ignite/platform/PlatformComputeEnum.java    |   28 -
 .../platform/PlatformComputeJavaPortable.java   |   39 -
 .../platform/PlatformComputePortable.java       |   42 -
 .../PlatformComputePortableArgTask.java         |  121 -
 .../platform/PlatformEventsWriteEventTask.java  |  146 -
 .../ignite/platform/PlatformMaxMemoryTask.java  |   57 -
 .../ignite/platform/PlatformMinMemoryTask.java  |   57 -
 .../lifecycle/PlatformJavaLifecycleBean.java    |   47 -
 .../lifecycle/PlatformJavaLifecycleTask.java    |   65 -
 modules/platforms/cpp/README.txt                |  101 +
 modules/platforms/cpp/common/Makefile.am        |   45 +
 modules/platforms/cpp/common/configure.ac       |   62 +
 .../platforms/cpp/common/ignite-common.pc.in    |    9 +
 .../platforms/cpp/common/include/Makefile.am    |   26 +
 .../common/include/ignite/common/concurrent.h   |  237 ++
 .../cpp/common/include/ignite/common/exports.h  |  158 +
 .../cpp/common/include/ignite/common/java.h     |  679 ++++
 .../cpp/common/include/ignite/common/utils.h    |   81 +
 .../cpp/common/os/linux/include/Makefile.am     |   24 +
 .../os/linux/include/ignite/common/common.h     |   81 +
 .../linux/include/ignite/common/concurrent_os.h |  394 ++
 .../cpp/common/os/linux/src/common.cpp          |   59 +
 .../cpp/common/os/linux/src/concurrent_os.cpp   |  175 +
 .../os/win/include/ignite/common/common.h       |   56 +
 .../win/include/ignite/common/concurrent_os.h   |  406 ++
 .../platforms/cpp/common/os/win/src/common.cpp  |   65 +
 .../cpp/common/os/win/src/concurrent_os.cpp     |  151 +
 modules/platforms/cpp/common/project/README.TXT |    1 +
 .../platforms/cpp/common/project/vs/README.TXT  |    1 +
 .../cpp/common/project/vs/common.vcxproj        |  203 +
 .../common/project/vs/common.vcxproj.filters    |   57 +
 .../platforms/cpp/common/project/vs/module.def  |  111 +
 .../platforms/cpp/common/project/vs/targetver.h |   25 +
 modules/platforms/cpp/common/src/concurrent.cpp |   94 +
 modules/platforms/cpp/common/src/exports.cpp    |  461 +++
 modules/platforms/cpp/common/src/java.cpp       | 2416 ++++++++++++
 modules/platforms/cpp/core-test/Makefile.am     |   49 +
 .../cpp/core-test/config/cache-query.xml        |   91 +
 .../cpp/core-test/config/cache-test.xml         |  129 +
 modules/platforms/cpp/core-test/configure.ac    |   62 +
 .../platforms/cpp/core-test/include/Makefile.am |   22 +
 .../core-test/include/ignite/binary_test_defs.h |  320 ++
 .../include/ignite/binary_test_utils.h          |  516 +++
 .../cpp/core-test/include/teamcity_messages.h   |   55 +
 .../platforms/cpp/core-test/project/README.TXT  |    1 +
 .../cpp/core-test/project/vs/README.TXT         |    1 +
 .../cpp/core-test/project/vs/core-test.vcxproj  |  174 +
 .../project/vs/core-test.vcxproj.filters        |   68 +
 .../src/binary_reader_writer_raw_test.cpp       | 1593 ++++++++
 .../core-test/src/binary_reader_writer_test.cpp | 2373 +++++++++++
 .../cpp/core-test/src/binary_session_test.cpp   |  257 ++
 .../cpp/core-test/src/binary_test_defs.cpp      |   65 +
 .../cpp/core-test/src/cache_query_test.cpp      |  841 ++++
 .../platforms/cpp/core-test/src/cache_test.cpp  |  479 +++
 .../cpp/core-test/src/concurrent_test.cpp       |  186 +
 .../cpp/core-test/src/handle_registry_test.cpp  |  176 +
 .../cpp/core-test/src/ignition_test.cpp         |   95 +
 .../cpp/core-test/src/teamcity_boost.cpp        |  159 +
 .../cpp/core-test/src/teamcity_messages.cpp     |  150 +
 modules/platforms/cpp/core/Makefile.am          |   67 +
 modules/platforms/cpp/core/configure.ac         |   62 +
 modules/platforms/cpp/core/ignite.pc.in         |    9 +
 modules/platforms/cpp/core/include/Makefile.am  |   69 +
 .../cpp/core/include/ignite/binary/binary.h     |   29 +
 .../core/include/ignite/binary/binary_consts.h  |  106 +
 .../include/ignite/binary/binary_containers.h   |  525 +++
 .../include/ignite/binary/binary_raw_reader.h   |  350 ++
 .../include/ignite/binary/binary_raw_writer.h   |  326 ++
 .../core/include/ignite/binary/binary_reader.h  |  384 ++
 .../core/include/ignite/binary/binary_type.h    |  293 ++
 .../core/include/ignite/binary/binary_writer.h  |  362 ++
 .../cpp/core/include/ignite/cache/cache.h       | 1196 ++++++
 .../cpp/core/include/ignite/cache/cache_entry.h |  118 +
 .../core/include/ignite/cache/cache_peek_mode.h |   71 +
 .../cpp/core/include/ignite/cache/query/query.h |   28 +
 .../include/ignite/cache/query/query_argument.h |  125 +
 .../include/ignite/cache/query/query_cursor.h   |  200 +
 .../ignite/cache/query/query_fields_cursor.h    |  153 +
 .../ignite/cache/query/query_fields_row.h       |  154 +
 .../include/ignite/cache/query/query_scan.h     |  151 +
 .../core/include/ignite/cache/query/query_sql.h |  243 ++
 .../ignite/cache/query/query_sql_fields.h       |  210 +
 .../include/ignite/cache/query/query_text.h     |  160 +
 .../platforms/cpp/core/include/ignite/guid.h    |  112 +
 .../platforms/cpp/core/include/ignite/ignite.h  |  166 +
 .../core/include/ignite/ignite_configuration.h  |   66 +
 .../cpp/core/include/ignite/ignite_error.h      |  260 ++
 .../cpp/core/include/ignite/ignition.h          |  195 +
 .../include/ignite/impl/binary/binary_common.h  |  188 +
 .../ignite/impl/binary/binary_id_resolver.h     |  106 +
 .../ignite/impl/binary/binary_reader_impl.h     | 1309 +++++++
 .../include/ignite/impl/binary/binary_schema.h  |  136 +
 .../ignite/impl/binary/binary_type_handler.h    |  102 +
 .../ignite/impl/binary/binary_type_manager.h    |  120 +
 .../ignite/impl/binary/binary_type_snapshot.h   |  122 +
 .../ignite/impl/binary/binary_type_updater.h    |   53 +
 .../impl/binary/binary_type_updater_impl.h      |   65 +
 .../include/ignite/impl/binary/binary_utils.h   |  344 ++
 .../ignite/impl/binary/binary_writer_impl.h     |  913 +++++
 .../core/include/ignite/impl/cache/cache_impl.h |  428 ++
 .../impl/cache/query/query_fields_row_impl.h    |  174 +
 .../ignite/impl/cache/query/query_impl.h        |  125 +
 .../core/include/ignite/impl/handle_registry.h  |  202 +
 .../include/ignite/impl/ignite_environment.h    |  130 +
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  165 +
 .../core/include/ignite/impl/interop/interop.h  |   25 +
 .../ignite/impl/interop/interop_input_stream.h  |  250 ++
 .../ignite/impl/interop/interop_memory.h        |  280 ++
 .../ignite/impl/interop/interop_output_stream.h |  250 ++
 .../interop/interop_stream_position_guard.h     |   79 +
 .../cpp/core/include/ignite/impl/operations.h   |  452 +++
 .../cpp/core/os/linux/include/Makefile.am       |   23 +
 .../core/os/linux/include/ignite/impl/utils.h   |  155 +
 .../cpp/core/os/linux/src/impl/utils.cpp        |  439 +++
 .../cpp/core/os/win/include/ignite/impl/utils.h |  155 +
 .../cpp/core/os/win/src/impl/utils.cpp          |  453 +++
 modules/platforms/cpp/core/project/README.TXT   |    1 +
 .../platforms/cpp/core/project/vs/README.TXT    |    1 +
 .../platforms/cpp/core/project/vs/core.vcxproj  |  279 ++
 .../cpp/core/project/vs/core.vcxproj.filters    |  267 ++
 .../cpp/core/src/binary/binary_containers.cpp   |   76 +
 .../cpp/core/src/binary/binary_raw_reader.cpp   |  145 +
 .../cpp/core/src/binary/binary_raw_writer.cpp   |  147 +
 .../cpp/core/src/binary/binary_reader.cpp       |  152 +
 .../cpp/core/src/binary/binary_type.cpp         |   51 +
 .../cpp/core/src/binary/binary_writer.cpp       |  154 +
 modules/platforms/cpp/core/src/guid.cpp         |   65 +
 modules/platforms/cpp/core/src/ignite.cpp       |   43 +
 modules/platforms/cpp/core/src/ignite_error.cpp |  222 ++
 modules/platforms/cpp/core/src/ignition.cpp     |  470 +++
 .../core/src/impl/binary/binary_reader_impl.cpp |  760 ++++
 .../cpp/core/src/impl/binary/binary_schema.cpp  |  135 +
 .../src/impl/binary/binary_type_handler.cpp     |   78 +
 .../src/impl/binary/binary_type_manager.cpp     |  201 +
 .../src/impl/binary/binary_type_snapshot.cpp    |   70 +
 .../src/impl/binary/binary_type_updater.cpp     |   32 +
 .../impl/binary/binary_type_updater_impl.cpp    |   94 +
 .../cpp/core/src/impl/binary/binary_utils.cpp   |  211 +
 .../core/src/impl/binary/binary_writer_impl.cpp |  623 +++
 .../cpp/core/src/impl/cache/cache_impl.cpp      |  393 ++
 .../core/src/impl/cache/query/query_impl.cpp    |  228 ++
 .../cpp/core/src/impl/handle_registry.cpp       |  234 ++
 .../cpp/core/src/impl/ignite_environment.cpp    |  167 +
 .../platforms/cpp/core/src/impl/ignite_impl.cpp |   47 +
 .../src/impl/interop/interop_input_stream.cpp   |  235 ++
 .../core/src/impl/interop/interop_memory.cpp    |  182 +
 .../src/impl/interop/interop_output_stream.cpp  |  233 ++
 modules/platforms/cpp/examples/Makefile.am      |   39 +
 modules/platforms/cpp/examples/README.txt       |   42 +
 .../cpp/examples/config/example-cache.xml       |   77 +
 modules/platforms/cpp/examples/configure.ac     |   38 +
 .../platforms/cpp/examples/include/Makefile.am  |   21 +
 .../examples/include/ignite/examples/address.h  |  109 +
 .../include/ignite/examples/organization.h      |  111 +
 .../cpp/examples/project/vs/ignite-examples.sln |   19 +
 .../examples/project/vs/ignite-examples.vcxproj |  107 +
 .../project/vs/ignite-examples.vcxproj.filters  |   30 +
 .../cpp/examples/src/putgetexample.cpp          |  126 +
 modules/platforms/cpp/ignite/Makefile.am        |   39 +
 modules/platforms/cpp/ignite/configure.ac       |   62 +
 modules/platforms/cpp/ignite/project/README.TXT |    1 +
 .../platforms/cpp/ignite/project/vs/README.TXT  |    1 +
 .../cpp/ignite/project/vs/ignite.vcxproj        |  167 +
 .../ignite/project/vs/ignite.vcxproj.filters    |   25 +
 modules/platforms/cpp/ignite/src/ignite.cpp     |  225 ++
 modules/platforms/cpp/project/vs/ignite.sln     |   58 +
 modules/platforms/cpp/project/vs/ignite.slnrel  |   33 +
 .../platforms/cpp/project/vs/ignite_x86.slnrel  |   33 +
 .../Apache.Ignite.Benchmarks.csproj             |   95 +
 .../Apache.Ignite.Benchmarks.snk                |  Bin 0 -> 596 bytes
 .../dotnet/Apache.Ignite.Benchmarks/App.config  |   24 +
 .../Apache.Ignite.Benchmarks/BenchmarkBase.cs   |  931 +++++
 .../BenchmarkOperationDescriptor.cs             |   68 +
 .../Apache.Ignite.Benchmarks/BenchmarkRunner.cs |   94 +
 .../Apache.Ignite.Benchmarks/BenchmarkState.cs  |  106 +
 .../Apache.Ignite.Benchmarks/BenchmarkUtils.cs  |  236 ++
 .../Binary/BinarizableReadBenchmark.cs          |  125 +
 .../Binary/BinarizableWriteBenchmark.cs         |  135 +
 .../Config/benchmark.xml                        |   57 +
 .../Interop/ClosureBenchmark.cs                 |   66 +
 .../Interop/GetAsyncBenchmark.cs                |   62 +
 .../Interop/GetBenchmark.cs                     |   62 +
 .../Interop/PlatformBenchmarkBase.cs            |  121 +
 .../Interop/PutAsyncBenchmark.cs                |   58 +
 .../Interop/PutBenchmark.cs                     |   58 +
 .../Interop/TaskBenchmark.cs                    |  100 +
 .../Interop/TxBenchmark.cs                      |   65 +
 .../Apache.Ignite.Benchmarks/Model/Address.cs   |   80 +
 .../Apache.Ignite.Benchmarks/Model/Company.cs   |   89 +
 .../Model/Department.cs                         |   40 +
 .../Apache.Ignite.Benchmarks/Model/Employee.cs  |  136 +
 .../Apache.Ignite.Benchmarks/Model/Sex.cs       |   31 +
 .../Apache.Ignite.Benchmarks/Model/TestModel.cs |  111 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Result/BenchmarkConsoleResultWriter.cs      |   68 +
 .../Result/BenchmarkFileResultWriter.cs         |  323 ++
 .../Result/IBenchmarkResultWriter.cs            |   55 +
 .../Apache.Ignite.Core.Tests.TestDll.csproj     |   63 +
 .../Apache.Ignite.Core.Tests.TestDll.snk        |  Bin 0 -> 596 bytes
 .../Properties/AssemblyInfo.cs                  |   49 +
 .../TestClass.cs                                |   35 +
 .../Apache.Ignite.Core.Tests.csproj             |  261 ++
 .../Apache.Ignite.Core.Tests.nunit              |    7 +
 .../Apache.Ignite.Core.Tests.snk                |  Bin 0 -> 596 bytes
 .../Binary/BinaryBuilderSelfTest.cs             | 1721 ++++++++
 .../Binary/BinarySelfTest.cs                    | 2192 +++++++++++
 .../Binary/BinaryStructureTest.cs               |  250 ++
 .../BinaryConfigurationTest.cs                  |  173 +
 .../Cache/CacheAbstractTest.cs                  | 3265 ++++++++++++++++
 .../Cache/CacheAffinityTest.cs                  |  139 +
 .../Cache/CacheDynamicStartTest.cs              |  282 ++
 .../Cache/CacheEntryTest.cs                     |   69 +
 .../Cache/CacheForkedTest.cs                    |   81 +
 .../Cache/CacheLocalAtomicTest.cs               |   57 +
 .../Cache/CacheLocalTest.cs                     |   56 +
 .../CachePartitionedAtomicNearEnabledTest.cs    |   50 +
 .../Cache/CachePartitionedAtomicTest.cs         |   50 +
 .../Cache/CachePartitionedNearEnabledTest.cs    |   50 +
 .../Cache/CachePartitionedTest.cs               |   50 +
 .../Cache/CacheReplicatedAtomicTest.cs          |   60 +
 .../Cache/CacheReplicatedTest.cs                |   60 +
 .../Cache/CacheTestAsyncWrapper.cs              |  575 +++
 .../Cache/Query/CacheQueriesTest.cs             |  935 +++++
 .../Continuous/ContinuousQueryAbstractTest.cs   | 1251 ++++++
 .../ContinuousQueryAtomicBackupTest.cs          |   33 +
 .../ContinuousQueryAtomicNoBackupTest.cs        |   34 +
 .../ContinuousQueryNoBackupAbstractTest.cs      |   72 +
 .../ContinuousQueryTransactionalBackupTest.cs   |   34 +
 .../ContinuousQueryTransactionalNoBackupTest.cs |   33 +
 .../Cache/Store/CacheParallelLoadStoreTest.cs   |  110 +
 .../Cache/Store/CacheStoreSessionTest.cs        |  285 ++
 .../Cache/Store/CacheStoreTest.cs               |  536 +++
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   91 +
 .../Cache/Store/CacheTestStore.cs               |  155 +
 .../Compute/AbstractTaskTest.cs                 |  217 ++
 .../Compute/BinarizableClosureTaskTest.cs       |  185 +
 .../Compute/BinarizableTaskTest.cs              |  269 ++
 .../Compute/ClosureTaskTest.cs                  |  390 ++
 .../Compute/ComputeApiTest.cs                   | 1332 +++++++
 .../Compute/ComputeMultithreadedTest.cs         |  269 ++
 .../Compute/FailoverTaskSelfTest.cs             |  246 ++
 .../Forked/ForkedBinarizableClosureTaskTest.cs  |   30 +
 .../Compute/Forked/ForkedResourceTaskTest.cs    |   30 +
 .../Forked/ForkedSerializableClosureTaskTest.cs |   30 +
 .../Compute/Forked/ForkedTaskAdapterTest.cs     |   30 +
 .../Compute/IgniteExceptionTaskSelfTest.cs      |  754 ++++
 .../Compute/ResourceTaskTest.cs                 |  568 +++
 .../Compute/SerializableClosureTaskTest.cs      |  217 ++
 .../Compute/TaskAdapterTest.cs                  |  274 ++
 .../Compute/TaskResultTest.cs                   |  437 +++
 .../Config/Apache.Ignite.exe.config.test        |   41 +
 .../Config/Cache/Store/cache-store-session.xml  |   79 +
 .../Config/Compute/compute-grid1.xml            |   95 +
 .../Config/Compute/compute-grid2.xml            |   63 +
 .../Config/Compute/compute-grid3.xml            |   52 +
 .../Config/Compute/compute-standalone.xml       |   87 +
 .../Config/Dynamic/dynamic-client.xml           |   51 +
 .../Config/Dynamic/dynamic-data-no-cfg.xml      |   47 +
 .../Config/Dynamic/dynamic-data.xml             |   65 +
 .../Config/Lifecycle/lifecycle-beans.xml        |   66 +
 .../Config/Lifecycle/lifecycle-no-beans.xml     |   44 +
 .../Apache.Ignite.Core.Tests/Config/binary.xml  |   56 +
 .../Config/cache-binarizables.xml               |   78 +
 .../Config/cache-query-continuous.xml           |  171 +
 .../Config/cache-query.xml                      |  100 +
 .../Config/marshaller-default.xml               |   43 +
 .../Config/marshaller-explicit.xml              |   53 +
 .../Config/marshaller-invalid.xml               |   46 +
 .../native-client-test-cache-affinity.xml       |   70 +
 .../native-client-test-cache-parallel-store.xml |   68 +
 .../Config/native-client-test-cache-store.xml   |  121 +
 .../Config/native-client-test-cache.xml         |  143 +
 .../Config/start-test-grid1.xml                 |   54 +
 .../Config/start-test-grid2.xml                 |   45 +
 .../Config/start-test-grid3.xml                 |   43 +
 .../DataStructures/AtomicLongTest.cs            |  138 +
 .../Dataload/DataStreamerTest.cs                |  592 +++
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  956 +++++
 .../Examples/Example.cs                         |  126 +
 .../Examples/ExamplesTest.cs                    |  156 +
 .../Examples/PathUtil.cs                        |   50 +
 .../Examples/ProjectFilesTest.cs                |   49 +
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |  365 ++
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  443 +++
 .../Apache.Ignite.Core.Tests/FutureTest.cs      |  188 +
 .../IgniteManagerTest.cs                        |   51 +
 .../IgniteStartStopTest.cs                      |  426 ++
 .../Apache.Ignite.Core.Tests/IgniteTestBase.cs  |  200 +
 .../Apache.Ignite.Core.Tests/LifecycleTest.cs   |  289 ++
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |  243 ++
 .../Apache.Ignite.Core.Tests/MarshallerTest.cs  |   71 +
 .../Memory/InteropMemoryTest.cs                 |  200 +
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |  644 +++
 .../Process/IIgniteProcessOutputReader.cs       |   35 +
 .../Process/IgniteProcess.cs                    |  283 ++
 .../Process/IgniteProcessConsoleOutputReader.cs |   40 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Query/BinarizablePerson.cs                  |   69 +
 .../Query/ImplicitBinarizablePerson.cs          |   46 +
 .../Query/NoDefBinarizablePerson.cs             |   35 +
 .../SerializationTest.cs                        |  240 ++
 .../Services/ServiceProxyTest.cs                |  741 ++++
 .../Services/ServicesAsyncWrapper.cs            |  182 +
 .../Services/ServicesTest.cs                    |  823 ++++
 .../Services/ServicesTestAsync.cs               |   33 +
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |   71 +
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |  306 ++
 .../TypeResolverTest.cs                         |  107 +
 .../Apache.Ignite.Core.csproj                   |  383 ++
 .../Apache.Ignite.Core/Apache.Ignite.Core.snk   |  Bin 0 -> 596 bytes
 .../Binary/BinaryConfiguration.cs               |   90 +
 .../Binary/BinaryObjectException.cs             |   64 +
 .../Binary/BinaryTypeConfiguration.cs           |  116 +
 .../Binary/BinaryTypeNames.cs                   |  121 +
 .../Apache.Ignite.Core/Binary/IBinarizable.cs   |   39 +
 .../Binary/IBinaryIdMapper.cs                   |   40 +
 .../Binary/IBinaryNameMapper.cs                 |   39 +
 .../Apache.Ignite.Core/Binary/IBinaryObject.cs  |   60 +
 .../Binary/IBinaryObjectBuilder.cs              |  310 ++
 .../Binary/IBinaryRawReader.cs                  |  223 ++
 .../Binary/IBinaryRawWriter.cs                  |  220 ++
 .../Apache.Ignite.Core/Binary/IBinaryReader.cs  |  279 ++
 .../Binary/IBinarySerializer.cs                 |   39 +
 .../Apache.Ignite.Core/Binary/IBinaryType.cs    |   52 +
 .../Apache.Ignite.Core/Binary/IBinaryWriter.cs  |  256 ++
 .../Apache.Ignite.Core/Binary/IIgniteBinary.cs  |  120 +
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |   67 +
 .../Cache/CacheEntryProcessorException.cs       |   79 +
 .../Apache.Ignite.Core/Cache/CacheException.cs  |   68 +
 .../Cache/CachePartialUpdateException.cs        |  119 +
 .../Apache.Ignite.Core/Cache/CachePeekMode.cs   |   68 +
 .../Apache.Ignite.Core/Cache/CacheResult.cs     |   98 +
 .../Cache/Event/CacheEntryEventType.cs          |   41 +
 .../Cache/Event/ICacheEntryEvent.cs             |   45 +
 .../Cache/Event/ICacheEntryEventFilter.cs       |   31 +
 .../Cache/Event/ICacheEntryEventListener.cs     |   33 +
 .../Cache/Expiry/ExpiryPolicy.cs                |   89 +
 .../Cache/Expiry/IExpiryPolicy.cs               |   63 +
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  844 ++++
 .../Apache.Ignite.Core/Cache/ICacheAffinity.cs  |  158 +
 .../Apache.Ignite.Core/Cache/ICacheEntry.cs     |   37 +
 .../Cache/ICacheEntryFilter.cs                  |   34 +
 .../Cache/ICacheEntryProcessor.cs               |   45 +
 .../Cache/ICacheEntryProcessorResult.cs         |   40 +
 .../Apache.Ignite.Core/Cache/ICacheLock.cs      |   58 +
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |  486 +++
 .../Cache/IMutableCacheEntry.cs                 |   47 +
 .../Cache/Query/Continuous/ContinuousQuery.cs   |  170 +
 .../Query/Continuous/IContinuousQueryHandle.cs  |   47 +
 .../Cache/Query/IQueryCursor.cs                 |   44 +
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |   82 +
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |   76 +
 .../Cache/Query/SqlFieldsQuery.cs               |   81 +
 .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs  |  120 +
 .../Apache.Ignite.Core/Cache/Query/TextQuery.cs |  104 +
 .../Store/CacheParallelLoadStoreAdapter.cs      |  207 +
 .../Cache/Store/CacheStoreAdapter.cs            |  146 +
 .../Cache/Store/CacheStoreException.cs          |   66 +
 .../Cache/Store/ICacheStore.cs                  |  184 +
 .../Cache/Store/ICacheStoreSession.cs           |   42 +
 .../Cluster/ClusterGroupEmptyException.cs       |   70 +
 .../Cluster/ClusterTopologyException.cs         |   69 +
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |   79 +
 .../Apache.Ignite.Core/Cluster/IClusterGroup.cs |  235 ++
 .../Cluster/IClusterMetrics.cs                  |  347 ++
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |  135 +
 .../Cluster/IClusterNodeFilter.cs               |   32 +
 .../Common/IgniteException.cs                   |   66 +
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |  132 +
 .../ComputeExecutionRejectedException.cs        |   69 +
 .../Compute/ComputeJobAdapter.cs                |  122 +
 .../Compute/ComputeJobFailoverException.cs      |   72 +
 .../Compute/ComputeJobResultPolicy.cs           |   45 +
 .../Compute/ComputeTaskAdapter.cs               |   95 +
 .../Compute/ComputeTaskCancelledException.cs    |   69 +
 .../ComputeTaskNoResultCacheAttribute.cs        |   35 +
 .../Compute/ComputeTaskSplitAdapter.cs          |   95 +
 .../Compute/ComputeTaskTimeoutException.cs      |   67 +
 .../Compute/ComputeUserUndeclaredException.cs   |   70 +
 .../Apache.Ignite.Core/Compute/ICompute.cs      |  431 ++
 .../Apache.Ignite.Core/Compute/IComputeFunc.cs  |   55 +
 .../Apache.Ignite.Core/Compute/IComputeJob.cs   |   59 +
 .../Compute/IComputeJobResult.cs                |   66 +
 .../Compute/IComputeReducer.cs                  |   41 +
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |  132 +
 .../DataStructures/IAtomicLong.cs               |   84 +
 .../Datastream/IDataStreamer.cs                 |  206 +
 .../Datastream/IStreamReceiver.cs               |   38 +
 .../Datastream/StreamTransformer.cs             |   73 +
 .../Datastream/StreamVisitor.cs                 |   55 +
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |  178 +
 .../Events/CacheQueryExecutedEvent.cs           |   99 +
 .../Events/CacheQueryReadEvent.cs               |  136 +
 .../Events/CacheRebalancingEvent.cs             |  100 +
 .../Events/CheckpointEvent.cs                   |   51 +
 .../Apache.Ignite.Core/Events/DiscoveryEvent.cs |   82 +
 .../Apache.Ignite.Core/Events/EventBase.cs      |  167 +
 .../Apache.Ignite.Core/Events/EventReader.cs    |   72 +
 .../Apache.Ignite.Core/Events/EventType.cs      |  595 +++
 .../dotnet/Apache.Ignite.Core/Events/IEvent.cs  |   74 +
 .../Apache.Ignite.Core/Events/IEventFilter.cs   |   33 +
 .../Apache.Ignite.Core/Events/IEventListener.cs |   34 +
 .../dotnet/Apache.Ignite.Core/Events/IEvents.cs |  259 ++
 .../Apache.Ignite.Core/Events/JobEvent.cs       |  102 +
 .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs |   51 +
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |   93 +
 .../Apache.Ignite.Core/GlobalSuppressions.cs    |  Bin 0 -> 1908 bytes
 .../dotnet/Apache.Ignite.Core/IIgnite.cs        |  168 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  143 +
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |  627 +++
 .../Impl/Binary/BinarizableSerializer.cs        |   45 +
 .../Impl/Binary/BinaryBuilderField.cs           |   89 +
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |  210 +
 .../Impl/Binary/BinaryHandleDictionary.cs       |  188 +
 .../Impl/Binary/BinaryMode.cs                   |   42 +
 .../Impl/Binary/BinaryObject.cs                 |  354 ++
 .../Impl/Binary/BinaryObjectBuilder.cs          | 1137 ++++++
 .../Impl/Binary/BinaryObjectHandle.cs           |   59 +
 .../Impl/Binary/BinaryObjectHeader.cs           |  496 +++
 .../Impl/Binary/BinaryObjectSchema.cs           |   98 +
 .../Impl/Binary/BinaryObjectSchemaField.cs      |   48 +
 .../Impl/Binary/BinaryObjectSchemaHolder.cs     |  107 +
 .../Impl/Binary/BinaryReader.cs                 |  965 +++++
 .../Impl/Binary/BinaryReaderExtensions.cs       |   52 +
 .../Impl/Binary/BinaryReaderHandleDictionary.cs |   42 +
 .../Impl/Binary/BinaryReflectiveActions.cs      |  440 +++
 .../Impl/Binary/BinaryReflectiveSerializer.cs   |  218 ++
 .../Binary/BinarySurrogateTypeDescriptor.cs     |  162 +
 .../Impl/Binary/BinarySystemHandlers.cs         |  832 ++++
 .../Impl/Binary/BinarySystemTypeSerializer.cs   |   62 +
 .../Impl/Binary/BinaryUtils.cs                  | 1839 +++++++++
 .../Impl/Binary/BinaryWriter.cs                 | 1436 +++++++
 .../Impl/Binary/DateTimeHolder.cs               |   68 +
 .../Impl/Binary/IBinarySystemTypeSerializer.cs  |   34 +
 .../Impl/Binary/IBinaryTypeDescriptor.cs        |  133 +
 .../Impl/Binary/IBinaryWriteAware.cs            |   34 +
 .../Impl/Binary/IgniteBinary.cs                 |  192 +
 .../Impl/Binary/Io/BinaryHeapStream.cs          |  452 +++
 .../Impl/Binary/Io/BinaryStreamAdapter.cs       |  114 +
 .../Impl/Binary/Io/BinaryStreamBase.cs          | 1253 ++++++
 .../Impl/Binary/Io/IBinaryStream.cs             |  322 ++
 .../Impl/Binary/Marshaller.cs                   |  537 +++
 .../Impl/Binary/Metadata/BinaryType.cs          |  200 +
 .../Binary/Metadata/BinaryTypeHashsetHandler.cs |   69 +
 .../Impl/Binary/Metadata/BinaryTypeHolder.cs    |  147 +
 .../Impl/Binary/Metadata/IBinaryTypeHandler.cs  |   41 +
 .../Impl/Binary/SerializableObjectHolder.cs     |   73 +
 .../Impl/Binary/Structure/BinaryStructure.cs    |  332 ++
 .../Binary/Structure/BinaryStructureEntry.cs    |  128 +
 .../Structure/BinaryStructureJumpTable.cs       |  118 +
 .../Binary/Structure/BinaryStructureTracker.cs  |  140 +
 .../Binary/Structure/BinaryStructureUpdate.cs   |   84 +
 .../Impl/Binary/TypeResolver.cs                 |  231 ++
 .../Impl/Cache/CacheAffinityImpl.cs             |  275 ++
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |  127 +
 .../Impl/Cache/CacheEntryFilterHolder.cs        |  132 +
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  144 +
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   65 +
 .../Cache/CacheEntryProcessorResultHolder.cs    |  128 +
 .../Impl/Cache/CacheEnumerable.cs               |   82 +
 .../Impl/Cache/CacheEnumerator.cs               |  117 +
 .../Impl/Cache/CacheEnumeratorProxy.cs          |  159 +
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  | 1255 ++++++
 .../Apache.Ignite.Core/Impl/Cache/CacheLock.cs  |  171 +
 .../Impl/Cache/CacheMetricsImpl.cs              |  248 ++
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   64 +
 .../Impl/Cache/Event/CacheEntryCreateEvent.cs   |   80 +
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |   80 +
 .../Impl/Cache/Event/CacheEntryUpdateEvent.cs   |   85 +
 .../Impl/Cache/MutableCacheEntry.cs             |  163 +
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |  264 ++
 .../Query/Continuous/ContinuousQueryFilter.cs   |  125 +
 .../Continuous/ContinuousQueryFilterHolder.cs   |   86 +
 .../Continuous/ContinuousQueryHandleImpl.cs     |  213 +
 .../Query/Continuous/ContinuousQueryUtils.cs    |   96 +
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |   54 +
 .../Impl/Cache/Query/QueryCursor.cs             |   50 +
 .../Impl/Cache/Store/CacheStore.cs              |  263 ++
 .../Impl/Cache/Store/CacheStoreSession.cs       |   53 +
 .../Impl/Cache/Store/CacheStoreSessionProxy.cs  |   63 +
 .../Impl/Cluster/ClusterGroupImpl.cs            |  574 +++
 .../Impl/Cluster/ClusterMetricsImpl.cs          |  294 ++
 .../Impl/Cluster/ClusterNodeImpl.cs             |  222 ++
 .../Impl/Cluster/IClusterGroupEx.cs             |   35 +
 .../Impl/Collections/CollectionExtensions.cs    |   45 +
 .../Impl/Collections/MultiValueDictionary.cs    |  145 +
 .../Impl/Collections/ReadOnlyCollection.cs      |  102 +
 .../Impl/Collections/ReadOnlyDictionary.cs      |  149 +
 .../Apache.Ignite.Core/Impl/Common/Classpath.cs |  159 +
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   72 +
 .../Impl/Common/DelegateConverter.cs            |  269 ++
 .../Impl/Common/DelegateTypeDescriptor.cs       |  340 ++
 .../Apache.Ignite.Core/Impl/Common/Fnv1Hash.cs  |   57 +
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  128 +
 .../Impl/Common/FutureConverter.cs              |   62 +
 .../Impl/Common/FutureType.cs                   |   55 +
 .../Impl/Common/IFutureConverter.cs             |   35 +
 .../Impl/Common/IFutureInternal.cs              |   46 +
 .../Impl/Common/IgniteArgumentCheck.cs          |   77 +
 .../Impl/Common/IgniteHome.cs                   |   97 +
 .../Impl/Common/LoadedAssembliesResolver.cs     |   96 +
 .../Impl/Common/ResizeableArray.cs              |   64 +
 .../Impl/Common/TypeCaster.cs                   |   79 +
 .../Closure/ComputeAbstractClosureTask.cs       |  101 +
 .../Impl/Compute/Closure/ComputeActionJob.cs    |   82 +
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |   86 +
 .../Compute/Closure/ComputeMultiClosureTask.cs  |   56 +
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |   75 +
 .../Closure/ComputeReducingClosureTask.cs       |   61 +
 .../Compute/Closure/ComputeSingleClosureTask.cs |   48 +
 .../Compute/Closure/IComputeResourceInjector.cs |   31 +
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  300 ++
 .../Impl/Compute/ComputeFunc.cs                 |  118 +
 .../Impl/Compute/ComputeImpl.cs                 |  660 ++++
 .../Impl/Compute/ComputeJob.cs                  |  162 +
 .../Impl/Compute/ComputeJobHolder.cs            |  245 ++
 .../Compute/ComputeJobResultGenericWrapper.cs   |   73 +
 .../Impl/Compute/ComputeJobResultImpl.cs        |   99 +
 .../Impl/Compute/ComputeOutFunc.cs              |  122 +
 .../Impl/Compute/ComputeTaskHolder.cs           |  505 +++
 .../Impl/DataStructures/AtomicLong.cs           |  102 +
 .../Impl/Datastream/DataStreamerBatch.cs        |  270 ++
 .../Impl/Datastream/DataStreamerEntry.cs        |   64 +
 .../Impl/Datastream/DataStreamerImpl.cs         |  840 ++++
 .../Impl/Datastream/DataStreamerRemoveEntry.cs  |   48 +
 .../Impl/Datastream/StreamReceiverHolder.cs     |  144 +
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |  650 ++++
 .../Impl/Events/RemoteListenEventFilter.cs      |   84 +
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |  206 +
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   69 +
 .../Impl/Handle/HandleRegistry.cs               |  343 ++
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |   35 +
 .../Apache.Ignite.Core/Impl/IInteropCallback.cs |   34 +
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  529 +++
 .../Impl/IgniteConfigurationEx.cs               |   57 +
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |  286 ++
 .../Apache.Ignite.Core/Impl/IgniteProxy.cs      |  343 ++
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  418 ++
 .../Impl/InteropExceptionHolder.cs              |   85 +
 .../Impl/LifecycleBeanHolder.cs                 |   66 +
 .../Impl/Memory/IPlatformMemory.cs              |   65 +
 .../Impl/Memory/InteropExternalMemory.cs        |   46 +
 .../Impl/Memory/InteropMemoryUtils.cs           |   38 +
 .../Memory/PlatformBigEndianMemoryStream.cs     |  483 +++
 .../Impl/Memory/PlatformMemory.cs               |   78 +
 .../Impl/Memory/PlatformMemoryManager.cs        |  107 +
 .../Impl/Memory/PlatformMemoryPool.cs           |  106 +
 .../Impl/Memory/PlatformMemoryStream.cs         |  727 ++++
 .../Impl/Memory/PlatformMemoryUtils.cs          |  465 +++
 .../Impl/Memory/PlatformPooledMemory.cs         |   66 +
 .../Impl/Memory/PlatformRawMemory.cs            |   89 +
 .../Impl/Memory/PlatformUnpooledMemory.cs       |   52 +
 .../Impl/Messaging/MessageListenerHolder.cs     |  177 +
 .../Impl/Messaging/Messaging.cs                 |  289 ++
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   47 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  737 ++++
 .../Impl/Resource/IResourceInjector.cs          |   27 +
 .../Impl/Resource/ResourceFieldInjector.cs      |   47 +
 .../Impl/Resource/ResourceMethodInjector.cs     |   48 +
 .../Impl/Resource/ResourceProcessor.cs          |  105 +
 .../Impl/Resource/ResourcePropertyInjector.cs   |   47 +
 .../Impl/Resource/ResourceTypeDescriptor.cs     |  291 ++
 .../Impl/Services/ServiceContext.cs             |   60 +
 .../Impl/Services/ServiceDescriptor.cs          |  106 +
 .../Impl/Services/ServiceProxy.cs               |   71 +
 .../Impl/Services/ServiceProxyInvoker.cs        |  141 +
 .../Impl/Services/ServiceProxySerializer.cs     |  140 +
 .../Impl/Services/Services.cs                   |  372 ++
 .../Impl/Transactions/Transaction.cs            |  146 +
 .../Impl/Transactions/TransactionImpl.cs        |  482 +++
 .../Impl/Transactions/TransactionMetricsImpl.cs |   68 +
 .../Impl/Transactions/TransactionsImpl.cs       |  201 +
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |   42 +
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |   99 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        | 1164 ++++++
 .../Impl/Unmanaged/UnmanagedContext.cs          |   53 +
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |   70 +
 .../Impl/Unmanaged/UnmanagedTarget.cs           |   77 +
 .../Impl/Unmanaged/UnmanagedUtils.cs            | 1371 +++++++
 .../Lifecycle/ILifecycleBean.cs                 |   64 +
 .../Lifecycle/LifecycleEventType.cs             |   49 +
 .../Messaging/IMessageListener.cs               |   38 +
 .../Apache.Ignite.Core/Messaging/IMessaging.cs  |  128 +
 .../Properties/AssemblyInfo.cs                  |   46 +
 .../Resource/InstanceResourceAttribute.cs       |   35 +
 .../Resource/StoreSessionResourceAttribute.cs   |   32 +
 .../Apache.Ignite.Core/Services/IService.cs     |   51 +
 .../Services/IServiceContext.cs                 |   69 +
 .../Services/IServiceDescriptor.cs              |   96 +
 .../Apache.Ignite.Core/Services/IServices.cs    |  256 ++
 .../Services/ServiceConfiguration.cs            |   62 +
 .../Services/ServiceInvocationException.cs      |  101 +
 .../Transactions/ITransaction.cs                |  238 ++
 .../Transactions/ITransactionMetrics.cs         |   47 +
 .../Transactions/ITransactions.cs               |   76 +
 .../Transactions/TransactionConcurrency.cs      |   36 +
 .../TransactionHeuristicException.cs            |   72 +
 .../Transactions/TransactionIsolation.cs        |   41 +
 .../TransactionOptimisticException.cs           |   69 +
 .../TransactionRollbackException.cs             |   68 +
 .../Transactions/TransactionState.cs            |   70 +
 .../Transactions/TransactionTimeoutException.cs |   69 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    |  117 +
 modules/platforms/dotnet/Apache.Ignite.sln      |  109 +
 .../dotnet/Apache.Ignite.sln.DotSettings        |    4 +
 modules/platforms/dotnet/Apache.Ignite.slnrel   |   43 +
 .../dotnet/Apache.Ignite/Apache.Ignite.csproj   |   85 +
 .../dotnet/Apache.Ignite/Apache.Ignite.snk      |  Bin 0 -> 596 bytes
 .../platforms/dotnet/Apache.Ignite/App.config   |   56 +
 .../Config/AppSettingsConfigurator.cs           |  113 +
 .../Apache.Ignite/Config/ArgsConfigurator.cs    |  164 +
 .../Apache.Ignite/Config/ConfigValueParser.cs   |   42 +
 .../Apache.Ignite/Config/IConfigurator.cs       |   34 +
 .../dotnet/Apache.Ignite/IgniteRunner.cs        |  171 +
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   35 +
 .../Apache.Ignite/Service/IgniteService.cs      |  219 ++
 .../Apache.Ignite/Service/NativeMethods.cs      |   57 +
 .../Apache.Ignite/Service/ServiceDescription.cs |   32 +
 .../platforms/dotnet/Apache.Ignite_x86.slnrel   |   43 +
 modules/platforms/dotnet/README.txt             |   24 +
 .../dotnet/examples/Apache.Ignite.Examples.sln  |   38 +
 .../Apache.Ignite.Examples.csproj               |   90 +
 .../Apache.Ignite.Examples.snk                  |  Bin 0 -> 596 bytes
 .../examples/Apache.Ignite.Examples/App.config  |   24 +
 .../Compute/ClosureExample.cs                   |   84 +
 .../Compute/TaskExample.cs                      |  141 +
 .../Datagrid/ContinuousQueryExample.cs          |  103 +
 .../Datagrid/CrossPlatformExample.cs            |  205 +
 .../Datagrid/DataStreamerExample.cs             |  102 +
 .../Datagrid/PutGetExample.cs                   |  219 ++
 .../Datagrid/QueryExample.cs                    |  227 ++
 .../Datagrid/StoreExample.cs                    |  115 +
 .../Datagrid/TransactionExample.cs              |  105 +
 .../Events/EventsExample.cs                     |  104 +
 .../Messaging/MessagingExample.cs               |  112 +
 .../Misc/LifecycleExample.cs                    |  109 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Services/IMapService.cs                     |   56 +
 .../Services/ServicesExample.cs                 |   77 +
 .../Apache.Ignite.ExamplesDll.csproj            |   84 +
 .../Apache.Ignite.ExamplesDll.snk               |  Bin 0 -> 596 bytes
 .../Apache.Ignite.ExamplesDll/Binary/Account.cs |   60 +
 .../Apache.Ignite.ExamplesDll/Binary/Address.cs |   81 +
 .../Binary/Employee.cs                          |   93 +
 .../Binary/EmployeeKey.cs                       |   86 +
 .../Binary/Organization.cs                      |   84 +
 .../Binary/OrganizationType.cs                  |   43 +
 .../Compute/AverageSalaryJob.cs                 |   66 +
 .../Compute/AverageSalaryTask.cs                |   85 +
 .../Compute/CharacterCountClosure.cs            |   43 +
 .../Compute/CharacterCountReducer.cs            |   51 +
 .../Datagrid/ContinuousQueryFilter.cs           |   50 +
 .../Datagrid/EmployeeStore.cs                   |  122 +
 .../Datagrid/EmployeeStorePredicate.cs          |   41 +
 .../Events/LocalListener.cs                     |   54 +
 .../Messaging/LocalListener.cs                  |   59 +
 .../Messaging/RemoteOrderedListener.cs          |   54 +
 .../Messaging/RemoteUnorderedListener.cs        |   54 +
 .../Messaging/Topic.cs                          |   28 +
 .../Properties/AssemblyInfo.cs                  |   35 +
 .../Services/MapService.cs                      |  119 +
 .../examples/Config/example-cache-query.xml     |  111 +
 .../examples/Config/example-cache-store.xml     |   59 +
 .../dotnet/examples/Config/example-cache.xml    |   80 +
 .../dotnet/examples/Config/example-compute.xml  |   70 +
 modules/platforms/dotnet/examples/README.txt    |   14 +
 modules/platforms/licenses/apache-2.0.txt       |  202 +
 modules/schema-import/README.txt                |  176 +-
 .../ignite/schema/generator/CodeGenerator.java  |  281 +-
 .../ignite/schema/generator/XmlGenerator.java   |  101 +-
 .../apache/ignite/schema/model/IndexItem.java   |   54 -
 .../ignite/schema/model/PojoDescriptor.java     |   72 +-
 .../ignite/schema/model/SchemaDescriptor.java   |    6 +-
 .../schema/parser/DatabaseMetadataParser.java   |   12 +-
 .../apache/ignite/schema/parser/DbTable.java    |   37 +-
 .../parser/dialect/DatabaseMetadataDialect.java |   32 +-
 .../parser/dialect/JdbcMetadataDialect.java     |   22 +-
 .../parser/dialect/OracleMetadataDialect.java   |   24 +-
 .../apache/ignite/schema/ui/ModalDialog.java    |    6 +-
 .../ignite/schema/ui/SchemaImportApp.java       |   13 +-
 .../schema/test/AbstractSchemaImportTest.java   |    4 +-
 .../schema/test/model/ignite-type-metadata.xml  |  610 +--
 .../org/apache/ignite/IgniteSpringBean.java     |    7 +
 modules/yardstick/config/ignite-base-config.xml |   37 +-
 .../yardstick/config/ignite-store-config.xml    |   50 +-
 .../cache/IgniteSqlQueryPutBenchmark.java       |    5 +
 .../IgniteAtomicInvokeRetryBenchmark.java       |    2 +-
 .../failover/IgniteConsistencyException.java    |   64 +
 ...IgniteTransactionalInvokeRetryBenchmark.java |    2 +-
 ...IgniteTransactionalWriteInvokeBenchmark.java |  135 +-
 .../IgniteTransactionalWriteReadBenchmark.java  |    2 +-
 .../yardstick/cache/model/Organization.java     |   19 +-
 .../ignite/yardstick/cache/model/Person.java    |   24 +-
 .../ignite/yardstick/cache/model/SampleKey.java |   16 +-
 .../yardstick/cache/model/SampleValue.java      |   16 +-
 parent/pom.xml                                  |   34 +-
 pom.xml                                         |   11 -
 1809 files changed, 178079 insertions(+), 142610 deletions(-)
----------------------------------------------------------------------



[08/50] [abbrv] ignite git commit: IGNITE-1970: Binaries: simplified header reading.

Posted by sb...@apache.org.
IGNITE-1970: Binaries: simplified header reading.


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

Branch: refs/heads/master
Commit: f37863a43bceebcc38af750c403efb35955b70df
Parents: 9c71785
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Nov 20 15:19:00 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Nov 20 15:19:00 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryReaderExImpl.java   | 65 ++++++++++++--------
 1 file changed, 38 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f37863a4/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
index 356aaae..5d31670 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java
@@ -28,7 +28,6 @@ import org.apache.ignite.internal.portable.streams.PortableInputStream;
 import org.apache.ignite.internal.util.lang.GridMapEntry;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -186,47 +185,59 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
         start = in.position();
 
-        // Parse header if possible.
-        byte hdr = in.readBytePositioned(start);
+        byte hdr = in.readByte();
 
+        // Perform full header parsing in case of portable object.
         if (hdr == GridPortableMarshaller.OBJ) {
-            // Skip header.
-            in.readByte();
-
             // Ensure protocol is fine.
             PortableUtils.checkProtocolVersion(in.readByte());
 
-            // Read and parse flags.
+            // Read header content.
             short flags = in.readShort();
+            int typeId0 = in.readInt();
 
-            userType = PortableUtils.isUserType(flags);
+            in.readInt(); // Skip hash code.
 
+            int len = in.readInt();
+            schemaId = in.readInt();
+            int offset = in.readInt();
+
+            // Get trivial flag values.
+            userType = PortableUtils.isUserType(flags);
             fieldIdLen = PortableUtils.fieldIdLength(flags);
             fieldOffsetLen = PortableUtils.fieldOffsetLength(flags);
 
-            int typeId0 = in.readIntPositioned(start + GridPortableMarshaller.TYPE_ID_POS);
+            // Calculate footer borders and raw offset.
+            if (PortableUtils.hasSchema(flags)) {
+                // Schema exists.
+                footerStart = start + offset;
 
-            IgniteBiTuple<Integer, Integer> footer = PortableUtils.footerAbsolute(in, start);
-
-            footerStart = footer.get1();
-            footerLen = footer.get2() - footerStart;
-
-            schemaId = in.readIntPositioned(start + GridPortableMarshaller.SCHEMA_ID_POS);
+                if (PortableUtils.hasRaw(flags)) {
+                    footerLen = len - offset - 4;
+                    rawOff = start + in.readIntPositioned(start + len - 4);
+                }
+                else {
+                    footerLen = len - offset;
+                    rawOff = start + len;
+                }
+            }
+            else {
+                // No schema.
+                footerStart = start + len;
+                footerLen = 0;
 
-            rawOff = PortableUtils.rawOffsetAbsolute(in, start);
+                if (PortableUtils.hasRaw(flags))
+                    rawOff = start + offset;
+                else
+                    rawOff = start + len;
+            }
 
+            // Finally, we have to resolve real type ID.
             if (typeId0 == UNREGISTERED_TYPE_ID) {
-                // Skip to the class name position.
-                in.position(start + GridPortableMarshaller.DFLT_HDR_LEN);
-
                 int off = in.position();
 
-                Class cls = doReadClass(typeId0);
-
-                // registers class by typeId, at least locally if the cache is not ready yet.
-                PortableClassDescriptor desc = ctx.descriptorForClass(cls);
-
-                typeId = desc.typeId();
+                // Registers class by type ID, at least locally if the cache is not ready yet.
+                typeId = ctx.descriptorForClass(doReadClass(typeId0)).typeId();
 
                 int clsNameLen = in.position() - off;
 
@@ -240,8 +251,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
 
             idMapper = userType ? ctx.userTypeIdMapper(typeId) : null;
             schema = PortableUtils.hasSchema(flags) ? getOrCreateSchema() : null;
-
-            in.position(start);
         }
         else {
             typeId = 0;
@@ -256,6 +265,8 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje
             fieldOffsetLen = 0;
             schema = null;
         }
+
+        in.position(start);
     }
 
     /**