Table of Contents

Class TopologyVersion

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

Represents a topology description.

public sealed class TopologyVersion : IEquatable<TopologyVersion>, IConvertibleToBsonDocument
Inheritance
TopologyVersion
Implements
Inherited Members

Remarks

Comparing topology descriptions freshness does not exhibit the reversal property of inequalities e.g. IsStalerThan(a, b) (a "<" b) does not imply !IsStalerThan(b, a) (b ">" a) See CompareTopologyVersion(TopologyVersion, TopologyVersion) for more information.

Constructors

TopologyVersion(ObjectId, long)

Initializes a new instance of the TopologyVersion class.

Properties

Counter

Gets the process identifier.

ProcessId

Gets the process identifier.

Methods

CompareTopologyVersion(TopologyVersion, TopologyVersion)

Compares a local TopologyVersion with a server's TopologyVersion and indicates whether the local TopologyVersion is staler, fresher, or equal to the server's TopologyVersion. Per the SDAM specification, if the ProcessIds are not equal, this method assumes that y is more recent. This means that this method does not exhibit the reversal properties of inequalities i.e. a "<" b does not imply b ">" a.

Equals(TopologyVersion)
Equals(object)
FromBsonDocument(BsonDocument)

Attempts to create a TopologyVersion from the supplied BsonDocument.

GetHashCode()
IsFresherThan(TopologyVersion, TopologyVersion)

Gets whether or not x is fresher than y. Comparing topology descriptions freshness does not exhibit the reversal property of inequalities e.g. a.IsFresherThan(b) (a "<" b) does not imply !b.IsFresherThan(a) (b ">" a) See CompareTopologyVersion(TopologyVersion, TopologyVersion) for more information. In the case that this.Equals(y), y will be considered to be fresher.

IsFresherThanOrEqualTo(TopologyVersion, TopologyVersion)

Gets whether or not x is fresher than or Equal to y. Comparing topology descriptions freshness does not exhibit the reversal property of inequalities e.g. a.IsFresherThan(b) (a "<" b) does not imply !b.IsFresherThan(a) (b ">" a) See CompareTopologyVersion(TopologyVersion, TopologyVersion) for more information. In the case that this.Equals(y), y will be considered to be fresher.

IsStalerThan(TopologyVersion, TopologyVersion)

Gets whether or not x is staler than or Equal to y. Comparing topology descriptions freshness does not exhibit the reversal property of inequalities e.g. a.IsStalerThan(b) (a "<" b) does not imply !b.IsStalerThan(a) (b ">" a). See CompareTopologyVersion(TopologyVersion, TopologyVersion) for more information. In the case that this == y, y will be considered to be fresher.

IsStalerThanOrEqualTo(TopologyVersion, TopologyVersion)

Gets whether or not x is staler than or Equal to y. Comparing topology descriptions freshness does not exhibit the reversal property of inequalities e.g. a.IsStalerThan(b) (a "<" b) does not imply !b.IsStalerThan(a) (b ">" a). See CompareTopologyVersion(TopologyVersion, TopologyVersion) for more information. In the case that this == y, y will be considered to be fresher.

ToBsonDocument()

Converts this object to a BsonDocument.

ToString()