Table of Contents

Class ServerDescription

Namespace
MongoDB.Driver.Core.Servers
Assembly
MongoDB.Driver.Core.dll

Represents information about a server.

public sealed class ServerDescription : IEquatable<ServerDescription>
Inheritance
ServerDescription
Implements
Inherited Members

Constructors

ServerDescription(ServerId, EndPoint, Optional<string>, Optional<TimeSpan>, Optional<EndPoint>, Optional<ElectionId>, Optional<Exception>, Optional<TimeSpan>, Optional<bool>, Optional<DateTime?>, Optional<DateTime>, Optional<DateTime?>, Optional<TimeSpan?>, Optional<int>, Optional<int>, Optional<int>, Optional<int>, Optional<ReplicaSetConfig>, Optional<ServerState>, Optional<TagSet>, Optional<TopologyVersion>, Optional<ServerType>, Optional<SemanticVersion>, Optional<Range<int>>)

Initializes a new instance of the ServerDescription class.

Properties

AverageRoundTripTime

Gets the average round trip time.

CanonicalEndPoint

Gets the canonical end point. This is the endpoint that the cluster knows this server by. Currently, it only applies to a replica set config and will match what is in the replica set configuration.

ElectionId

Gets the election identifier.

EndPoint

Gets the end point.

HeartbeatException

Gets the most recent heartbeat exception.

HeartbeatInterval

Gets the heartbeat interval.

HelloOk

Whether the server supports the hello command.

IsCompatibleWithDriver

Gets a value indicating whether this server is compatible with the driver.

IsDataBearing

Gets a value indicating whether this instance is a data bearing server.

LastHeartbeatTimestamp

Gets the last heartbeat timestamp.

LastUpdateTimestamp

Gets the last update timestamp (when the ServerDescription itself was last updated).

LastWriteTimestamp

Gets the last write timestamp (from the lastWrite field of the hello or legacy hello result).

LogicalSessionTimeout

Gets the logical session timeout.

MaxBatchCount

Gets the maximum number of documents in a batch.

MaxDocumentSize

Gets the maximum size of a document.

MaxMessageSize

Gets the maximum size of a message.

MaxWireDocumentSize

Gets the maximum size of a wire document.

MaxWireVersion

Gets the maximum wire version.

ReasonChanged

The reason the server description was last changed.

ReplicaSetConfig

Gets the replica set configuration.

ServerId

Gets the server identifier.

State

Gets the server state.

Tags

Gets the replica set tags.

TopologyVersion

Gets the topology version.

Type

Gets the server type.

Version

Gets the approximate server version (only the major and minor version numbers are known).

WireVersionRange

Gets the wire version range.

Methods

Equals(ServerDescription)
Equals(object)
GetHashCode()
SdamEquals(ServerDescription)

Determines whether the specified ServerDescription can be considered as equal to decide should we publish sdam events or not.

ToString()
With(Optional<string>, Optional<TimeSpan>, Optional<EndPoint>, Optional<bool>, Optional<ElectionId>, Optional<Exception>, Optional<TimeSpan>, Optional<DateTime?>, Optional<DateTime>, Optional<DateTime?>, Optional<TimeSpan?>, Optional<int>, Optional<int>, Optional<int>, Optional<int>, Optional<ReplicaSetConfig>, Optional<ServerState>, Optional<TagSet>, Optional<TopologyVersion>, Optional<ServerType>, Optional<SemanticVersion>, Optional<Range<int>>)

Returns a new instance of ServerDescription with some values changed.

WithHeartbeatException(Exception)

Returns a new ServerDescription with a new HeartbeatException.