update page now
Longhorn PHP 2026 - Call For Papers

La clase MongoDB\Driver\TopologyDescription

(mongodb >=1.13.0)

Introducción

La clase MongoDB\Driver\TopologyDescription es un objeto valor que representa una topología a la que el controlador está conectado. Las instancias de esta clase son devueltas por los métodos de MongoDB\Driver\Monitoring\TopologyChangedEvent.

Sinopsis de la Clase

final class MongoDB\Driver\TopologyDescription {
/* Constantes */
const string TYPE_UNKNOWN = "Unknown";
const string TYPE_SINGLE = "Single";
const string TYPE_SHARDED = "Sharded";
const string TYPE_REPLICA_SET_NO_PRIMARY = "ReplicaSetNoPrimary";
const string TYPE_REPLICA_SET_WITH_PRIMARY = "ReplicaSetWithPrimary";
const string TYPE_LOAD_BALANCED = "LoadBalanced";
/* Métodos */
final public function getServers(): array
final public function getType(): string
final public function hasReadableServer(?MongoDB\Driver\ReadPreference $readPreference = null): bool
final public function hasWritableServer(): bool
}

Tabla de contenidos

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top