ClusterSettingsWith Method |
Returns a new ClusterSettings instance with some settings changed.
Namespace: MongoDB.Driver.Core.ConfigurationAssembly: MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.4.1
Syntax public ClusterSettings With(
Optional<ClusterConnectionMode> connectionMode = null,
Optional<IEnumerable<EndPoint>> endPoints = null,
Optional<int> maxServerSelectionWaitQueueSize = null,
Optional<string> replicaSetName = null,
Optional<TimeSpan> serverSelectionTimeout = null,
Optional<IServerSelector> preServerSelector = null,
Optional<IServerSelector> postServerSelector = null
)
Public Function With (
Optional connectionMode As Optional(Of ClusterConnectionMode) = Nothing,
Optional endPoints As Optional(Of IEnumerable(Of EndPoint)) = Nothing,
Optional maxServerSelectionWaitQueueSize As Optional(Of Integer) = Nothing,
Optional replicaSetName As Optional(Of String) = Nothing,
Optional serverSelectionTimeout As Optional(Of TimeSpan) = Nothing,
Optional preServerSelector As Optional(Of IServerSelector) = Nothing,
Optional postServerSelector As Optional(Of IServerSelector) = Nothing
) As ClusterSettings
member With :
?connectionMode : Optional<ClusterConnectionMode> *
?endPoints : Optional<IEnumerable<EndPoint>> *
?maxServerSelectionWaitQueueSize : Optional<int> *
?replicaSetName : Optional<string> *
?serverSelectionTimeout : Optional<TimeSpan> *
?preServerSelector : Optional<IServerSelector> *
?postServerSelector : Optional<IServerSelector>
(* Defaults:
let _connectionMode = defaultArg connectionMode null
let _endPoints = defaultArg endPoints null
let _maxServerSelectionWaitQueueSize = defaultArg maxServerSelectionWaitQueueSize null
let _replicaSetName = defaultArg replicaSetName null
let _serverSelectionTimeout = defaultArg serverSelectionTimeout null
let _preServerSelector = defaultArg preServerSelector null
let _postServerSelector = defaultArg postServerSelector null
*)
-> ClusterSettings
Parameters
- connectionMode (Optional)
- Type: MongoDB.DriverOptionalClusterConnectionMode
The connection mode. - endPoints (Optional)
- Type: MongoDB.DriverOptionalIEnumerableEndPoint
The end points. - maxServerSelectionWaitQueueSize (Optional)
- Type: MongoDB.DriverOptionalInt32
Maximum size of the server selection wait queue. - replicaSetName (Optional)
- Type: MongoDB.DriverOptionalString
Name of the replica set. - 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.
Return Value
Type:
ClusterSettingsA new ClusterSettings instance.
See Also