Repository: ignite Updated Branches: refs/heads/ignite-3477-master 872f34ad1 -> c2d8bd9a4
http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryEqualityComparerSerializer.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryEqualityComparerSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryEqualityComparerSerializer.cs index 6400751..5f28270 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryEqualityComparerSerializer.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryEqualityComparerSerializer.cs @@ -1,99 +1 @@ -/* - * 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.Binary -{ - using System; - using System.Collections.Generic; - using System.Linq; - using Apache.Ignite.Core.Binary; - - /// <summary> - /// Reads and writes <see cref="IBinaryEqualityComparer"/>. - /// </summary> - internal static class BinaryEqualityComparerSerializer - { - /// <summary> - /// Comparer type. - /// </summary> - private enum Type : byte - { - None = 0, - Array = 1, - Field = 2 - } - - /// <summary> - /// Writes an instance. - /// </summary> - public static void Write(IBinaryRawWriter writer, IBinaryEqualityComparer comparer) - { - if (comparer == null) - { - writer.WriteByte((byte) Type.None); - return; - } - - var arrCmp = comparer as BinaryArrayEqualityComparer; - - if (arrCmp != null) - { - writer.WriteByte((byte) Type.Array); - return; - } - - var fieldCmp = (BinaryFieldEqualityComparer) comparer; - - writer.WriteByte((byte) Type.Field); - - fieldCmp.Validate(); - - writer.WriteInt(fieldCmp.FieldNames.Count); - - foreach (var field in fieldCmp.FieldNames) - writer.WriteString(field); - } - - /// <summary> - /// Reads an instance. - /// </summary> - /// <param name="reader">The reader.</param> - /// <returns></returns> - public static IEqualityComparer<IBinaryObject> Read(IBinaryRawReader reader) - { - var type = (Type) reader.ReadByte(); - - switch (type) - { - case Type.None: - return null; - - case Type.Array: - return new BinaryArrayEqualityComparer(); - - case Type.Field: - return new BinaryFieldEqualityComparer - { - FieldNames = Enumerable.Range(0, reader.ReadInt()).Select(x => reader.ReadString()).ToArray() - }; - - default: - throw new ArgumentOutOfRangeException("reader", type, "Invalid EqualityComparer type code"); - } - } - } -} + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFieldEqualityComparer.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFieldEqualityComparer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFieldEqualityComparer.cs deleted file mode 100644 index 433657a..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFieldEqualityComparer.cs +++ /dev/null @@ -1,138 +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.Binary -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using Apache.Ignite.Core.Binary; - using Apache.Ignite.Core.Common; - using Apache.Ignite.Core.Impl.Binary.IO; - using Apache.Ignite.Core.Impl.Common; - - /// <summary> - /// Uses a set of binary object fields to calculate hash code and check equality. - /// Not implemented for now, will be done as part of IGNITE-4397. - /// </summary> - internal class BinaryFieldEqualityComparer : IEqualityComparer<IBinaryObject>, IBinaryEqualityComparer - { - /// <summary> - /// Initializes a new instance of the <see cref="BinaryFieldEqualityComparer"/> class. - /// </summary> - public BinaryFieldEqualityComparer() - { - // No-op. - } - - /// <summary> - /// Initializes a new instance of the <see cref="BinaryFieldEqualityComparer"/> class. - /// </summary> - /// <param name="fieldNames">The field names for comparison.</param> - public BinaryFieldEqualityComparer(params string[] fieldNames) - { - IgniteArgumentCheck.NotNullOrEmpty(fieldNames, "fieldNames"); - - FieldNames = fieldNames; - } - - /// <summary> - /// Gets or sets the field names to be used for equality comparison. - /// </summary> - public ICollection<string> FieldNames { get; set; } - - /// <summary> - /// Determines whether the specified objects are equal. - /// </summary> - /// <param name="x">The first object to compare.</param> - /// <param name="y">The second object to compare.</param> - /// <returns> - /// true if the specified objects are equal; otherwise, false. - /// </returns> - public bool Equals(IBinaryObject x, IBinaryObject y) - { - throw new NotSupportedException(GetType() + "is not intended for direct usage."); - } - - /// <summary> - /// Returns a hash code for this instance. - /// </summary> - /// <param name="obj">The object.</param> - /// <returns> - /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - /// </returns> - public int GetHashCode(IBinaryObject obj) - { - throw new NotSupportedException(GetType() + "is not intended for direct usage."); - } - - /** <inheritdoc /> */ - int IBinaryEqualityComparer.GetHashCode(IBinaryStream stream, int startPos, int length, - BinaryObjectSchemaHolder schema, int schemaId, Marshaller marshaller, IBinaryTypeDescriptor desc) - { - Debug.Assert(stream != null); - Debug.Assert(startPos >= 0); - Debug.Assert(length >= 0); - Debug.Assert(schema != null); - Debug.Assert(marshaller != null); - Debug.Assert(desc != null); - - Validate(); - - stream.Flush(); - - // Preserve stream position. - var pos = stream.Position; - - var reader = marshaller.StartUnmarshal(stream, BinaryMode.ForceBinary); - var fields = schema.GetFullSchema(schemaId); - - int hash = 0; - - foreach (var fieldName in FieldNames) - { - int fieldId = BinaryUtils.FieldId(desc.TypeId, fieldName, desc.NameMapper, desc.IdMapper); - int fieldHash = 0; // Null (missing) field hash code is 0. - int fieldPos; - - if (fields.TryGetValue(fieldId, out fieldPos)) - { - stream.Seek(startPos + fieldPos - BinaryObjectHeader.Size, SeekOrigin.Begin); - var fieldVal = reader.Deserialize<object>(); - fieldHash = fieldVal != null ? fieldVal.GetHashCode() : 0; - } - - hash = 31 * hash + fieldHash; - } - - // Restore stream position. - stream.Seek(pos, SeekOrigin.Begin); - - return hash; - } - - /// <summary> - /// Validates this instance. - /// </summary> - public void Validate() - { - if (FieldNames == null || FieldNames.Count == 0) - throw new IgniteException("BinaryFieldEqualityComparer.FieldNames can not be null or empty."); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs index 6a911ad..e38b5ba 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryFullTypeDescriptor.cs @@ -20,7 +20,6 @@ namespace Apache.Ignite.Core.Impl.Binary using System; using System.Collections.Generic; using Apache.Ignite.Core.Binary; - using Apache.Ignite.Core.Common; using Apache.Ignite.Core.Impl.Binary.Structure; /// <summary> @@ -67,9 +66,6 @@ namespace Apache.Ignite.Core.Impl.Binary /** Enum flag. */ private readonly bool _isEnum; - /** Comparer. */ - private readonly IBinaryEqualityComparer _equalityComparer; - /** Register flag. */ private readonly bool _isRegistered; @@ -86,7 +82,6 @@ namespace Apache.Ignite.Core.Impl.Binary /// <param name="keepDeserialized">Whether to cache deserialized value in IBinaryObject</param> /// <param name="affKeyFieldName">Affinity field key name.</param> /// <param name="isEnum">Enum flag.</param> - /// <param name="comparer">Equality comparer.</param> /// <param name="isRegistered">Registered flag.</param> public BinaryFullTypeDescriptor( Type type, @@ -99,7 +94,6 @@ namespace Apache.Ignite.Core.Impl.Binary bool keepDeserialized, string affKeyFieldName, bool isEnum, - IEqualityComparer<IBinaryObject> comparer, bool isRegistered = true) { _type = type; @@ -113,13 +107,6 @@ namespace Apache.Ignite.Core.Impl.Binary _affKeyFieldName = affKeyFieldName; _isEnum = isEnum; - _equalityComparer = comparer as IBinaryEqualityComparer; - - if (comparer != null && _equalityComparer == null) - throw new IgniteException(string.Format("Unsupported IEqualityComparer<IBinaryObject> " + - "implementation: {0}. Only predefined implementations " + - "are supported.", comparer.GetType())); - _isRegistered = isRegistered; _schema = new BinaryObjectSchema(); } @@ -145,7 +132,6 @@ namespace Apache.Ignite.Core.Impl.Binary _keepDeserialized = desc._keepDeserialized; _affKeyFieldName = desc._affKeyFieldName; _isEnum = desc._isEnum; - _equalityComparer = desc._equalityComparer; _isRegistered = isRegistered; _schema = desc._schema; @@ -231,12 +217,6 @@ namespace Apache.Ignite.Core.Impl.Binary get { return _isEnum; } } - /** <inheritdoc/> */ - public IBinaryEqualityComparer EqualityComparer - { - get { return _equalityComparer; } - } - /** <inheritDoc /> */ public BinaryStructure WriterTypeStructure { http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs index 21a5323..c8c904d 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObject.cs @@ -258,7 +258,7 @@ namespace Apache.Ignite.Core.Impl.Binary var desc = _marsh.GetDescriptor(true, TypeId); - return BinaryUtils.GetEqualityComparer(desc).Equals(this, that); + return BinaryArrayEqualityComparer.Equals(this, that); } /** <inheritdoc /> */ http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs index e4fb10a..41c7305 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs @@ -722,12 +722,9 @@ namespace Apache.Ignite.Core.Impl.Binary if (changeHash) { // Get from identity resolver. - var comparer = BinaryUtils.GetEqualityComparer(_desc); - - outHash = comparer.GetHashCode(outStream, + outHash = BinaryArrayEqualityComparer.GetHashCode(outStream, outStartPos + BinaryObjectHeader.Size, - schemaPos - outStartPos - BinaryObjectHeader.Size, - outSchema, outSchemaId, _binary.Marshaller, _desc); + schemaPos - outStartPos - BinaryObjectHeader.Size); } var outHeader = new BinaryObjectHeader(inHeader.TypeId, outHash, outLen, http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySurrogateTypeDescriptor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySurrogateTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySurrogateTypeDescriptor.cs index 8c7e5e9..7efbe68 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySurrogateTypeDescriptor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySurrogateTypeDescriptor.cs @@ -135,12 +135,6 @@ namespace Apache.Ignite.Core.Impl.Binary get { return false; } } - /** <inheritdoc/> */ - public IBinaryEqualityComparer EqualityComparer - { - get { return null; } - } - /** <inheritDoc /> */ public BinaryStructure WriterTypeStructure { http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs index bb58ea5..7a7b7f6 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs @@ -2010,16 +2010,6 @@ namespace Apache.Ignite.Core.Impl.Binary } /// <summary> - /// Gets the equality comparer. - /// </summary> - public static IBinaryEqualityComparer GetEqualityComparer(IBinaryTypeDescriptor descriptor) - { - var res = descriptor != null ? descriptor.EqualityComparer : null; - - return res ?? BinaryArrayEqualityComparer.Instance; - } - - /// <summary> /// Creates and instance from the type name in reader. /// </summary> private static T CreateInstance<T>(BinaryReader reader) http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs index 1388d16..12cc026 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriter.cs @@ -1218,10 +1218,8 @@ namespace Apache.Ignite.Core.Impl.Binary var len = _stream.Position - pos; - var comparer = BinaryUtils.GetEqualityComparer(desc); - - var hashCode = comparer.GetHashCode(Stream, pos + BinaryObjectHeader.Size, - dataEnd - pos - BinaryObjectHeader.Size, _schema, schemaIdx, _marsh, desc); + var hashCode = BinaryArrayEqualityComparer.GetHashCode(Stream, pos + BinaryObjectHeader.Size, + dataEnd - pos - BinaryObjectHeader.Size); var header = new BinaryObjectHeader(desc.IsRegistered ? desc.TypeId : BinaryUtils.TypeUnregistered, hashCode, len, schemaId, schemaOffset, flags); http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryEqualityComparer.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryEqualityComparer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryEqualityComparer.cs deleted file mode 100644 index bd2db95..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryEqualityComparer.cs +++ /dev/null @@ -1,63 +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.Binary -{ - using Apache.Ignite.Core.Binary; - using Apache.Ignite.Core.Impl.Binary.IO; - - /// <summary> - /// Internal comparer interface for <see cref="BinaryTypeConfiguration.EqualityComparer"/> implementations, - /// provides more efficient API. - /// </summary> - internal interface IBinaryEqualityComparer - { - /// <summary> - /// Returns a hash code for the binary object in specified stream at specified position. - /// </summary> - /// <param name="stream">Stream.</param> - /// <param name="startPos">Data start position (right after the header).</param> - /// <param name="length">Data length (without header and schema).</param> - /// <param name="schema">Schema holder.</param> - /// <param name="schemaId">Schema identifier.</param> - /// <param name="marshaller">Marshaller.</param> - /// <param name="desc">Type descriptor.</param> - /// <returns> - /// A hash code for the object in the stream. - /// </returns> - int GetHashCode(IBinaryStream stream, int startPos, int length, BinaryObjectSchemaHolder schema, int schemaId, - Marshaller marshaller, IBinaryTypeDescriptor desc); - - /// <summary> - /// Returns a hash code for this instance. - /// </summary> - /// <param name="obj">The object.</param> - /// <returns> - /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - /// </returns> - int GetHashCode(IBinaryObject obj); - - - /// <summary> - /// Returns a value indicating that two binary object are equal. - /// </summary> - /// <param name="x">First object.</param> - /// <param name="y">Second object.</param> - /// <returns>True when objects are equal; otherwise false.</returns> - bool Equals(IBinaryObject x, IBinaryObject y); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryTypeDescriptor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryTypeDescriptor.cs index 6bec70f..4bd7e73 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryTypeDescriptor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/IBinaryTypeDescriptor.cs @@ -78,11 +78,6 @@ namespace Apache.Ignite.Core.Impl.Binary bool IsEnum { get; } /// <summary> - /// Gets the equality comparer. - /// </summary> - IBinaryEqualityComparer EqualityComparer { get; } - - /// <summary> /// Write type structure. /// </summary> BinaryStructure WriterTypeStructure { get; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c2d8bd9a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs index 5a4460a..61439b1 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs @@ -452,7 +452,7 @@ namespace Apache.Ignite.Core.Impl.Binary if (meta != BinaryType.Empty) { desc = new BinaryFullTypeDescriptor(null, meta.TypeId, meta.TypeName, true, null, null, null, false, - meta.AffinityKeyFieldName, meta.IsEnum, null); + meta.AffinityKeyFieldName, meta.IsEnum); _idToDesc.GetOrAdd(typeKey, _ => desc); @@ -480,14 +480,6 @@ namespace Apache.Ignite.Core.Impl.Binary } /// <summary> - /// Gets the user type descriptors. - /// </summary> - public ICollection<BinaryFullTypeDescriptor> GetUserTypeDescriptors() - { - return _typeNameToDesc.Values; - } - - /// <summary> /// Add user type. /// </summary> /// <param name="type">The type.</param> @@ -506,7 +498,7 @@ namespace Apache.Ignite.Core.Impl.Binary desc = desc == null ? new BinaryFullTypeDescriptor(type, typeId, typeName, true, _cfg.DefaultNameMapper, - _cfg.DefaultIdMapper, ser, false, null, type.IsEnum, null, registered) + _cfg.DefaultIdMapper, ser, false, null, type.IsEnum, registered) : new BinaryFullTypeDescriptor(desc, type, ser, registered); if (RegistrationDisabled) @@ -575,7 +567,7 @@ namespace Apache.Ignite.Core.Impl.Binary var serializer = GetSerializer(cfg, typeCfg, type, typeId, nameMapper, idMapper, _log); AddType(type, typeId, typeName, true, keepDeserialized, nameMapper, idMapper, serializer, - affKeyFld, type.IsEnum, typeCfg.EqualityComparer); + affKeyFld, type.IsEnum); } else { @@ -585,7 +577,7 @@ namespace Apache.Ignite.Core.Impl.Binary int typeId = BinaryUtils.TypeId(typeName, nameMapper, idMapper); AddType(null, typeId, typeName, true, keepDeserialized, nameMapper, idMapper, null, - typeCfg.AffinityKeyFieldName, typeCfg.IsEnum, typeCfg.EqualityComparer); + typeCfg.AffinityKeyFieldName, typeCfg.IsEnum); } } @@ -652,11 +644,9 @@ namespace Apache.Ignite.Core.Impl.Binary /// <param name="serializer">Serializer.</param> /// <param name="affKeyFieldName">Affinity key field name.</param> /// <param name="isEnum">Enum flag.</param> - /// <param name="comparer">Comparer.</param> private void AddType(Type type, int typeId, string typeName, bool userType, bool keepDeserialized, IBinaryNameMapper nameMapper, IBinaryIdMapper idMapper, - IBinarySerializerInternal serializer, string affKeyFieldName, bool isEnum, - IEqualityComparer<IBinaryObject> comparer) + IBinarySerializerInternal serializer, string affKeyFieldName, bool isEnum) { long typeKey = BinaryUtils.TypeKey(userType, typeId); @@ -677,7 +667,7 @@ namespace Apache.Ignite.Core.Impl.Binary throw new BinaryObjectException("Conflicting type name: " + typeName); var descriptor = new BinaryFullTypeDescriptor(type, typeId, typeName, userType, nameMapper, idMapper, - serializer, keepDeserialized, affKeyFieldName, isEnum, comparer); + serializer, keepDeserialized, affKeyFieldName, isEnum); if (type != null) _typeToDesc.GetOrAdd(type, x => descriptor); @@ -703,7 +693,7 @@ namespace Apache.Ignite.Core.Impl.Binary typeId = BinaryUtils.TypeId(type.Name, null, null); AddType(type, typeId, BinaryUtils.GetTypeName(type), false, false, null, null, serializer, affKeyFldName, - false, null); + false); } /// <summary>
