Table of Contents

Class ServerSettings

Namespace
MongoDB.Driver.Core.Configuration
Assembly
MongoDB.Driver.Core.dll

Represents settings for a server.

public class ServerSettings
Inheritance
ServerSettings
Inherited Members

Constructors

ServerSettings(Optional<TimeSpan>, Optional<TimeSpan>)

Initializes a new instance of the ServerSettings class.

public ServerSettings(Optional<TimeSpan> heartbeatInterval = default, Optional<TimeSpan> heartbeatTimeout = default)

Parameters

heartbeatInterval Optional<TimeSpan>

The heartbeat interval.

heartbeatTimeout Optional<TimeSpan>

The heartbeat timeout.

Properties

DefaultHeartbeatInterval

Gets the default heartbeat interval.

public static TimeSpan DefaultHeartbeatInterval { get; }

Property Value

TimeSpan

DefaultHeartbeatTimeout

Gets the default heartbeat timeout.

public static TimeSpan DefaultHeartbeatTimeout { get; }

Property Value

TimeSpan

HeartbeatInterval

Gets the heartbeat interval.

public TimeSpan HeartbeatInterval { get; }

Property Value

TimeSpan

The heartbeat interval.

HeartbeatTimeout

Gets the heartbeat timeout.

public TimeSpan HeartbeatTimeout { get; }

Property Value

TimeSpan

The heartbeat timeout.

Methods

With(Optional<TimeSpan>, Optional<TimeSpan>)

Returns a new ServerSettings instance with some settings changed.

public ServerSettings With(Optional<TimeSpan> heartbeatInterval = default, Optional<TimeSpan> heartbeatTimeout = default)

Parameters

heartbeatInterval Optional<TimeSpan>

The heartbeat interval.

heartbeatTimeout Optional<TimeSpan>

The heartbeat timeout.

Returns

ServerSettings

A new ServerSettings instance.