From b9f14ad2f173677d430b293224a3785d68b4458c Mon Sep 17 00:00:00 2001 From: Pavel Tupitsyn Date: Wed, 9 Dec 2015 19:23:35 +0300 Subject: [PATCH] IGNITE-2012 Add support for ConcurrentLinkedQueue type in .NET/C++ --- .../dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs | 7 +++++++ 1 file changed, 7 insertions(+) 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 4c54deac1653e..c0d894ddb88f4 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs @@ -212,6 +212,9 @@ internal static class BinaryUtils /** Collection: concurrent bag. */ public const byte CollectionConcurrentBag = 6; + /** Collection: concurrent queue. */ + public const byte CollectionConcurrentQueue = 7; + /** Map: custom. */ public const byte MapCustom = 0; @@ -1100,6 +1103,8 @@ public static void WriteCollection(ICollection val, BinaryWriter ctx) colType = CollectionSortedSet; else if (genType == typeof (ConcurrentBag<>)) colType = CollectionConcurrentBag; + else if (genType == typeof (ConcurrentQueue<>)) + colType = CollectionConcurrentQueue; else colType = CollectionCustom; } @@ -1151,6 +1156,8 @@ public static ICollection ReadCollection(BinaryReader ctx, res = new SortedSet(); else if (colType == CollectionConcurrentBag) res = new ConcurrentBag(); + else if (colType == CollectionConcurrentQueue) + res = new ConcurrentQueue(); else res = new ArrayList(len); }