ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: IGNITE-1398: Implemented.
Date Thu, 10 Sep 2015 13:44:23 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1398 [created] b259184a4


IGNITE-1398: Implemented.


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

Branch: refs/heads/ignite-1398
Commit: b259184a4105cff06ea01193f0e67c83014c6302
Parents: 836283d
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Sep 10 16:44:42 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Sep 10 16:44:42 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/PortableContext.java      |   7 -
 .../dotnet/PlatformDotNetConfiguration.java     | 119 ---------
 .../PlatformDotNetPortableConfiguration.java    | 228 -----------------
 ...PlatformDotNetPortableTypeConfiguration.java | 248 -------------------
 .../Apache.Ignite.Core.csproj                   |   3 -
 .../main/dotnet/Apache.Ignite.Core/Ignition.cs  |  21 +-
 .../Impl/Interop/InteropDotNetConfiguration.cs  |  62 -----
 .../InteropDotNetPortableConfiguration.cs       | 127 ----------
 .../InteropDotNetPortableTypeConfiguration.cs   | 151 -----------
 .../Impl/Portable/PortableMarshaller.cs         |   4 -
 .../Impl/Portable/PortableUtils.cs              |  91 +++++++
 .../PlatformDotNetConfigurationClosure.java     |   2 +-
 .../platform/utils/PlatformUtils.java           |  60 ++++-
 .../dotnet/PlatformDotNetConfiguration.java     |  97 ++++++++
 .../PlatformDotNetPortableConfiguration.java    | 196 +++++++++++++++
 ...PlatformDotNetPortableTypeConfiguration.java | 214 ++++++++++++++++
 16 files changed, 664 insertions(+), 966 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 52df2a0..33a105b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -61,9 +61,6 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.marshaller.MarshallerContext;
 import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
 import org.apache.ignite.marshaller.portable.PortableMarshaller;
-import org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration;
-import org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration;
-import org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration;
 import org.apache.ignite.portable.PortableException;
 import org.apache.ignite.portable.PortableIdMapper;
 import org.apache.ignite.portable.PortableInvalidClassException;
@@ -242,10 +239,6 @@ public class PortableContext implements Externalizable {
 
         registerPredefinedType(PortableObjectImpl.class, 200);
         registerPredefinedType(PortableMetaDataImpl.class, 201);
-
-        registerPredefinedType(PlatformDotNetConfiguration.class, 202);
-        registerPredefinedType(PlatformDotNetPortableConfiguration.class, 203);
-        registerPredefinedType(PlatformDotNetPortableTypeConfiguration.class, 204);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java
deleted file mode 100644
index 80f4b26..0000000
--- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java
+++ /dev/null
@@ -1,119 +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.platform.dotnet;
-
-import org.apache.ignite.configuration.PlatformConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.portable.PortableException;
-import org.apache.ignite.portable.PortableMarshalAware;
-import org.apache.ignite.portable.PortableRawReader;
-import org.apache.ignite.portable.PortableRawWriter;
-import org.apache.ignite.portable.PortableReader;
-import org.apache.ignite.portable.PortableWriter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Mirror of .Net class Configuration.cs
- */
-public class PlatformDotNetConfiguration implements PlatformConfiguration, PortableMarshalAware {
-    /** */
-    private PlatformDotNetPortableConfiguration portableCfg;
-
-    /** */
-    private List<String> assemblies;
-
-    /**
-     * Default constructor.
-     */
-    public PlatformDotNetConfiguration() {
-        // No-op.
-    }
-
-    /**
-     * Copy constructor.
-     *
-     * @param cfg Configuration to copy.
-     */
-    public PlatformDotNetConfiguration(PlatformDotNetConfiguration cfg) {
-        if (cfg.getPortableConfiguration() != null)
-            portableCfg = new PlatformDotNetPortableConfiguration(cfg.getPortableConfiguration());
-
-        if (cfg.getAssemblies() != null)
-            assemblies = new ArrayList<>(cfg.getAssemblies());
-    }
-
-    /**
-     * @return Configuration.
-     */
-    public PlatformDotNetPortableConfiguration getPortableConfiguration() {
-        return portableCfg;
-    }
-
-    /**
-     * @param portableCfg Configuration.
-     */
-    public void setPortableConfiguration(PlatformDotNetPortableConfiguration portableCfg) {
-        this.portableCfg = portableCfg;
-    }
-
-    /**
-     * @return Assemblies.
-     */
-    public List<String> getAssemblies() {
-        return assemblies;
-    }
-
-    /**
-     *
-     * @param assemblies Assemblies.
-     */
-    public void setAssemblies(List<String> assemblies) {
-        this.assemblies = assemblies;
-    }
-
-    /**
-     * @return Configuration copy.
-     */
-    @SuppressWarnings("UnusedDeclaration")
-    private PlatformDotNetConfiguration copy() {
-        return new PlatformDotNetConfiguration(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter rawWriter = writer.rawWriter();
-
-        rawWriter.writeObject(portableCfg);
-        rawWriter.writeCollection(assemblies);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader rawReader = reader.rawReader();
-
-        portableCfg = rawReader.readObject();
-        assemblies = (List<String>)rawReader.<String>readCollection();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(PlatformDotNetConfiguration.class, this);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java
deleted file mode 100644
index 644a8e6..0000000
--- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java
+++ /dev/null
@@ -1,228 +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.platform.dotnet;
-
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.portable.PortableException;
-import org.apache.ignite.portable.PortableMarshalAware;
-import org.apache.ignite.portable.PortableRawReader;
-import org.apache.ignite.portable.PortableRawWriter;
-import org.apache.ignite.portable.PortableReader;
-import org.apache.ignite.portable.PortableWriter;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * Mirror of .Net class PortableConfiguration.cs
- */
-public class PlatformDotNetPortableConfiguration implements PortableMarshalAware {
-    /** Type cfgs. */
-    private Collection<PlatformDotNetPortableTypeConfiguration> typesCfg;
-
-    /** Types. */
-    private Collection<String> types;
-
-    /** Default name mapper. */
-    private String dfltNameMapper;
-
-    /** Default id mapper. */
-    private String dfltIdMapper;
-
-    /** Default serializer. */
-    private String dfltSerializer;
-
-    /** Default metadata enabled. */
-    private boolean dfltMetadataEnabled = true;
-
-    /** Whether to cache deserialized value in IGridPortableObject */
-    private boolean dfltKeepDeserialized = true;
-
-    /**
-     * Default constructor.
-     */
-    public PlatformDotNetPortableConfiguration() {
-        // No-op.
-    }
-
-    /**
-     * Copy constructor.
-     * @param cfg configuration to copy.
-     */
-    public PlatformDotNetPortableConfiguration(PlatformDotNetPortableConfiguration cfg) {
-        if (cfg.getTypesConfiguration() != null) {
-            typesCfg = new ArrayList<>();
-
-            for (PlatformDotNetPortableTypeConfiguration typeCfg : cfg.getTypesConfiguration())
-                typesCfg.add(new PlatformDotNetPortableTypeConfiguration(typeCfg));
-        }
-
-        if (cfg.getTypes() != null)
-            types = new ArrayList<>(cfg.getTypes());
-
-        dfltNameMapper = cfg.getDefaultNameMapper();
-        dfltIdMapper = cfg.getDefaultIdMapper();
-        dfltSerializer = cfg.getDefaultSerializer();
-        dfltMetadataEnabled = cfg.isDefaultMetadataEnabled();
-        dfltKeepDeserialized = cfg.isDefaultKeepDeserialized();
-    }
-
-    /**
-     * @return Type cfgs.
-     */
-    public Collection<PlatformDotNetPortableTypeConfiguration> getTypesConfiguration() {
-        return typesCfg;
-    }
-
-    /**
-     * @param typesCfg New type cfgs.
-     */
-    public void setTypesConfiguration(Collection<PlatformDotNetPortableTypeConfiguration> typesCfg) {
-        this.typesCfg = typesCfg;
-    }
-
-    /**
-     * @return Types.
-     */
-    public Collection<String> getTypes() {
-        return types;
-    }
-
-    /**
-     * @param types New types.
-     */
-    public void setTypes(Collection<String> types) {
-        this.types = types;
-    }
-
-    /**
-     * @return Default name mapper.
-     */
-    public String getDefaultNameMapper() {
-        return dfltNameMapper;
-    }
-
-    /**
-     * @param dfltNameMapper New default name mapper.
-     */
-    public void setDefaultNameMapper(String dfltNameMapper) {
-        this.dfltNameMapper = dfltNameMapper;
-    }
-
-    /**
-     * @return Default id mapper.
-     */
-    public String getDefaultIdMapper() {
-        return dfltIdMapper;
-    }
-
-    /**
-     * @param dfltIdMapper New default id mapper.
-     */
-    public void setDefaultIdMapper(String dfltIdMapper) {
-        this.dfltIdMapper = dfltIdMapper;
-    }
-
-    /**
-     * @return Default serializer.
-     */
-    public String getDefaultSerializer() {
-        return dfltSerializer;
-    }
-
-    /**
-     * @param dfltSerializer New default serializer.
-     */
-    public void setDefaultSerializer(String dfltSerializer) {
-        this.dfltSerializer = dfltSerializer;
-    }
-
-    /**
-     * Gets default metadata enabled flag. See {@link #setDefaultMetadataEnabled(boolean)} for more information.
-     *
-     * @return Default metadata enabled flag.
-     */
-    public boolean isDefaultMetadataEnabled() {
-        return dfltMetadataEnabled;
-    }
-
-    /**
-     * Sets default metadata enabled flag. When set to {@code true} all portable types will save it's metadata to
-     * cluster.
-     * <p />
-     * Can be overridden for particular type using
-     * {@link PlatformDotNetPortableTypeConfiguration#setMetadataEnabled(Boolean)}.
-     *
-     * @param dfltMetadataEnabled Default metadata enabled flag.
-     */
-    public void setDefaultMetadataEnabled(boolean dfltMetadataEnabled) {
-        this.dfltMetadataEnabled = dfltMetadataEnabled;
-    }
-
-    /**
-     * Gets default keep deserialized flag. See {@link #setDefaultKeepDeserialized(boolean)} for more information.
-     *
-     * @return  Flag indicates whether to cache deserialized value in IGridPortableObject.
-     */
-    public boolean isDefaultKeepDeserialized() {
-        return dfltKeepDeserialized;
-    }
-
-    /**
-     * Sets default keep deserialized flag.
-     * <p />
-     * Can be overridden for particular type using
-     * {@link PlatformDotNetPortableTypeConfiguration#setKeepDeserialized(Boolean)}.
-     *
-     * @param keepDeserialized Keep deserialized flag.
-     */
-    public void setDefaultKeepDeserialized(boolean keepDeserialized) {
-        this.dfltKeepDeserialized = keepDeserialized;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter rawWriter = writer.rawWriter();
-
-        rawWriter.writeCollection(typesCfg);
-        rawWriter.writeCollection(types);
-        rawWriter.writeString(dfltNameMapper);
-        rawWriter.writeString(dfltIdMapper);
-        rawWriter.writeString(dfltSerializer);
-        rawWriter.writeBoolean(dfltMetadataEnabled);
-        rawWriter.writeBoolean(dfltKeepDeserialized);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader rawReader = reader.rawReader();
-
-        typesCfg = rawReader.readCollection();
-        types = rawReader.readCollection();
-        dfltNameMapper = rawReader.readString();
-        dfltIdMapper = rawReader.readString();
-        dfltSerializer = rawReader.readString();
-        dfltMetadataEnabled = rawReader.readBoolean();
-        dfltKeepDeserialized = rawReader.readBoolean();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(PlatformDotNetPortableConfiguration.class, this);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java
deleted file mode 100644
index b6fdbde..0000000
--- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java
+++ /dev/null
@@ -1,248 +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.platform.dotnet;
-
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.portable.PortableException;
-import org.apache.ignite.portable.PortableMarshalAware;
-import org.apache.ignite.portable.PortableRawReader;
-import org.apache.ignite.portable.PortableRawWriter;
-import org.apache.ignite.portable.PortableReader;
-import org.apache.ignite.portable.PortableWriter;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Mirror of .Net class GridDotNetPortableTypeConfiguration.cs
- */
-public class PlatformDotNetPortableTypeConfiguration implements PortableMarshalAware {
-    /** Assembly name. */
-    private String assemblyName;
-
-    /** Type name. */
-    private String typeName;
-
-    /** Name mapper. */
-    private String nameMapper;
-
-    /** Id mapper. */
-    private String idMapper;
-
-    /** Serializer. */
-    private String serializer;
-
-    /** Affinity key field name. */
-    private String affinityKeyFieldName;
-
-    /** Metadata enabled. */
-    private Boolean metadataEnabled;
-
-    /** Whether to cache deserialized value in IGridPortableObject. */
-    private Boolean keepDeserialized;
-
-    /**
-     * Default constructor.
-     */
-    public PlatformDotNetPortableTypeConfiguration() {
-        // No-op.
-    }
-
-    /**
-     * Copy constructor.
-     * @param cfg configuration to copy.
-     */
-    public PlatformDotNetPortableTypeConfiguration(PlatformDotNetPortableTypeConfiguration cfg) {
-        assemblyName = cfg.getAssemblyName();
-        typeName = cfg.getTypeName();
-        nameMapper = cfg.getNameMapper();
-        idMapper = cfg.getIdMapper();
-        serializer = cfg.getSerializer();
-        affinityKeyFieldName = cfg.getAffinityKeyFieldName();
-        metadataEnabled = cfg.getMetadataEnabled();
-        keepDeserialized = cfg.isKeepDeserialized();
-    }
-
-    /**
-     * @return Assembly name.
-     */
-    public String getAssemblyName() {
-        return assemblyName;
-    }
-
-    /**
-     * @param assemblyName New assembly name.
-     */
-    public void setAssemblyName(String assemblyName) {
-        this.assemblyName = assemblyName;
-    }
-
-    /**
-     * @return Type name.
-     */
-    public String getTypeName() {
-        return typeName;
-    }
-
-    /**
-     * @param typeName New type name.
-     */
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-
-    /**
-     * @return Name mapper.
-     */
-    public String getNameMapper() {
-        return nameMapper;
-    }
-
-    /**
-     * @param nameMapper New name mapper.
-     */
-    public void setNameMapper(String nameMapper) {
-        this.nameMapper = nameMapper;
-    }
-
-    /**
-     * @return Id mapper.
-     */
-    public String getIdMapper() {
-        return idMapper;
-    }
-
-    /**
-     * @param idMapper New id mapper.
-     */
-    public void setIdMapper(String idMapper) {
-        this.idMapper = idMapper;
-    }
-
-    /**
-     * @return Serializer.
-     */
-    public String getSerializer() {
-        return serializer;
-    }
-
-    /**
-     * @param serializer New serializer.
-     */
-    public void setSerializer(String serializer) {
-        this.serializer = serializer;
-    }
-
-    /**
-     * Gets metadata enabled flag. See {@link #setMetadataEnabled(Boolean)} for more information.
-     *
-     * @return Metadata enabled flag.
-     */
-    public Boolean getMetadataEnabled() {
-        return metadataEnabled;
-    }
-
-    /**
-     * Sets metadata enabled flag.
-     * <p />
-     * When set to {@code null} default value taken from
-     * {@link PlatformDotNetPortableConfiguration#isDefaultMetadataEnabled()} will be used.
-     *
-     * @param metadataEnabled New metadata enabled.
-     */
-    public void setMetadataEnabled(Boolean metadataEnabled) {
-        this.metadataEnabled = metadataEnabled;
-    }
-
-    /**
-     * @return Affinity key field name.
-     */
-    public String getAffinityKeyFieldName() {
-        return affinityKeyFieldName;
-    }
-
-    /**
-     * @param affinityKeyFieldName Affinity key field name.
-     */
-    public void setAffinityKeyFieldName(String affinityKeyFieldName) {
-        this.affinityKeyFieldName = affinityKeyFieldName;
-    }
-
-    /**
-     * Gets keep deserialized flag.
-     *
-     * @return Flag indicates whether to cache deserialized value in IGridPortableObject.
-     * @deprecated Use {@link #getKeepDeserialized()} instead.
-     */
-    @Deprecated
-    @Nullable public Boolean isKeepDeserialized() {
-        return keepDeserialized;
-    }
-
-    /**
-     * Gets keep deserialized flag. See {@link #setKeepDeserialized(Boolean)} for more information.
-     *
-     * @return Flag indicates whether to cache deserialized value in IGridPortableObject.
-     */
-    @Nullable public Boolean getKeepDeserialized() {
-        return keepDeserialized;
-    }
-
-    /**
-     * Sets keep deserialized flag.
-     * <p />
-     * When set to {@code null} default value taken from
-     * {@link PlatformDotNetPortableConfiguration#isDefaultKeepDeserialized()} will be used.
-     *
-     * @param keepDeserialized Keep deserialized flag.
-     */
-    public void setKeepDeserialized(@Nullable Boolean keepDeserialized) {
-        this.keepDeserialized = keepDeserialized;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter rawWriter = writer.rawWriter();
-
-        rawWriter.writeString(assemblyName);
-        rawWriter.writeString(typeName);
-        rawWriter.writeString(nameMapper);
-        rawWriter.writeString(idMapper);
-        rawWriter.writeString(serializer);
-        rawWriter.writeString(affinityKeyFieldName);
-        rawWriter.writeObject(metadataEnabled);
-        rawWriter.writeObject(keepDeserialized);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader rawReader = reader.rawReader();
-
-        assemblyName = rawReader.readString();
-        typeName = rawReader.readString();
-        nameMapper = rawReader.readString();
-        idMapper = rawReader.readString();
-        serializer = rawReader.readString();
-        affinityKeyFieldName = rawReader.readString();
-        metadataEnabled = rawReader.readObject();
-        keepDeserialized = rawReader.readObject();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(PlatformDotNetPortableTypeConfiguration.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 6a32729..3f20324 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -220,9 +220,6 @@
     <Compile Include="Impl\Handle\IHandle.cs" />
     <Compile Include="Impl\IInteropCallback.cs" />
     <Compile Include="Impl\InteropExceptionHolder.cs" />
-    <Compile Include="Impl\Interop\InteropDotNetConfiguration.cs" />
-    <Compile Include="Impl\Interop\InteropDotNetPortableConfiguration.cs" />
-    <Compile Include="Impl\Interop\InteropDotNetPortableTypeConfiguration.cs" />
     <Compile Include="Impl\LifecycleBeanHolder.cs" />
     <Compile Include="Impl\Memory\InteropExternalMemory.cs" />
     <Compile Include="Impl\Memory\InteropMemoryUtils.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Ignition.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Ignition.cs
index c9de62a..96d002f 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+using Apache.Ignite.Core.Portable;
+
 namespace Apache.Ignite.Core 
 {
     using System;
@@ -29,7 +31,6 @@ namespace Apache.Ignite.Core
     using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.Impl.Common;
     using Apache.Ignite.Core.Impl.Handle;
-    using Apache.Ignite.Core.Impl.Interop;
     using Apache.Ignite.Core.Impl.Memory;
     using Apache.Ignite.Core.Impl.Portable;
     using Apache.Ignite.Core.Impl.Portable.IO;
@@ -256,7 +257,7 @@ namespace Apache.Ignite.Core
             {
                 PortableReaderImpl reader = PU.Marshaller.StartUnmarshal(inStream);
 
-                PrepareConfiguration(reader.ReadObject<InteropDotNetConfiguration>());
+                PrepareConfiguration(reader);
 
                 PrepareLifecycleBeans(reader, outStream, handleRegistry);
             }
@@ -271,20 +272,24 @@ namespace Apache.Ignite.Core
         /// <summary>
         /// Preapare configuration.
         /// </summary>
-        /// <param name="dotNetCfg">Dot net configuration.</param>
-        private static void PrepareConfiguration(InteropDotNetConfiguration dotNetCfg)
+        /// <param name="reader">Reader.</param>
+        private static void PrepareConfiguration(PortableReaderImpl reader)
         {
             // 1. Load assemblies.
             IgniteConfiguration cfg = _startup.Configuration;
 
             LoadAssemblies(cfg.Assemblies);
 
-            if (dotNetCfg != null)
-                LoadAssemblies(dotNetCfg.Assemblies);
+            ICollection<string> cfgAssembllies;
+            PortableConfiguration portableCfg;
+
+            PortableUtils.ReadConfiguration(reader, out cfgAssembllies, out portableCfg);
+
+            LoadAssemblies(cfgAssembllies);
 
             // 2. Create marshaller only after assemblies are loaded.
-            if (cfg.PortableConfiguration == null && dotNetCfg != null && dotNetCfg.PortableCfg != null)
-                cfg.PortableConfiguration = dotNetCfg.PortableCfg.ToPortableConfiguration();
+            if (cfg.PortableConfiguration == null)
+                cfg.PortableConfiguration = portableCfg;
 
             _startup.Marshaller = new PortableMarshaller(cfg.PortableConfiguration);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetConfiguration.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetConfiguration.cs
deleted file mode 100644
index 2dffd28..0000000
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetConfiguration.cs
+++ /dev/null
@@ -1,62 +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.
- */
-
-namespace Apache.Ignite.Core.Impl.Interop
-{
-    using System.Collections.Generic;
-    using Apache.Ignite.Core.Impl.Portable;
-    using Apache.Ignite.Core.Portable;
-
-    /// <summary>
-    /// .Net configuration as defined in Java configuration file.
-    /// </summary>
-    internal class InteropDotNetConfiguration : IPortableWriteAware
-    {
-        /// <summary>
-        /// Portable configuration.
-        /// </summary>
-        public InteropDotNetPortableConfiguration PortableCfg { get; set; }
-
-        /// <summary>
-        /// Assemblies to load.
-        /// </summary>
-        public IList<string> Assemblies { get; set; }
-
-        /** {@inheritDoc} */
-        public void WritePortable(IPortableWriter writer)
-        {
-            IPortableRawWriter rawWriter = writer.RawWriter();
-
-            rawWriter.WriteObject(PortableCfg);
-
-            rawWriter.WriteGenericCollection(Assemblies);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="InteropDotNetConfiguration"/> class.
-        /// </summary>
-        /// <param name="reader">The reader.</param>
-        public InteropDotNetConfiguration(IPortableReader reader)
-        {
-            IPortableRawReader rawReader = reader.RawReader();
-
-            PortableCfg = rawReader.ReadObject<InteropDotNetPortableConfiguration>();
-
-            Assemblies = (List<string>) rawReader.ReadGenericCollection<string>();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableConfiguration.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableConfiguration.cs
deleted file mode 100644
index 4f36e84..0000000
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableConfiguration.cs
+++ /dev/null
@@ -1,127 +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.
- */
-
-namespace Apache.Ignite.Core.Impl.Interop
-{
-    using System.Collections.Generic;
-    using Apache.Ignite.Core.Impl.Portable;
-    using Apache.Ignite.Core.Portable;
-
-    /// <summary>
-    /// .Net portable configuration as defined in Java configuration.
-    /// </summary>
-    internal class InteropDotNetPortableConfiguration : IPortableWriteAware
-    {
-        /// <summary>
-        /// Type configurations.
-        /// </summary>
-        public ICollection<InteropDotNetPortableTypeConfiguration> TypeConfigurations { get; set; }
-
-        /// <summary>
-        /// Portable types. Shorthand for creating PortableTypeConfiguration.
-        /// </summary>
-        public ICollection<string> Types { get; set; }
-
-        /// <summary>
-        /// Default name mapper.
-        /// </summary>
-        public string DefaultNameMapper { get; set; }
-
-        /// <summary>
-        /// Default ID mapper.
-        /// </summary>
-        public string DefaultIdMapper { get; set; }
-
-        /// <summary>
-        /// Default serializer.
-        /// </summary>
-        public string DefaultSerializer { get; set; }
-
-        /// <summary>
-        /// Default metadata enabled flag. Defaults to true.
-        /// </summary>
-        public bool DefaultMetadataEnabled { get; set; }
-
-        /// <summary>
-        /// Keep deserialized flag. If set to non-null value, overrides default value set in 
-        /// PortableConfiguration.
-        /// </summary>
-        public bool DefaultKeepDeserialized { get; set; }
-
-        /// <summary>
-        /// Creates PortableConfiguration.
-        /// </summary>
-        /// <returns>PortableConfiguration</returns>
-        public PortableConfiguration ToPortableConfiguration()
-        {
-            PortableConfiguration res = new PortableConfiguration();
-
-            if (TypeConfigurations != null)
-            {
-                List<PortableTypeConfiguration> typeCfgs = new List<PortableTypeConfiguration>();
-
-                foreach (InteropDotNetPortableTypeConfiguration dotNetTypeCfg in TypeConfigurations)
-                    typeCfgs.Add(dotNetTypeCfg.ToPortableTypeConfiguration());
-
-                res.TypeConfigurations = typeCfgs;
-            }
-
-            res.Types = Types;
-            res.DefaultNameMapper =
-                (IPortableNameMapper) InteropDotNetPortableTypeConfiguration.CreateInstance(DefaultNameMapper);
-            res.DefaultIdMapper =
-                (IPortableIdMapper) InteropDotNetPortableTypeConfiguration.CreateInstance(DefaultIdMapper);
-            res.DefaultSerializer =
-                (IPortableSerializer) InteropDotNetPortableTypeConfiguration.CreateInstance(DefaultSerializer);
-            res.DefaultMetadataEnabled = DefaultMetadataEnabled;
-            res.DefaultKeepDeserialized = DefaultKeepDeserialized;
-
-            return res;
-        }
-
-        /** {@inheritDoc} */
-        public void WritePortable(IPortableWriter writer)
-        {
-            IPortableRawWriter rawWriter = writer.RawWriter();
-
-            rawWriter.WriteGenericCollection(TypeConfigurations);
-            rawWriter.WriteGenericCollection(Types);
-            rawWriter.WriteString(DefaultNameMapper);
-            rawWriter.WriteString(DefaultIdMapper);
-            rawWriter.WriteString(DefaultSerializer);
-            rawWriter.WriteBoolean(DefaultMetadataEnabled);
-            rawWriter.WriteBoolean(DefaultKeepDeserialized);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="InteropDotNetPortableConfiguration"/> class.
-        /// </summary>
-        /// <param name="reader">The reader.</param>
-        public InteropDotNetPortableConfiguration(IPortableReader reader)
-        {
-            IPortableRawReader rawReader = reader.RawReader();
-
-            TypeConfigurations = rawReader.ReadGenericCollection<InteropDotNetPortableTypeConfiguration>();
-            Types = rawReader.ReadGenericCollection<string>();
-            DefaultNameMapper = rawReader.ReadString();
-            DefaultIdMapper = rawReader.ReadString();
-            DefaultSerializer = rawReader.ReadString();
-            DefaultMetadataEnabled = rawReader.ReadBoolean();
-            DefaultKeepDeserialized = rawReader.ReadBoolean();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableTypeConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableTypeConfiguration.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableTypeConfiguration.cs
deleted file mode 100644
index 0c3b433..0000000
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Interop/InteropDotNetPortableTypeConfiguration.cs
+++ /dev/null
@@ -1,151 +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.
- */
-
-namespace Apache.Ignite.Core.Impl.Interop
-{
-    using System;
-    using System.Reflection;
-    using Apache.Ignite.Core.Impl.Portable;
-    using Apache.Ignite.Core.Portable;
-
-    /// <summary>
-    /// .Net portable configuration type as defined in Java configuration.
-    /// </summary>
-    internal class InteropDotNetPortableTypeConfiguration : IPortableWriteAware
-    {
-        /// <summary>
-        /// Assembly name.
-        /// </summary>
-        public string AssemblyName { get; set; }
-
-        /// <summary>
-        /// Fully qualified type name.
-        /// </summary>
-        public string TypeName { get; set; }
-
-        /// <summary>
-        /// Name mapper for the given type.
-        /// </summary>
-        public string NameMapper { get; set; }
-
-        /// <summary>
-        /// ID mapper for the given type. When it is necessary to resolve class (field) ID, then
-        /// this property will be checked first. If not set, then PortableClassIdAttribute
-        /// (PortableFieldIdAttribute) will be checked in class through reflection. If required
-        /// attribute is not set, then ID will be hash code of the class (field) simple name in lower case.
-        /// </summary>
-        public string IdMapper { get; set; }
-
-        /// <summary>
-        /// Serializer for the given type. If not provided and class implements IPortable
-        /// then its custom logic will be used. If not provided and class doesn't implement IPortable
-        /// then all fields of the class except of those with [NotSerialized] attribute will be serialized
-        ///with help of reflection.
-        /// </summary>
-        public string Serializer { get; set; }
-
-        /// <summary>
-        /// Affinity key field name.
-        /// </summary>
-        public string AffinityKeyFieldName { get; set; }
-
-        /// <summary>
-        /// Metadata enabled flag. If set to non-null value, overrides default value set in
-        /// PortableConfiguration.
-        /// </summary>
-        public bool? MetadataEnabled { get; set; }
-
-        /// <summary>
-        /// Keep deserialized flag. If set to non-null value, overrides default value set in 
-        /// PortableConfiguration.
-        /// </summary>
-        public bool? KeepDeserialized { get; set; }
-
-        /// <summary>
-        /// Creates new instance of PortableTypeConfiguration.
-        /// </summary>
-        /// <returns>PortableTypeConfiguration</returns>
-        public PortableTypeConfiguration ToPortableTypeConfiguration()
-        {
-            return new PortableTypeConfiguration
-            {
-                AssemblyName = AssemblyName,
-                AffinityKeyFieldName = AffinityKeyFieldName,
-                TypeName = TypeName,
-                NameMapper = (IPortableNameMapper) CreateInstance(NameMapper),
-                IdMapper = (IPortableIdMapper) CreateInstance(IdMapper),
-                Serializer = (IPortableSerializer) CreateInstance(Serializer),
-                MetadataEnabled = MetadataEnabled,
-                KeepDeserialized = KeepDeserialized
-            };
-        }
-
-        /** {@inheritDoc} */
-        public void WritePortable(IPortableWriter writer)
-        {
-            IPortableRawWriter rawWriter = writer.RawWriter();
-
-            rawWriter.WriteString(AssemblyName);
-            rawWriter.WriteString(TypeName);
-            rawWriter.WriteString(NameMapper);
-            rawWriter.WriteString(IdMapper);
-            rawWriter.WriteString(Serializer);
-            rawWriter.WriteString(AffinityKeyFieldName);
-            rawWriter.WriteObject(MetadataEnabled);
-            rawWriter.WriteObject(KeepDeserialized);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="InteropDotNetPortableTypeConfiguration"/> class.
-        /// </summary>
-        /// <param name="reader">The reader.</param>
-        public InteropDotNetPortableTypeConfiguration(IPortableReader reader)
-        {
-            IPortableRawReader rawReader = reader.RawReader();
-
-            AssemblyName = rawReader.ReadString();
-            TypeName = rawReader.ReadString();
-            NameMapper = rawReader.ReadString();
-            IdMapper = rawReader.ReadString();
-            Serializer = rawReader.ReadString();
-            AffinityKeyFieldName = rawReader.ReadString();
-            MetadataEnabled = rawReader.ReadObject<bool?>();
-            KeepDeserialized = rawReader.ReadObject<bool?>();
-        }
-
-        /// <summary>
-        /// Create new instance of specified class.
-        /// </summary>
-        /// <param name="typeName">Name of the type.</param>
-        /// <returns>New Instance.</returns>
-        public static object CreateInstance(string typeName)
-        {
-            if (typeName == null)
-                return null;
-
-            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
-            {
-                object instance = assembly.CreateInstance(typeName);
-
-                if (instance != null)
-                    return instance;
-            }
-
-            throw new PortableException("Failed to find class: " + typeName);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
index 4b933a0..6286ebb 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
@@ -26,7 +26,6 @@ namespace Apache.Ignite.Core.Impl.Portable
     using Apache.Ignite.Core.Impl.Compute;
     using Apache.Ignite.Core.Impl.Compute.Closure;
     using Apache.Ignite.Core.Impl.Datastream;
-    using Apache.Ignite.Core.Impl.Interop;
     using Apache.Ignite.Core.Impl.Messaging;
     using Apache.Ignite.Core.Impl.Portable.IO;
     using Apache.Ignite.Core.Impl.Portable.Metadata;
@@ -565,9 +564,6 @@ namespace Apache.Ignite.Core.Impl.Portable
             AddSystemType(PortableUtils.TypeNativeJobHolder, w => new ComputeJobHolder(w));
             AddSystemType(PortableUtils.TypeComputeJobWrapper, w => new ComputeJobWrapper(w));
             AddSystemType(PortableUtils.TypePortableJobResHolder, w => new PortableResultWrapper(w));
-            AddSystemType(PortableUtils.TypeDotNetCfg, w => new InteropDotNetConfiguration(w));
-            AddSystemType(PortableUtils.TypeDotNetPortableCfg, w => new InteropDotNetPortableConfiguration(w));
-            AddSystemType(PortableUtils.TypeDotNetPortableTypCfg, w => new InteropDotNetPortableTypeConfiguration(w));
             AddSystemType(PortableUtils.TypeIgniteProxy, w => new IgniteProxy());
             AddSystemType(PortableUtils.TypeComputeOutFuncJob, w => new ComputeOutFuncJob(w));
             AddSystemType(PortableUtils.TypeComputeOutFuncWrapper, w => new ComputeOutFuncWrapper(w));

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
index 3143e45..a0b110d 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
@@ -2035,5 +2035,96 @@ namespace Apache.Ignite.Core.Impl.Portable
 
             return local ? res.ToLocalTime() : res;
         }
+
+        /// <summary>
+        /// Read additional configuration from the stream.
+        /// </summary>
+        /// <param name="reader">Reader.</param>
+        /// <param name="assemblies">Assemblies.</param>
+        /// <param name="cfg">Portable configuration.</param>
+        public static void ReadConfiguration(PortableReaderImpl reader, out ICollection<string> assemblies, out PortableConfiguration cfg)
+        {
+            if (reader.ReadBoolean())
+            {
+                int assemblyCnt = reader.ReadInt();
+
+                assemblies = new List<string>(assemblyCnt);
+
+                for (int i = 0; i < assemblyCnt; i++)
+                    assemblies.Add(reader.ReadObject<string>());
+            }
+            else
+                assemblies = null;
+
+            if (reader.ReadBoolean())
+            {
+                cfg = new PortableConfiguration();
+
+                // Read portable types in full form.
+                if (reader.ReadBoolean())
+                {
+                    int typesCnt = reader.ReadInt();
+
+                    cfg.TypeConfigurations = new List<PortableTypeConfiguration>();
+
+                    for (int i = 0; i < typesCnt; i++)
+                    {
+                        PortableTypeConfiguration typCfg = new PortableTypeConfiguration();
+
+                        typCfg.AssemblyName = reader.ReadString();
+                        typCfg.TypeName = reader.ReadString();
+                        typCfg.NameMapper = (IPortableNameMapper)CreateInstance(reader.ReadString());
+                        typCfg.IdMapper = (IPortableIdMapper)CreateInstance(reader.ReadString());
+                        typCfg.Serializer = (IPortableSerializer)CreateInstance(reader.ReadString());
+                        typCfg.AffinityKeyFieldName = reader.ReadString();
+                        typCfg.MetadataEnabled = reader.ReadObject<bool?>();
+                        typCfg.KeepDeserialized = reader.ReadObject<bool?>();
+
+                        cfg.TypeConfigurations.Add(typCfg);
+                    }
+                }
+
+                // Read portable types in compact form.
+                if (reader.ReadBoolean())
+                {
+                    int typesCnt = reader.ReadInt();
+
+                    cfg.Types = new List<string>(typesCnt);
+
+                    for (int i = 0; i < typesCnt; i++)
+                        cfg.Types.Add(reader.ReadString());
+                }
+
+                // Read the rest.
+                cfg.DefaultNameMapper = (IPortableNameMapper)CreateInstance(reader.ReadString());
+                cfg.DefaultIdMapper = (IPortableIdMapper)CreateInstance(reader.ReadString());
+                cfg.DefaultSerializer = (IPortableSerializer)CreateInstance(reader.ReadString());
+                cfg.DefaultMetadataEnabled = reader.ReadBoolean();
+                cfg.DefaultKeepDeserialized = reader.ReadBoolean();
+            }
+            else
+                cfg = null;
+        }
+
+        /// <summary>
+        /// Create new instance of specified class.
+        /// </summary>
+        /// <param name="typeName">Name of the type.</param>
+        /// <returns>New Instance.</returns>
+        public static object CreateInstance(string typeName)
+        {
+            if (typeName == null)
+                return null;
+
+            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
+            {
+                object instance = assembly.CreateInstance(typeName);
+
+                if (instance != null)
+                    return instance;
+            }
+
+            throw new PortableException("Failed to find class: " + typeName);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
index 56351e6..f1f3fae 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
@@ -139,7 +139,7 @@ public class PlatformDotNetConfigurationClosure extends PlatformAbstractConfigur
 
                 PortableRawWriterEx writer = marshaller().writer(out);
 
-                writer.writeObject(interopCfg.unwrap());
+                PlatformUtils.writeDotNetConfiguration(writer, interopCfg.unwrap());
 
                 List<PlatformDotNetLifecycleBean> beans = beans(igniteCfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
index ee3124d..11d8371 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
@@ -17,14 +17,6 @@
 
 package org.apache.ignite.internal.processors.platform.utils;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.cache.CacheException;
-import javax.cache.event.CacheEntryEvent;
-import javax.cache.event.CacheEntryListenerException;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
@@ -46,8 +38,20 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration;
+import org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration;
+import org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration;
 import org.jetbrains.annotations.Nullable;
 
+import javax.cache.CacheException;
+import javax.cache.event.CacheEntryEvent;
+import javax.cache.event.CacheEntryListenerException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_PREFIX;
 
 /**
@@ -760,6 +764,46 @@ public class PlatformUtils {
     }
 
     /**
+     * Write .Net configuration to the stream.
+     *
+     * @param writer Writer.
+     * @param cfg Configuration.
+     */
+    public static void writeDotNetConfiguration(PortableRawWriterEx writer, PlatformDotNetConfiguration cfg) {
+        // 1. Write assemblies.
+        writeNullableCollection(writer, cfg.getAssemblies());
+
+        PlatformDotNetPortableConfiguration portableCfg = cfg.getPortableConfiguration();
+
+        if (portableCfg != null) {
+            writer.writeBoolean(true);
+
+            writeNullableCollection(writer, portableCfg.getTypesConfiguration(),
+                new PlatformWriterClosure<PlatformDotNetPortableTypeConfiguration>() {
+                @Override public void write(PortableRawWriterEx writer, PlatformDotNetPortableTypeConfiguration typ) {
+                    writer.writeString(typ.getAssemblyName());
+                    writer.writeString(typ.getTypeName());
+                    writer.writeString(typ.getNameMapper());
+                    writer.writeString(typ.getIdMapper());
+                    writer.writeString(typ.getSerializer());
+                    writer.writeString(typ.getAffinityKeyFieldName());
+                    writer.writeObject(typ.getMetadataEnabled());
+                    writer.writeObject(typ.getKeepDeserialized());
+                }
+            });
+
+            writeNullableCollection(writer, portableCfg.getTypes());
+            writer.writeString(portableCfg.getDefaultNameMapper());
+            writer.writeString(portableCfg.getDefaultIdMapper());
+            writer.writeString(portableCfg.getDefaultSerializer());
+            writer.writeBoolean(portableCfg.isDefaultMetadataEnabled());
+            writer.writeBoolean(portableCfg.isDefaultKeepDeserialized());
+        }
+        else
+            writer.writeBoolean(false);
+    }
+
+    /**
      * Private constructor.
      */
     private PlatformUtils() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java
new file mode 100644
index 0000000..0550bab
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java
@@ -0,0 +1,97 @@
+/*
+ * 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.platform.dotnet;
+
+import org.apache.ignite.configuration.PlatformConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Mirror of .Net class Configuration.cs
+ */
+public class PlatformDotNetConfiguration implements PlatformConfiguration {
+    /** */
+    private PlatformDotNetPortableConfiguration portableCfg;
+
+    /** */
+    private List<String> assemblies;
+
+    /**
+     * Default constructor.
+     */
+    public PlatformDotNetConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param cfg Configuration to copy.
+     */
+    public PlatformDotNetConfiguration(PlatformDotNetConfiguration cfg) {
+        if (cfg.getPortableConfiguration() != null)
+            portableCfg = new PlatformDotNetPortableConfiguration(cfg.getPortableConfiguration());
+
+        if (cfg.getAssemblies() != null)
+            assemblies = new ArrayList<>(cfg.getAssemblies());
+    }
+
+    /**
+     * @return Configuration.
+     */
+    public PlatformDotNetPortableConfiguration getPortableConfiguration() {
+        return portableCfg;
+    }
+
+    /**
+     * @param portableCfg Configuration.
+     */
+    public void setPortableConfiguration(PlatformDotNetPortableConfiguration portableCfg) {
+        this.portableCfg = portableCfg;
+    }
+
+    /**
+     * @return Assemblies.
+     */
+    public List<String> getAssemblies() {
+        return assemblies;
+    }
+
+    /**
+     *
+     * @param assemblies Assemblies.
+     */
+    public void setAssemblies(List<String> assemblies) {
+        this.assemblies = assemblies;
+    }
+
+    /**
+     * @return Configuration copy.
+     */
+    @SuppressWarnings("UnusedDeclaration")
+    private PlatformDotNetConfiguration copy() {
+        return new PlatformDotNetConfiguration(this);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(PlatformDotNetConfiguration.class, this);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java
new file mode 100644
index 0000000..dd7b988
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java
@@ -0,0 +1,196 @@
+/*
+ * 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.platform.dotnet;
+
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * Mirror of .Net class PortableConfiguration.cs
+ */
+public class PlatformDotNetPortableConfiguration {
+    /** Type cfgs. */
+    private Collection<PlatformDotNetPortableTypeConfiguration> typesCfg;
+
+    /** Types. */
+    private Collection<String> types;
+
+    /** Default name mapper. */
+    private String dfltNameMapper;
+
+    /** Default id mapper. */
+    private String dfltIdMapper;
+
+    /** Default serializer. */
+    private String dfltSerializer;
+
+    /** Default metadata enabled. */
+    private boolean dfltMetadataEnabled = true;
+
+    /** Whether to cache deserialized value in IGridPortableObject */
+    private boolean dfltKeepDeserialized = true;
+
+    /**
+     * Default constructor.
+     */
+    public PlatformDotNetPortableConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * Copy constructor.
+     * @param cfg configuration to copy.
+     */
+    public PlatformDotNetPortableConfiguration(PlatformDotNetPortableConfiguration cfg) {
+        if (cfg.getTypesConfiguration() != null) {
+            typesCfg = new ArrayList<>();
+
+            for (PlatformDotNetPortableTypeConfiguration typeCfg : cfg.getTypesConfiguration())
+                typesCfg.add(new PlatformDotNetPortableTypeConfiguration(typeCfg));
+        }
+
+        if (cfg.getTypes() != null)
+            types = new ArrayList<>(cfg.getTypes());
+
+        dfltNameMapper = cfg.getDefaultNameMapper();
+        dfltIdMapper = cfg.getDefaultIdMapper();
+        dfltSerializer = cfg.getDefaultSerializer();
+        dfltMetadataEnabled = cfg.isDefaultMetadataEnabled();
+        dfltKeepDeserialized = cfg.isDefaultKeepDeserialized();
+    }
+
+    /**
+     * @return Type cfgs.
+     */
+    public Collection<PlatformDotNetPortableTypeConfiguration> getTypesConfiguration() {
+        return typesCfg;
+    }
+
+    /**
+     * @param typesCfg New type cfgs.
+     */
+    public void setTypesConfiguration(Collection<PlatformDotNetPortableTypeConfiguration> typesCfg) {
+        this.typesCfg = typesCfg;
+    }
+
+    /**
+     * @return Types.
+     */
+    public Collection<String> getTypes() {
+        return types;
+    }
+
+    /**
+     * @param types New types.
+     */
+    public void setTypes(Collection<String> types) {
+        this.types = types;
+    }
+
+    /**
+     * @return Default name mapper.
+     */
+    public String getDefaultNameMapper() {
+        return dfltNameMapper;
+    }
+
+    /**
+     * @param dfltNameMapper New default name mapper.
+     */
+    public void setDefaultNameMapper(String dfltNameMapper) {
+        this.dfltNameMapper = dfltNameMapper;
+    }
+
+    /**
+     * @return Default id mapper.
+     */
+    public String getDefaultIdMapper() {
+        return dfltIdMapper;
+    }
+
+    /**
+     * @param dfltIdMapper New default id mapper.
+     */
+    public void setDefaultIdMapper(String dfltIdMapper) {
+        this.dfltIdMapper = dfltIdMapper;
+    }
+
+    /**
+     * @return Default serializer.
+     */
+    public String getDefaultSerializer() {
+        return dfltSerializer;
+    }
+
+    /**
+     * @param dfltSerializer New default serializer.
+     */
+    public void setDefaultSerializer(String dfltSerializer) {
+        this.dfltSerializer = dfltSerializer;
+    }
+
+    /**
+     * Gets default metadata enabled flag. See {@link #setDefaultMetadataEnabled(boolean)} for more information.
+     *
+     * @return Default metadata enabled flag.
+     */
+    public boolean isDefaultMetadataEnabled() {
+        return dfltMetadataEnabled;
+    }
+
+    /**
+     * Sets default metadata enabled flag. When set to {@code true} all portable types will save it's metadata to
+     * cluster.
+     * <p />
+     * Can be overridden for particular type using
+     * {@link PlatformDotNetPortableTypeConfiguration#setMetadataEnabled(Boolean)}.
+     *
+     * @param dfltMetadataEnabled Default metadata enabled flag.
+     */
+    public void setDefaultMetadataEnabled(boolean dfltMetadataEnabled) {
+        this.dfltMetadataEnabled = dfltMetadataEnabled;
+    }
+
+    /**
+     * Gets default keep deserialized flag. See {@link #setDefaultKeepDeserialized(boolean)} for more information.
+     *
+     * @return  Flag indicates whether to cache deserialized value in IGridPortableObject.
+     */
+    public boolean isDefaultKeepDeserialized() {
+        return dfltKeepDeserialized;
+    }
+
+    /**
+     * Sets default keep deserialized flag.
+     * <p />
+     * Can be overridden for particular type using
+     * {@link PlatformDotNetPortableTypeConfiguration#setKeepDeserialized(Boolean)}.
+     *
+     * @param keepDeserialized Keep deserialized flag.
+     */
+    public void setDefaultKeepDeserialized(boolean keepDeserialized) {
+        this.dfltKeepDeserialized = keepDeserialized;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(PlatformDotNetPortableConfiguration.class, this);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/b259184a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java
new file mode 100644
index 0000000..b04d2a7
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java
@@ -0,0 +1,214 @@
+/*
+ * 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.platform.dotnet;
+
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Mirror of .Net class GridDotNetPortableTypeConfiguration.cs
+ */
+public class PlatformDotNetPortableTypeConfiguration {
+    /** Assembly name. */
+    private String assemblyName;
+
+    /** Type name. */
+    private String typeName;
+
+    /** Name mapper. */
+    private String nameMapper;
+
+    /** Id mapper. */
+    private String idMapper;
+
+    /** Serializer. */
+    private String serializer;
+
+    /** Affinity key field name. */
+    private String affinityKeyFieldName;
+
+    /** Metadata enabled. */
+    private Boolean metadataEnabled;
+
+    /** Whether to cache deserialized value in IGridPortableObject. */
+    private Boolean keepDeserialized;
+
+    /**
+     * Default constructor.
+     */
+    public PlatformDotNetPortableTypeConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * Copy constructor.
+     * @param cfg configuration to copy.
+     */
+    public PlatformDotNetPortableTypeConfiguration(PlatformDotNetPortableTypeConfiguration cfg) {
+        assemblyName = cfg.getAssemblyName();
+        typeName = cfg.getTypeName();
+        nameMapper = cfg.getNameMapper();
+        idMapper = cfg.getIdMapper();
+        serializer = cfg.getSerializer();
+        affinityKeyFieldName = cfg.getAffinityKeyFieldName();
+        metadataEnabled = cfg.getMetadataEnabled();
+        keepDeserialized = cfg.isKeepDeserialized();
+    }
+
+    /**
+     * @return Assembly name.
+     */
+    public String getAssemblyName() {
+        return assemblyName;
+    }
+
+    /**
+     * @param assemblyName New assembly name.
+     */
+    public void setAssemblyName(String assemblyName) {
+        this.assemblyName = assemblyName;
+    }
+
+    /**
+     * @return Type name.
+     */
+    public String getTypeName() {
+        return typeName;
+    }
+
+    /**
+     * @param typeName New type name.
+     */
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+
+    /**
+     * @return Name mapper.
+     */
+    public String getNameMapper() {
+        return nameMapper;
+    }
+
+    /**
+     * @param nameMapper New name mapper.
+     */
+    public void setNameMapper(String nameMapper) {
+        this.nameMapper = nameMapper;
+    }
+
+    /**
+     * @return Id mapper.
+     */
+    public String getIdMapper() {
+        return idMapper;
+    }
+
+    /**
+     * @param idMapper New id mapper.
+     */
+    public void setIdMapper(String idMapper) {
+        this.idMapper = idMapper;
+    }
+
+    /**
+     * @return Serializer.
+     */
+    public String getSerializer() {
+        return serializer;
+    }
+
+    /**
+     * @param serializer New serializer.
+     */
+    public void setSerializer(String serializer) {
+        this.serializer = serializer;
+    }
+
+    /**
+     * Gets metadata enabled flag. See {@link #setMetadataEnabled(Boolean)} for more information.
+     *
+     * @return Metadata enabled flag.
+     */
+    public Boolean getMetadataEnabled() {
+        return metadataEnabled;
+    }
+
+    /**
+     * Sets metadata enabled flag.
+     * <p />
+     * When set to {@code null} default value taken from
+     * {@link PlatformDotNetPortableConfiguration#isDefaultMetadataEnabled()} will be used.
+     *
+     * @param metadataEnabled New metadata enabled.
+     */
+    public void setMetadataEnabled(Boolean metadataEnabled) {
+        this.metadataEnabled = metadataEnabled;
+    }
+
+    /**
+     * @return Affinity key field name.
+     */
+    public String getAffinityKeyFieldName() {
+        return affinityKeyFieldName;
+    }
+
+    /**
+     * @param affinityKeyFieldName Affinity key field name.
+     */
+    public void setAffinityKeyFieldName(String affinityKeyFieldName) {
+        this.affinityKeyFieldName = affinityKeyFieldName;
+    }
+
+    /**
+     * Gets keep deserialized flag.
+     *
+     * @return Flag indicates whether to cache deserialized value in IGridPortableObject.
+     * @deprecated Use {@link #getKeepDeserialized()} instead.
+     */
+    @Deprecated
+    @Nullable public Boolean isKeepDeserialized() {
+        return keepDeserialized;
+    }
+
+    /**
+     * Gets keep deserialized flag. See {@link #setKeepDeserialized(Boolean)} for more information.
+     *
+     * @return Flag indicates whether to cache deserialized value in IGridPortableObject.
+     */
+    @Nullable public Boolean getKeepDeserialized() {
+        return keepDeserialized;
+    }
+
+    /**
+     * Sets keep deserialized flag.
+     * <p />
+     * When set to {@code null} default value taken from
+     * {@link PlatformDotNetPortableConfiguration#isDefaultKeepDeserialized()} will be used.
+     *
+     * @param keepDeserialized Keep deserialized flag.
+     */
+    public void setKeepDeserialized(@Nullable Boolean keepDeserialized) {
+        this.keepDeserialized = keepDeserialized;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(PlatformDotNetPortableTypeConfiguration.class, this);
+    }
+}


Mime
View raw message