IGNITE-10098 .NET: Add missing TcpCommunicationSpi properties

This closes #5379


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

Branch: refs/heads/ignite-9720
Commit: a198b3ff5799899690419e3c0b6306a1eaebd6e7
Parents: c711d4f
Author: Max-Pudov <pudov....@gmail.com>
Authored: Mon Nov 19 17:31:47 2018 +0300
Committer: Pavel Tupitsyn <ptupit...@apache.org>
Committed: Mon Nov 19 17:31:47 2018 +0300

----------------------------------------------------------------------
 .../utils/PlatformConfigurationUtils.java       | 12 +++
 .../Apache.Ignite.Core.Tests.DotNetCore.csproj  |  1 +
 .../Apache.Ignite.Core.Tests.csproj             |  1 +
 .../ApiParity/TcpCommunicationSpiParityTest.cs  | 84 +++++++++++++++++
 .../IgniteConfigurationTest.cs                  | 16 +++-
 .../Communication/Tcp/TcpCommunicationSpi.cs    | 99 ++++++++++++++++++--
 6 files changed, 201 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a198b3ff/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 4649584..fada9d1 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -711,9 +711,11 @@ public class PlatformConfigurationUtils {
             TcpCommunicationSpi comm = new TcpCommunicationSpi();
 
             comm.setAckSendThreshold(in.readInt());
+            comm.setConnectionsPerNode(in.readInt());
             comm.setConnectTimeout(in.readLong());
             comm.setDirectBuffer(in.readBoolean());
             comm.setDirectSendBuffer(in.readBoolean());
+            comm.setFilterReachableAddresses(in.readBoolean());
             comm.setIdleConnectionTimeout(in.readLong());
             comm.setLocalAddress(in.readString());
             comm.setLocalPort(in.readInt());
@@ -722,11 +724,15 @@ public class PlatformConfigurationUtils {
             comm.setMessageQueueLimit(in.readInt());
             comm.setReconnectCount(in.readInt());
             comm.setSelectorsCount(in.readInt());
+            comm.setSelectorSpins(in.readLong());
+            comm.setSharedMemoryPort(in.readInt());
             comm.setSlowClientQueueLimit(in.readInt());
             comm.setSocketReceiveBuffer(in.readInt());
             comm.setSocketSendBuffer(in.readInt());
+            comm.setSocketWriteTimeout(in.readLong());
             comm.setTcpNoDelay(in.readBoolean());
             comm.setUnacknowledgedMessagesBufferSize(in.readInt());
+            comm.setUsePairedConnections(in.readBoolean());
 
             cfg.setCommunicationSpi(comm);
         }
@@ -1297,9 +1303,11 @@ public class PlatformConfigurationUtils {
             TcpCommunicationSpi tcp = (TcpCommunicationSpi) comm;
 
             w.writeInt(tcp.getAckSendThreshold());
+            w.writeInt(tcp.getConnectionsPerNode());
             w.writeLong(tcp.getConnectTimeout());
             w.writeBoolean(tcp.isDirectBuffer());
             w.writeBoolean(tcp.isDirectSendBuffer());
+            w.writeBoolean(tcp.isFilterReachableAddresses());
             w.writeLong(tcp.getIdleConnectionTimeout());
             w.writeString(tcp.getLocalAddress());
             w.writeInt(tcp.getLocalPort());
@@ -1308,11 +1316,15 @@ public class PlatformConfigurationUtils {
             w.writeInt(tcp.getMessageQueueLimit());
             w.writeInt(tcp.getReconnectCount());
             w.writeInt(tcp.getSelectorsCount());
+            w.writeLong(tcp.getSelectorSpins());
+            w.writeInt(tcp.getSharedMemoryPort());
             w.writeInt(tcp.getSlowClientQueueLimit());
             w.writeInt(tcp.getSocketReceiveBuffer());
             w.writeInt(tcp.getSocketSendBuffer());
+            w.writeLong(tcp.getSocketWriteTimeout());
             w.writeBoolean(tcp.isTcpNoDelay());
             w.writeInt(tcp.getUnacknowledgedMessagesBufferSize());
+            w.writeBoolean(tcp.isUsePairedConnections());
         }
         else
             w.writeBoolean(false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a198b3ff/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj
index 6550a7f..2ec0bdb 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj
@@ -42,6 +42,7 @@
     <Compile 
Include="..\Apache.Ignite.Core.Tests\ApiParity\QueryEntityConfigurationParityTest.cs"
 Link="ApiParity\QueryEntityConfigurationParityTest.cs" />
     <Compile 
Include="..\Apache.Ignite.Core.Tests\ApiParity\ServicesParityTest.cs" 
Link="ApiParity\ServicesParityTest.cs" />
     <Compile 
Include="..\Apache.Ignite.Core.Tests\ApiParity\StreamerParityTest.cs" 
Link="ApiParity\StreamerParityTest.cs" />
+    <Compile 
Include="..\Apache.Ignite.Core.Tests\ApiParity\TcpCommunicationSpiParityTest.cs"
 Link="ApiParity\TcpCommunicationSpiParityTest.cs" />
     <Compile 
Include="..\Apache.Ignite.Core.Tests\ApiParity\TransactionMetricsParityTest.cs" 
Link="ApiParity\TransactionMetricsParityTest.cs" />
     <Compile 
Include="..\Apache.Ignite.Core.Tests\ApiParity\TransactionsParityTest.cs" 
Link="ApiParity\TransactionsParityTest.cs" />
     <Compile Include="..\Apache.Ignite.Core.Tests\AssertExtensions.cs" 
Link="Common\AssertExtensions.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/a198b3ff/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index aa58afc..e2d4146 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -94,6 +94,7 @@
     <Compile Include="ApiParity\QueryEntityConfigurationParityTest.cs" />
     <Compile Include="ApiParity\ServicesParityTest.cs" />
     <Compile Include="ApiParity\StreamerParityTest.cs" />
+    <Compile Include="ApiParity\TcpCommunicationSpiParityTest.cs" />
     <Compile Include="ApiParity\TransactionMetricsParityTest.cs" />
     <Compile Include="ApiParity\TransactionsParityTest.cs" />
     <Compile Include="AssertExtensions.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/a198b3ff/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
new file mode 100644
index 0000000..be8bd11
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
@@ -0,0 +1,84 @@
+/*
+ * 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.Tests.ApiParity
+{
+    using System.Collections.Generic;
+    using Apache.Ignite.Core.Cache.Configuration;
+    using Apache.Ignite.Core.Communication.Tcp;
+    using NUnit.Framework;
+
+    /// <summary>
+    /// Tests that .NET <see cref="CacheConfiguration"/> has all properties 
from Java configuration APIs.
+    /// </summary>
+    public class TcpCommunicationSpiParityTest
+    {
+        /** Known property name mappings. */
+        private static readonly Dictionary<string, string> KnownMappings = new 
Dictionary<string, string>()
+        {
+            {"SocketReceiveBuffer", "SocketReceiveBufferSize"},
+            {"SocketSendBuffer", "SocketSendBufferSize"}
+        };
+
+        /** Properties that are not needed on .NET side. */
+        private static readonly string[] UnneededProperties =
+        {
+            // Java-specific.
+            "AddressResolver",
+            "Listener",
+            "run",
+            "ReceivedMessagesByType",
+            "ReceivedMessagesByNode",
+            "SentMessagesByType",
+            "SentMessagesByNode",
+            "SentMessagesCount",
+            "SentBytesCount",
+            "ReceivedMessagesCount",
+            "ReceivedBytesCount",
+            "OutboundMessagesQueueSize",
+            "resetMetrics",
+            "dumpStats",
+            "boundPort",
+            "SpiContext",
+            "simulateNodeFailure",
+            "cancel",
+            "order",
+            "onTimeout",
+            "endTime",
+            "id",
+            "connectionIndex",
+            "NodeFilter"
+        };
+
+        /** Properties that are missing on .NET side. */
+        private static readonly string[] MissingProperties = {};
+
+        /// <summary>
+        /// Tests the cache configuration parity.
+        /// </summary>
+        [Test]
+        public void TestTcpCommunicationSpi()
+        {
+            ParityTest.CheckConfigurationParity(
+                
@"modules\core\src\main\java\org\apache\ignite\spi\communication\tcp\TcpCommunicationSpi.java",
 
+                typeof(TcpCommunicationSpi),
+                UnneededProperties,
+                MissingProperties,
+                KnownMappings);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a198b3ff/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index c26e5a3..f0f3b7c 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -186,9 +186,11 @@ namespace Apache.Ignite.Core.Tests
                 var com = (TcpCommunicationSpi) cfg.CommunicationSpi;
                 var resCom = (TcpCommunicationSpi) resCfg.CommunicationSpi;
                 Assert.AreEqual(com.AckSendThreshold, resCom.AckSendThreshold);
+                Assert.AreEqual(com.ConnectionsPerNode, 
resCom.ConnectionsPerNode);
                 Assert.AreEqual(com.ConnectTimeout, resCom.ConnectTimeout);
                 Assert.AreEqual(com.DirectBuffer, resCom.DirectBuffer);
                 Assert.AreEqual(com.DirectSendBuffer, resCom.DirectSendBuffer);
+                Assert.AreEqual(com.FilterReachableAddresses, 
resCom.FilterReachableAddresses);
                 Assert.AreEqual(com.IdleConnectionTimeout, 
resCom.IdleConnectionTimeout);
                 Assert.AreEqual(com.LocalAddress, resCom.LocalAddress);
                 Assert.AreEqual(com.LocalPort, resCom.LocalPort);
@@ -197,12 +199,16 @@ namespace Apache.Ignite.Core.Tests
                 Assert.AreEqual(com.MessageQueueLimit, 
resCom.MessageQueueLimit);
                 Assert.AreEqual(com.ReconnectCount, resCom.ReconnectCount);
                 Assert.AreEqual(com.SelectorsCount, resCom.SelectorsCount);
+                Assert.AreEqual(com.SelectorSpins, resCom.SelectorSpins);
+                Assert.AreEqual(com.SharedMemoryPort, resCom.SharedMemoryPort);
                 Assert.AreEqual(com.SlowClientQueueLimit, 
resCom.SlowClientQueueLimit);
                 Assert.AreEqual(com.SocketReceiveBufferSize, 
resCom.SocketReceiveBufferSize);
                 Assert.AreEqual(com.SocketSendBufferSize, 
resCom.SocketSendBufferSize);
+                Assert.AreEqual(com.SocketWriteTimeout, 
resCom.SocketWriteTimeout);
                 Assert.AreEqual(com.TcpNoDelay, resCom.TcpNoDelay);
                 Assert.AreEqual(com.UnacknowledgedMessagesBufferSize, 
resCom.UnacknowledgedMessagesBufferSize);
-
+                Assert.AreEqual(com.UsePairedConnections, 
resCom.UsePairedConnections);
+                
                 Assert.AreEqual(cfg.FailureDetectionTimeout, 
resCfg.FailureDetectionTimeout);
                 Assert.AreEqual(cfg.SystemWorkerBlockedTimeout, 
resCfg.SystemWorkerBlockedTimeout);
                 Assert.AreEqual(cfg.ClientFailureDetectionTimeout, 
resCfg.ClientFailureDetectionTimeout);
@@ -750,7 +756,13 @@ namespace Apache.Ignite.Core.Tests
                     TcpNoDelay = false,
                     SlowClientQueueLimit = 98,
                     SocketSendBufferSize = 2045,
-                    UnacknowledgedMessagesBufferSize = 3450
+                    UnacknowledgedMessagesBufferSize = 3450,
+                    ConnectionsPerNode = 12, 
+                    UsePairedConnections = true,
+                    SharedMemoryPort = 1234,
+                    SocketWriteTimeout = 2222,
+                    SelectorSpins = 12,
+                    FilterReachableAddresses = true
                 },
                 FailureDetectionTimeout = TimeSpan.FromSeconds(3.5),
                 SystemWorkerBlockedTimeout = TimeSpan.FromSeconds(8.5),

http://git-wip-us.apache.org/repos/asf/ignite/blob/a198b3ff/modules/platforms/dotnet/Apache.Ignite.Core/Communication/Tcp/TcpCommunicationSpi.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Communication/Tcp/TcpCommunicationSpi.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core/Communication/Tcp/TcpCommunicationSpi.cs
index d272906..b070f9a 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core/Communication/Tcp/TcpCommunicationSpi.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Communication/Tcp/TcpCommunicationSpi.cs
@@ -40,6 +40,9 @@ namespace Apache.Ignite.Core.Communication.Tcp
         /// <summary> Default value of <see cref="AckSendThreshold"/> 
property. </summary>
         public const int DefaultAckSendThreshold = 16;
 
+        /// <summary> Default value of <see cref="ConnectionsPerNode"/> 
property. </summary>
+        public const int DefaultConnectionsPerNode = 1;
+
         /// <summary> Default value of <see cref="ConnectTimeout"/> property. 
</summary>
         public static readonly TimeSpan DefaultConnectTimeout = 
TimeSpan.FromSeconds(5);
 
@@ -49,6 +52,9 @@ namespace Apache.Ignite.Core.Communication.Tcp
         /// <summary> Default value of <see cref="DirectSendBuffer"/> 
property. </summary>
         public const bool DefaultDirectSendBuffer = false;
 
+        /// <summary> Default value of <see cref="FilterReachableAddresses"/> 
property. </summary>
+        public const bool DefaultFilterReachableAddresses = false;
+
         /// <summary> Default value of <see cref="IdleConnectionTimeout"/> 
property. </summary>
         public static readonly TimeSpan DefaultIdleConnectionTimeout = 
TimeSpan.FromSeconds(30);
 
@@ -70,31 +76,49 @@ namespace Apache.Ignite.Core.Communication.Tcp
         /// <summary> Default value of <see cref="SelectorsCount"/> property. 
</summary>
         public static readonly int DefaultSelectorsCount = Math.Min(4, 
Environment.ProcessorCount);
 
+        /// <summary> Default value of <see cref="SelectorSpins"/> property. 
</summary>
+        public const long DefaultSelectorSpins = 0;
+
+        /// <summary> Default value of <see cref="SharedMemoryPort"/> 
property. </summary>
+        public const int DefaultSharedMemoryPort = -1;
+
         /// <summary> Default socket buffer size. </summary>
         public const int DefaultSocketBufferSize = 32 * 1024;
 
+        /// <summary> Default value of <see cref="SocketWriteTimeout"/> 
property. </summary>
+        public const long DefaultSocketWriteTimeout = 2000;
+
         /// <summary> Default value of <see cref="TcpNoDelay"/> property. 
</summary>
         public const bool DefaultTcpNoDelay = true;
 
+        /// <summary> Default value of <see cref="UsePairedConnections"/> 
property. </summary>
+        public const bool DefaultUsePairedConnections = false;
+
         /// <summary>
         /// Initializes a new instance of the <see 
cref="TcpCommunicationSpi"/> class.
         /// </summary>
         public TcpCommunicationSpi()
         {
             AckSendThreshold = DefaultAckSendThreshold;
+            ConnectionsPerNode = DefaultConnectionsPerNode;
             ConnectTimeout = DefaultConnectTimeout;
             DirectBuffer = DefaultDirectBuffer;
             DirectSendBuffer = DefaultDirectSendBuffer;
+            FilterReachableAddresses = DefaultFilterReachableAddresses;
             IdleConnectionTimeout = DefaultIdleConnectionTimeout;
             LocalPort = DefaultLocalPort;
             LocalPortRange = DefaultLocalPortRange;
             MaxConnectTimeout = DefaultMaxConnectTimeout;
             MessageQueueLimit = DefaultMessageQueueLimit;
             ReconnectCount = DefaultReconnectCount;
+            SharedMemoryPort = DefaultSharedMemoryPort;
             SelectorsCount = DefaultSelectorsCount;
+            SelectorSpins = DefaultSelectorSpins;
             SocketReceiveBufferSize = DefaultSocketBufferSize;
             SocketSendBufferSize = DefaultSocketBufferSize;
+            SocketWriteTimeout = DefaultSocketWriteTimeout;
             TcpNoDelay = DefaultTcpNoDelay;
+            UsePairedConnections = DefaultUsePairedConnections;
         }
 
         /// <summary>
@@ -104,9 +128,11 @@ namespace Apache.Ignite.Core.Communication.Tcp
         internal TcpCommunicationSpi(IBinaryRawReader reader)
         {
             AckSendThreshold = reader.ReadInt();
+            ConnectionsPerNode = reader.ReadInt();
             ConnectTimeout = reader.ReadLongAsTimespan();
             DirectBuffer = reader.ReadBoolean();
             DirectSendBuffer = reader.ReadBoolean();
+            FilterReachableAddresses = reader.ReadBoolean();
             IdleConnectionTimeout = reader.ReadLongAsTimespan();
             LocalAddress = reader.ReadString();
             LocalPort = reader.ReadInt();
@@ -115,15 +141,19 @@ namespace Apache.Ignite.Core.Communication.Tcp
             MessageQueueLimit = reader.ReadInt();
             ReconnectCount = reader.ReadInt();
             SelectorsCount = reader.ReadInt();
+            SelectorSpins = reader.ReadLong();
+            SharedMemoryPort = reader.ReadInt();
             SlowClientQueueLimit = reader.ReadInt();
             SocketReceiveBufferSize = reader.ReadInt();
             SocketSendBufferSize = reader.ReadInt();
+            SocketWriteTimeout = reader.ReadLong();
             TcpNoDelay = reader.ReadBoolean();
             UnacknowledgedMessagesBufferSize = reader.ReadInt();
+            UsePairedConnections = reader.ReadBoolean();
         }
 
         /// <summary>
-        /// Gets or sets the number of received messages per connection to 
node 
+        /// Gets or sets the number of received messages per connection to node
         /// after which acknowledgment message is sent.
         /// </summary>
         [DefaultValue(DefaultAckSendThreshold)]
@@ -136,14 +166,14 @@ namespace Apache.Ignite.Core.Communication.Tcp
         public TimeSpan ConnectTimeout { get; set; }
 
         /// <summary>
-        /// Gets or sets a value indicating whether to allocate direct 
(ByteBuffer.allocateDirect) 
+        /// Gets or sets a value indicating whether to allocate direct 
(ByteBuffer.allocateDirect)
         /// or heap (ByteBuffer.allocate) buffer.
         /// </summary>
         [DefaultValue(DefaultDirectBuffer)]
         public bool DirectBuffer { get; set; }
 
         /// <summary>
-        /// Gets or sets a value indicating whether to allocate direct 
(ByteBuffer.allocateDirect) 
+        /// Gets or sets a value indicating whether to allocate direct 
(ByteBuffer.allocateDirect)
         /// or heap (ByteBuffer.allocate) send buffer.
         /// </summary>
         [DefaultValue(DefaultDirectSendBuffer)]
@@ -156,7 +186,7 @@ namespace Apache.Ignite.Core.Communication.Tcp
         public TimeSpan IdleConnectionTimeout { get; set; }
 
         /// <summary>
-        /// Gets or sets the local host address for socket binding. Note that 
one node could have 
+        /// Gets or sets the local host address for socket binding. Note that 
one node could have
         /// additional addresses beside the loopback one. This configuration 
parameter is optional.
         /// </summary>
         public string LocalAddress { get; set; }
@@ -193,7 +223,7 @@ namespace Apache.Ignite.Core.Communication.Tcp
         /// <summary>
         /// Gets or sets the message queue limit for incoming and outgoing 
messages.
         /// <para />
-        /// When set to positive number send queue is limited to the 
configured value. 
+        /// When set to positive number send queue is limited to the 
configured value.
         /// <c>0</c> disables the limitation.
         /// </summary>
         [DefaultValue(DefaultMessageQueueLimit)]
@@ -216,11 +246,11 @@ namespace Apache.Ignite.Core.Communication.Tcp
         /// <summary>
         /// Gets or sets slow client queue limit.
         /// <para/>
-        /// When set to a positive number, communication SPI will monitor 
clients outbound message queue sizes 
+        /// When set to a positive number, communication SPI will monitor 
clients outbound message queue sizes
         /// and will drop those clients whose queue exceeded this limit.
         /// <para/>
         /// Usually this value should be set to the same value as <see 
cref="MessageQueueLimit"/> which controls
-        /// message back-pressure for server nodes. The default value for this 
parameter is <c>0</c> 
+        /// message back-pressure for server nodes. The default value for this 
parameter is <c>0</c>
         /// which means unlimited.
         /// </summary>
         public int SlowClientQueueLimit { get; set; }
@@ -230,7 +260,7 @@ namespace Apache.Ignite.Core.Communication.Tcp
         /// </summary>
         [DefaultValue(DefaultSocketBufferSize)]
         public int SocketReceiveBufferSize { get; set; }
-        
+
         /// <summary>
         /// Gets or sets the size of the socket send buffer.
         /// </summary>
@@ -250,21 +280,66 @@ namespace Apache.Ignite.Core.Communication.Tcp
         public bool TcpNoDelay { get; set; }
 
         /// <summary>
-        /// Gets or sets the maximum number of stored unacknowledged messages 
per connection to node. 
-        /// If number of unacknowledged messages exceeds this number 
+        /// Gets or sets the maximum number of stored unacknowledged messages 
per connection to node.
+        /// If number of unacknowledged messages exceeds this number
         /// then connection to node is closed and reconnect is attempted.
         /// </summary>
         public int UnacknowledgedMessagesBufferSize { get; set; }
 
         /// <summary>
+        /// Gets or sets the number of connections per node.
+        /// </summary>
+        [DefaultValue(DefaultConnectionsPerNode)]
+        public int ConnectionsPerNode { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether separate connections 
should be used for incoming and outgoing data.
+        /// Set this to <c>true</c> if <see cref="ConnectionsPerNode"/> should 
maintain connection for outgoing
+        /// and incoming messages separately. In this case total number of 
connections between local and each remote
+        /// node is equals to <see cref="ConnectionsPerNode"/> * 2.
+        /// </summary>
+        public bool UsePairedConnections { get; set; }
+
+        /// <summary>
+        /// Gets or sets a local port to accept shared memory connections.
+        /// </summary>
+        [DefaultValue(DefaultSharedMemoryPort)]
+        public int SharedMemoryPort { get; set; }
+
+        /// <summary>
+        /// Gets or sets socket write timeout for TCP connection. If message 
can not be written to
+        /// socket within this time then connection is closed and reconnect is 
attempted.
+        /// <para />
+        /// Default value is <see cref="DefaultSocketWriteTimeout"/>.
+        /// </summary>
+        [DefaultValue(DefaultSocketWriteTimeout)]
+        public long SocketWriteTimeout { get; set; }
+
+        /// <summary>
+        /// Gets or sets a values that defines how many non-blocking selectors 
should be made.
+        /// Can be set to <see cref="Int64.MaxValue"/> so selector threads 
will never block.
+        /// <para />
+        /// Default value is <see cref="DefaultSelectorSpins"/>.
+        /// </summary>
+        public long SelectorSpins { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether filter for reachable 
addresses
+        /// should be enabled on creating tcp client.
+        /// </summary>
+        public bool FilterReachableAddresses { get; set; }
+
+        /// <summary>
         /// Writes this instance to the specified writer.
         /// </summary>
         internal void Write(IBinaryRawWriter writer)
         {
             writer.WriteInt(AckSendThreshold);
+            writer.WriteInt(ConnectionsPerNode);
             writer.WriteLong((long) ConnectTimeout.TotalMilliseconds);
             writer.WriteBoolean(DirectBuffer);
             writer.WriteBoolean(DirectSendBuffer);
+            writer.WriteBoolean(FilterReachableAddresses);
             writer.WriteLong((long) IdleConnectionTimeout.TotalMilliseconds);
             writer.WriteString(LocalAddress);
             writer.WriteInt(LocalPort);
@@ -273,11 +348,15 @@ namespace Apache.Ignite.Core.Communication.Tcp
             writer.WriteInt(MessageQueueLimit);
             writer.WriteInt(ReconnectCount);
             writer.WriteInt(SelectorsCount);
+            writer.WriteLong(SelectorSpins);
+            writer.WriteInt(SharedMemoryPort);
             writer.WriteInt(SlowClientQueueLimit);
             writer.WriteInt(SocketReceiveBufferSize);
             writer.WriteInt(SocketSendBufferSize);
+            writer.WriteLong(SocketWriteTimeout);
             writer.WriteBoolean(TcpNoDelay);
             writer.WriteInt(UnacknowledgedMessagesBufferSize);
+            writer.WriteBoolean(UsePairedConnections);
         }
     }
 }

Reply via email to