|
3 | 3 | // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
|
4 | 4 | // -------------------------------------------------------------------------------------------------
|
5 | 5 |
|
| 6 | +using System; |
6 | 7 | using System.Collections.Generic;
|
7 | 8 | using Microsoft.Azure.Cosmos;
|
8 | 9 |
|
@@ -30,6 +31,24 @@ public class CosmosDataStoreConfiguration
|
30 | 31 |
|
31 | 32 | public ConnectionMode ConnectionMode { get; set; } = ConnectionMode.Direct;
|
32 | 33 |
|
| 34 | + // Default value is indefinate, recommended value is 20m - 24 hours. Setting to 1 hour. |
| 35 | + public TimeSpan? IdleTcpConnectionTimeout { get; set; } = TimeSpan.FromHours(1); |
| 36 | + |
| 37 | + // Default value is 5 seconds, recommended value is 1 second. |
| 38 | + public TimeSpan? OpenTcpConnectionTimeout { get; set; } = TimeSpan.FromSeconds(1); |
| 39 | + |
| 40 | + // Default value is 30, recommended value is 30. Leaving null to use the SDK default. |
| 41 | + public int? MaxRequestsPerTcpConnection { get; set; } |
| 42 | + |
| 43 | + // Default value is 65535, recommended value is 65535. Leaving null to use the SDK default. |
| 44 | + public int? MaxTcpConnectionsPerEndpoint { get; set; } |
| 45 | + |
| 46 | + // Default value is PortReuseMode.ReuseUnicastPort, recommended value is PortReuseMode.ReuseUnicastPort. Leaving null to use the SDK default. |
| 47 | + public PortReuseMode? PortReuseMode { get; set; } |
| 48 | + |
| 49 | + // Default value is true, recommended value is true. Leaving null to use the SDK default. |
| 50 | + public bool EnableTcpConnectionEndpointRediscovery { get; set; } |
| 51 | + |
33 | 52 | public ConsistencyLevel? DefaultConsistencyLevel { get; set; }
|
34 | 53 |
|
35 | 54 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "This is a configuration class")]
|
|
0 commit comments