Class TopologyDescription

Representation of a deployment of servers

Constructors

  • Create a TopologyDescription

    Parameters

    Returns TopologyDescription

Properties

commonWireVersion: number
compatibilityError?: string
compatible: boolean
heartbeatFrequencyMS: number
localThresholdMS: number
logicalSessionTimeoutMinutes: null | number
maxElectionId: null | ObjectId
maxSetVersion: null | number
servers: Map<string, ServerDescription>
setName: null | string
stale: boolean

Accessors

  • get error(): null | MongoError
  • Returns null | MongoError

  • get hasDataBearingServers(): boolean
  • Determines if this topology description has a data-bearing server available.

    Returns boolean

  • get hasKnownServers(): boolean
  • Determines if the topology description has any known servers

    Returns boolean

Methods

  • Returns a JSON-serializable representation of the TopologyDescription. This is primarily intended for use with JSON.stringify().

    This method will not throw.

    Returns Document