You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/11/05 04:28:40 UTC
[48/66] [abbrv] ignite git commit: IGNITE-1834: Removed
"metadataEnabled" flag from .Net.
IGNITE-1834: Removed "metadataEnabled" flag from .Net.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a88ada43
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a88ada43
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a88ada43
Branch: refs/heads/ignite-1753-1282
Commit: a88ada43c63b54256676f6ce9401da269e8af990
Parents: d59a5f0
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Wed Nov 4 11:45:02 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Nov 4 11:45:02 2015 +0300
----------------------------------------------------------------------
.../platform/utils/PlatformUtils.java | 2 --
...PlatformDotNetPortableTypeConfiguration.java | 25 -------------
.../Interop/PlatformBenchmarkBase.cs | 3 +-
.../Portable/PortableReadBenchmark.cs | 4 +--
.../Portable/PortableWriteBenchmark.cs | 4 +--
.../Portable/PortableApiSelfTest.cs | 4 +--
.../Impl/Portable/IPortableTypeDescriptor.cs | 12 ++-----
.../Impl/Portable/PortableBuilderImpl.cs | 2 +-
.../Impl/Portable/PortableFullTypeDescriptor.cs | 38 +++++++-------------
.../Impl/Portable/PortableMarshaller.cs | 16 ++++-----
.../Portable/PortableSurrogateTypeDescriptor.cs | 10 ++----
.../Impl/Portable/PortableUserObject.cs | 4 +--
.../Impl/Portable/PortableUtils.cs | 2 --
.../Impl/Portable/PortableWriterImpl.cs | 4 +--
.../Structure/PortableStructureTracker.cs | 2 +-
.../Portable/PortableConfiguration.cs | 11 ------
.../Portable/PortableTypeConfiguration.cs | 9 +----
17 files changed, 36 insertions(+), 116 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
index 66c51e5..7a08ef5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
@@ -786,7 +786,6 @@ public class PlatformUtils {
writer.writeString(typ.getIdMapper());
writer.writeString(typ.getSerializer());
writer.writeString(typ.getAffinityKeyFieldName());
- writer.writeObject(typ.getMetadataEnabled());
writer.writeObject(typ.getKeepDeserialized());
}
});
@@ -795,7 +794,6 @@ public class PlatformUtils {
writer.writeString(portableCfg.getDefaultNameMapper());
writer.writeString(portableCfg.getDefaultIdMapper());
writer.writeString(portableCfg.getDefaultSerializer());
- writer.writeBoolean(portableCfg.isDefaultMetadataEnabled());
writer.writeBoolean(portableCfg.isDefaultKeepDeserialized());
}
else
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/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
index cb00a74..148272d 100644
--- 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
@@ -39,9 +39,6 @@ public class PlatformDotNetPortableTypeConfiguration {
/** Affinity key field name. */
private String affinityKeyFieldName;
- /** Metadata enabled. */
- private Boolean metadataEnabled;
-
/** Whether to cache deserialized value in IGridPortableObject. */
private Boolean keepDeserialized;
@@ -62,7 +59,6 @@ public class PlatformDotNetPortableTypeConfiguration {
idMapper = cfg.getIdMapper();
serializer = cfg.getSerializer();
affinityKeyFieldName = cfg.getAffinityKeyFieldName();
- metadataEnabled = cfg.getMetadataEnabled();
keepDeserialized = cfg.isKeepDeserialized();
}
@@ -123,27 +119,6 @@ public class PlatformDotNetPortableTypeConfiguration {
}
/**
- * 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() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs
index 87fb2e9..473859c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs
@@ -89,8 +89,7 @@ namespace Apache.Ignite.Benchmarks.Interop
new PortableTypeConfiguration(typeof (Employee)),
new PortableTypeConfiguration(typeof (MyClosure)),
new PortableTypeConfiguration(typeof (MyJob))
- },
- DefaultMetadataEnabled = false
+ }
};
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs
index 4df225e..b698b0c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs
@@ -81,8 +81,8 @@ namespace Apache.Ignite.Benchmarks.Portable
{
TypeConfigurations = new List<PortableTypeConfiguration>
{
- new PortableTypeConfiguration(typeof (Address)) {MetadataEnabled = true},
- new PortableTypeConfiguration(typeof (TestModel)) {MetadataEnabled = false}
+ new PortableTypeConfiguration(typeof (Address)),
+ new PortableTypeConfiguration(typeof (TestModel))
}
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs
index c8fd30b..425204d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs
@@ -77,8 +77,8 @@ namespace Apache.Ignite.Benchmarks.Portable
{
TypeConfigurations = new List<PortableTypeConfiguration>
{
- new PortableTypeConfiguration(typeof (Address)) {MetadataEnabled = true},
- //new PortableTypeConfiguration(typeof (TestModel)) {MetadataEnabled = false}
+ new PortableTypeConfiguration(typeof (Address))
+ //new PortableTypeConfiguration(typeof (TestModel))
}
});
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
index c85c823..cedc4d8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
@@ -250,7 +250,7 @@ namespace Apache.Ignite.Core.Tests.Portable
portObj = api.ToPortable<IPortableObject>(new ToPortableNoMeta(1));
- Assert.AreEqual(0, portObj.GetMetadata().Fields.Count);
+ Assert.AreEqual(1, portObj.GetMetadata().Fields.Count);
Assert.AreEqual(1, portObj.GetField<int>("Val"));
Assert.AreEqual(1, portObj.Deserialize<ToPortableNoMeta>().Val);
@@ -1420,7 +1420,7 @@ namespace Apache.Ignite.Core.Tests.Portable
/// <returns>Configuration.</returns>
private static PortableTypeConfiguration TypeConfigurationNoMeta(Type typ)
{
- return new PortableTypeConfiguration(typ) {MetadataEnabled = false};
+ return new PortableTypeConfiguration(typ);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/IPortableTypeDescriptor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/IPortableTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/IPortableTypeDescriptor.cs
index 88a7e22..7e417ce 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/IPortableTypeDescriptor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/IPortableTypeDescriptor.cs
@@ -61,14 +61,6 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/// <summary>
- /// Metadata enabled flag.
- /// </summary>
- bool MetadataEnabled
- {
- get;
- }
-
- /// <summary>
/// Whether to cache deserialized value in IPortableObject
/// </summary>
bool KeepDeserialized
@@ -79,7 +71,7 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <summary>
/// Name converter.
/// </summary>
- IPortableNameMapper NameConverter
+ IPortableNameMapper NameMapper
{
get;
}
@@ -87,7 +79,7 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <summary>
/// Mapper.
/// </summary>
- IPortableIdMapper Mapper
+ IPortableIdMapper IdMapper
{
get;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
index c299039..5e54705 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
@@ -523,7 +523,7 @@ namespace Apache.Ignite.Core.Impl.Portable
foreach (KeyValuePair<string, PortableBuilderField> valEntry in vals)
{
- int fieldId = PortableUtils.FieldId(desc.TypeId, valEntry.Key, desc.NameConverter, desc.Mapper);
+ int fieldId = PortableUtils.FieldId(desc.TypeId, valEntry.Key, desc.NameMapper, desc.IdMapper);
if (vals0.ContainsKey(fieldId))
throw new IgniteException("Collision in field ID detected (change field name or " +
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableFullTypeDescriptor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableFullTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableFullTypeDescriptor.cs
index 8695a3e..fc4e050 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableFullTypeDescriptor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableFullTypeDescriptor.cs
@@ -41,17 +41,14 @@ namespace Apache.Ignite.Core.Impl.Portable
private readonly bool _userType;
/** Name converter. */
- private readonly IPortableNameMapper _nameConverter;
+ private readonly IPortableNameMapper _nameMapper;
/** Mapper. */
- private readonly IPortableIdMapper _mapper;
+ private readonly IPortableIdMapper _idMapper;
/** Serializer. */
private readonly IPortableSerializer _serializer;
- /** Metadata enabled flag. */
- private readonly bool _metaEnabled;
-
/** Whether to cache deserialized value in IPortableObject */
private readonly bool _keepDeserialized;
@@ -74,10 +71,9 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <param name="typeId">Type ID.</param>
/// <param name="typeName">Type name.</param>
/// <param name="userType">User type flag.</param>
- /// <param name="nameConverter">Name converter.</param>
- /// <param name="mapper">Mapper.</param>
+ /// <param name="nameMapper">Name converter.</param>
+ /// <param name="idMapper">Mapper.</param>
/// <param name="serializer">Serializer.</param>
- /// <param name="metaEnabled">Metadata enabled flag.</param>
/// <param name="keepDeserialized">Whether to cache deserialized value in IPortableObject</param>
/// <param name="affKeyFieldName">Affinity field key name.</param>
public PortableFullTypeDescriptor(
@@ -85,10 +81,9 @@ namespace Apache.Ignite.Core.Impl.Portable
int typeId,
string typeName,
bool userType,
- IPortableNameMapper nameConverter,
- IPortableIdMapper mapper,
+ IPortableNameMapper nameMapper,
+ IPortableIdMapper idMapper,
IPortableSerializer serializer,
- bool metaEnabled,
bool keepDeserialized,
string affKeyFieldName)
{
@@ -96,10 +91,9 @@ namespace Apache.Ignite.Core.Impl.Portable
_typeId = typeId;
_typeName = typeName;
_userType = userType;
- _nameConverter = nameConverter;
- _mapper = mapper;
+ _nameMapper = nameMapper;
+ _idMapper = idMapper;
_serializer = serializer;
- _metaEnabled = metaEnabled;
_keepDeserialized = keepDeserialized;
_affKeyFieldName = affKeyFieldName;
}
@@ -137,14 +131,6 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/// <summary>
- /// Metadata enabled flag.
- /// </summary>
- public bool MetadataEnabled
- {
- get { return _metaEnabled; }
- }
-
- /// <summary>
/// Whether to cache deserialized value in IPortableObject
/// </summary>
public bool KeepDeserialized
@@ -155,17 +141,17 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <summary>
/// Name converter.
/// </summary>
- public IPortableNameMapper NameConverter
+ public IPortableNameMapper NameMapper
{
- get { return _nameConverter; }
+ get { return _nameMapper; }
}
/// <summary>
/// Mapper.
/// </summary>
- public IPortableIdMapper Mapper
+ public IPortableIdMapper IdMapper
{
- get { return _mapper; }
+ get { return _idMapper; }
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
index 86bf3bb..f6cfee6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableMarshaller.cs
@@ -287,8 +287,7 @@ namespace Apache.Ignite.Core.Impl.Portable
IDictionary<int, PortableMetadataHolder> metas0 =
new Dictionary<int, PortableMetadataHolder>(_metas);
- holder = desc.MetadataEnabled ? new PortableMetadataHolder(desc.TypeId,
- desc.TypeName, desc.AffinityKeyFieldName) : null;
+ holder = new PortableMetadataHolder(desc.TypeId, desc.TypeName, desc.AffinityKeyFieldName);
metas0[desc.TypeId] = holder;
@@ -389,8 +388,6 @@ namespace Apache.Ignite.Core.Impl.Portable
IPortableIdMapper idMapper = typeCfg.IdMapper ?? cfg.DefaultIdMapper;
- bool metaEnabled = typeCfg.MetadataEnabled ?? cfg.DefaultMetadataEnabled;
-
bool keepDeserialized = typeCfg.KeepDeserialized ?? cfg.DefaultKeepDeserialized;
// Try resolving type.
@@ -411,7 +408,7 @@ namespace Apache.Ignite.Core.Impl.Portable
if (refSerializer != null)
refSerializer.Register(type, typeId, nameMapper, idMapper);
- AddType(type, typeId, typeName, true, metaEnabled, keepDeserialized, nameMapper, idMapper, serializer,
+ AddType(type, typeId, typeName, true, keepDeserialized, nameMapper, idMapper, serializer,
typeCfg.AffinityKeyFieldName);
}
else
@@ -421,7 +418,7 @@ namespace Apache.Ignite.Core.Impl.Portable
int typeId = PortableUtils.TypeId(typeName, nameMapper, idMapper);
- AddType(null, typeId, typeName, true, metaEnabled, keepDeserialized, nameMapper, idMapper, null,
+ AddType(null, typeId, typeName, true, keepDeserialized, nameMapper, idMapper, null,
typeCfg.AffinityKeyFieldName);
}
}
@@ -445,13 +442,12 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <param name="typeId">Type ID.</param>
/// <param name="typeName">Type name.</param>
/// <param name="userType">User type flag.</param>
- /// <param name="metaEnabled">Metadata enabled flag.</param>
/// <param name="keepDeserialized">Whether to cache deserialized value in IPortableObject</param>
/// <param name="nameMapper">Name mapper.</param>
/// <param name="idMapper">ID mapper.</param>
/// <param name="serializer">Serializer.</param>
/// <param name="affKeyFieldName">Affinity key field name.</param>
- private void AddType(Type type, int typeId, string typeName, bool userType, bool metaEnabled,
+ private void AddType(Type type, int typeId, string typeName, bool userType,
bool keepDeserialized, IPortableNameMapper nameMapper, IPortableIdMapper idMapper,
IPortableSerializer serializer, string affKeyFieldName)
{
@@ -471,7 +467,7 @@ namespace Apache.Ignite.Core.Impl.Portable
IPortableTypeDescriptor descriptor =
new PortableFullTypeDescriptor(type, typeId, typeName, userType, nameMapper, idMapper, serializer,
- metaEnabled, keepDeserialized, affKeyFieldName);
+ keepDeserialized, affKeyFieldName);
if (type != null)
_typeToDesc[type] = descriptor;
@@ -491,7 +487,7 @@ namespace Apache.Ignite.Core.Impl.Portable
var serializer = new PortableSystemTypeSerializer<T>(ctor);
- AddType(type, typeId, GetTypeName(type), false, false, false, null, null, serializer, null);
+ AddType(type, typeId, GetTypeName(type), false, false, null, null, serializer, null);
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSurrogateTypeDescriptor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSurrogateTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSurrogateTypeDescriptor.cs
index 71361b4..8cd2f7c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSurrogateTypeDescriptor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSurrogateTypeDescriptor.cs
@@ -96,25 +96,19 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritDoc /> */
- public bool MetadataEnabled
- {
- get { return _cfg.DefaultMetadataEnabled; }
- }
-
- /** <inheritDoc /> */
public bool KeepDeserialized
{
get { return _cfg.DefaultKeepDeserialized; }
}
/** <inheritDoc /> */
- public IPortableNameMapper NameConverter
+ public IPortableNameMapper NameMapper
{
get { return _cfg.DefaultNameMapper; }
}
/** <inheritDoc /> */
- public IPortableIdMapper Mapper
+ public IPortableIdMapper IdMapper
{
get { return _cfg.DefaultIdMapper; }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
index 300281b..43a20af 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
@@ -160,7 +160,7 @@ namespace Apache.Ignite.Core.Impl.Portable
InitializeFields();
- int fieldId = PortableUtils.FieldId(_header.TypeId, fieldName, desc.NameConverter, desc.Mapper);
+ int fieldId = PortableUtils.FieldId(_header.TypeId, fieldName, desc.NameMapper, desc.IdMapper);
return _fields.TryGetValue(fieldId, out pos);
}
@@ -293,7 +293,7 @@ namespace Apache.Ignite.Core.Impl.Portable
{
sb.Append(", ");
- int fieldId = PortableUtils.FieldId(_header.TypeId, fieldName, desc.NameConverter, desc.Mapper);
+ int fieldId = PortableUtils.FieldId(_header.TypeId, fieldName, desc.NameMapper, desc.IdMapper);
int fieldPos;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
index 79c4858..097cf6d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
@@ -1726,7 +1726,6 @@ namespace Apache.Ignite.Core.Impl.Portable
IdMapper = CreateInstance<IPortableIdMapper>(reader),
Serializer = CreateInstance<IPortableSerializer>(reader),
AffinityKeyFieldName = reader.ReadString(),
- MetadataEnabled = reader.ReadObject<bool?>(),
KeepDeserialized = reader.ReadObject<bool?>()
});
}
@@ -1747,7 +1746,6 @@ namespace Apache.Ignite.Core.Impl.Portable
cfg.DefaultNameMapper = CreateInstance<IPortableNameMapper>(reader);
cfg.DefaultIdMapper = CreateInstance<IPortableIdMapper>(reader);
cfg.DefaultSerializer = CreateInstance<IPortableSerializer>(reader);
- cfg.DefaultMetadataEnabled = reader.ReadBoolean();
cfg.DefaultKeepDeserialized = reader.ReadBoolean();
}
else
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
index 66caca3..2dfdfda 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
@@ -1077,8 +1077,8 @@ namespace Apache.Ignite.Core.Impl.Portable
// Push new frame.
_curTypeId = desc.TypeId;
- _curConverter = desc.NameConverter;
- _curMapper = desc.Mapper;
+ _curConverter = desc.NameMapper;
+ _curMapper = desc.IdMapper;
_curRawPos = 0;
_curPos = pos;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/Structure/PortableStructureTracker.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/Structure/PortableStructureTracker.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/Structure/PortableStructureTracker.cs
index 4b1165d..11ba032 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/Structure/PortableStructureTracker.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/Structure/PortableStructureTracker.cs
@@ -127,7 +127,7 @@ namespace Apache.Ignite.Core.Impl.Portable.Structure
/// </returns>
private int GetNewFieldId(string fieldName, byte fieldTypeId, int action)
{
- var fieldId = PortableUtils.FieldId(_desc.TypeId, fieldName, _desc.NameConverter, _desc.Mapper);
+ var fieldId = PortableUtils.FieldId(_desc.TypeId, fieldName, _desc.NameMapper, _desc.IdMapper);
if (_curStructUpdates == null)
_curStructUpdates = new List<PortableStructureUpdate>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableConfiguration.cs
index f83580c..5531423 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableConfiguration.cs
@@ -30,7 +30,6 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
public PortableConfiguration()
{
- DefaultMetadataEnabled = true;
DefaultKeepDeserialized = true;
}
@@ -42,7 +41,6 @@ namespace Apache.Ignite.Core.Portable
{
DefaultIdMapper = cfg.DefaultIdMapper;
DefaultNameMapper = cfg.DefaultNameMapper;
- DefaultMetadataEnabled = cfg.DefaultMetadataEnabled;
DefaultKeepDeserialized = cfg.DefaultKeepDeserialized;
DefaultSerializer = cfg.DefaultSerializer;
@@ -105,15 +103,6 @@ namespace Apache.Ignite.Core.Portable
}
/// <summary>
- /// Default metadata enabled flag. Defaults to true.
- /// </summary>
- public bool DefaultMetadataEnabled
- {
- get;
- set;
- }
-
- /// <summary>
/// Default keep deserialized flag.
/// </summary>
public bool DefaultKeepDeserialized
http://git-wip-us.apache.org/repos/asf/ignite/blob/a88ada43/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableTypeConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableTypeConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableTypeConfiguration.cs
index 0c0b79a..441b81b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableTypeConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/PortableTypeConfiguration.cs
@@ -47,7 +47,7 @@ namespace Apache.Ignite.Core.Portable
/// <param name="type">Type.</param>
public PortableTypeConfiguration(Type type)
{
- TypeName = type.FullName;
+ TypeName = type.AssemblyQualifiedName;
}
/// <summary>
@@ -61,7 +61,6 @@ namespace Apache.Ignite.Core.Portable
NameMapper = cfg.NameMapper;
Serializer = cfg.Serializer;
TypeName = cfg.TypeName;
- MetadataEnabled = cfg.MetadataEnabled;
KeepDeserialized = cfg.KeepDeserialized;
}
@@ -97,12 +96,6 @@ namespace Apache.Ignite.Core.Portable
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>