php8.5
Home/ Manual/ mongodb / driver/ The MongoDB\Driver\TopologyDescription class

The MongoDB\Driver\TopologyDescription class

The MongoDB\Driver\TopologyDescription class is a value object that represents a topology to which the driver is connected. Instances of this class are returned by MongoDB\Driver\Monitoring\TopologyChangedEvent methods.

Intro

The MongoDB\Driver\TopologyDescription class is a value object that represents a topology to which the driver is connected. Instances of this class are returned by MongoDB\Driver\Monitoring\TopologyChangedEvent methods.

Class synopsis

class MongoDB\Driver\TopologyDescription { }

Predefined Constants

MongoDB\Driver\TopologyDescription::TYPE_UNKNOWN

Unknown topology type, returned by MongoDB\Driver\TopologyDescription::getType.

MongoDB\Driver\TopologyDescription::TYPE_SINGLE

Single server (i.e. direct connection), returned by MongoDB\Driver\TopologyDescription::getType.

MongoDB\Driver\TopologyDescription::TYPE_SHARDED

Sharded cluster, returned by MongoDB\Driver\TopologyDescription::getType.

MongoDB\Driver\TopologyDescription::TYPE_REPLICA_SET_NO_PRIMARY

Replica set with no primary server, returned by MongoDB\Driver\TopologyDescription::getType.

MongoDB\Driver\TopologyDescription::TYPE_REPLICA_SET_WITH_PRIMARY

Replica set with a primary server, returned by MongoDB\Driver\TopologyDescription::getType.

MongoDB\Driver\TopologyDescription::TYPE_LOAD_BALANCED

Load balanced topology, returned by MongoDB\Driver\TopologyDescription::getType.

Topologydescription

In this section

Source: reference/mongodb/mongodb/driver/topologydescription.xml · from the official PHP manual (php/doc-en)