TopologyVersionCompareTopologyVersion Method |
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.
Namespace:
MongoDB.Driver.Core.Servers
Assembly:
MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax public static int CompareTopologyVersion(
TopologyVersion x,
TopologyVersion y
)
Public Shared Function CompareTopologyVersion (
x As TopologyVersion,
y As TopologyVersion
) As Integer
static member CompareTopologyVersion :
x : TopologyVersion *
y : TopologyVersion -> int
Parameters
- x
- Type: MongoDB.Driver.Core.ServersTopologyVersion
The first TopologyVersion. - y
- Type: MongoDB.Driver.Core.ServersTopologyVersion
The other TopologyVersion.
Return Value
Type:
Int32
Less than zero indicates that the
x is staler than the
y.
Zero indicates that the
x description is equal to the
y.
Greater than zero indicates that the
x is fresher than the
y.
See Also