Click or drag to resize

ClusterSettings Constructor

Initializes a new instance of the ClusterSettings class.

Namespace:  MongoDB.Driver.Core.Configuration
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.14.0+2b37a1fe1cbdbe1a020b52b77f1197b6d77575e7
Syntax
public ClusterSettings(
	Optional<ClusterConnectionMode> connectionMode = default,
	Optional<ConnectionModeSwitch> connectionModeSwitch = default,
	Optional<bool?> directConnection = default,
	Optional<IEnumerable<EndPoint>> endPoints = default,
	Optional<IReadOnlyDictionary<string, IReadOnlyDictionary<string, Object>>> kmsProviders = default,
	Optional<bool> loadBalanced = default,
	Optional<TimeSpan> localThreshold = default,
	Optional<int> maxServerSelectionWaitQueueSize = default,
	Optional<string> replicaSetName = default,
	Optional<ServerApi> serverApi = default,
	Optional<TimeSpan> serverSelectionTimeout = default,
	Optional<IServerSelector> preServerSelector = default,
	Optional<IServerSelector> postServerSelector = default,
	Optional<IReadOnlyDictionary<string, BsonDocument>> schemaMap = default,
	Optional<ConnectionStringScheme> scheme = default,
	Optional<int> srvMaxHosts = default
)

Parameters

connectionMode (Optional)
Type: MongoDB.DriverOptionalClusterConnectionMode
The connection mode.
connectionModeSwitch (Optional)
Type: MongoDB.DriverOptionalConnectionModeSwitch
The connection mode switch.
directConnection (Optional)
Type: MongoDB.DriverOptionalNullableBoolean
The directConnection.
endPoints (Optional)
Type: MongoDB.DriverOptionalIEnumerableEndPoint
The end points.
kmsProviders (Optional)
Type: MongoDB.DriverOptionalIReadOnlyDictionaryString, IReadOnlyDictionaryString, Object
The kms providers.
loadBalanced (Optional)
Type: MongoDB.DriverOptionalBoolean
The load balanced.
localThreshold (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The local threshold.
maxServerSelectionWaitQueueSize (Optional)
Type: MongoDB.DriverOptionalInt32
Maximum size of the server selection wait queue.
replicaSetName (Optional)
Type: MongoDB.DriverOptionalString
Name of the replica set.
serverApi (Optional)
Type: MongoDB.DriverOptionalServerApi
The server API.
serverSelectionTimeout (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The server selection timeout.
preServerSelector (Optional)
Type: MongoDB.DriverOptionalIServerSelector
The pre server selector.
postServerSelector (Optional)
Type: MongoDB.DriverOptionalIServerSelector
The post server selector.
schemaMap (Optional)
Type: MongoDB.DriverOptionalIReadOnlyDictionaryString, BsonDocument
The schema map.
scheme (Optional)
Type: MongoDB.DriverOptionalConnectionStringScheme
The connection string scheme.
srvMaxHosts (Optional)
Type: MongoDB.DriverOptionalInt32
Limits the number of SRV records used to populate the seedlist during initial discovery, as well as the number of additional hosts that may be added during SRV polling.
See Also