The MongoDB\Driver\TopologyDescription class

(mongodb >=1.13.0)

Introduction

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.

Synopsis de la classe

finalclassMongoDB\Driver\TopologyDescription {
conststringTYPE_UNKNOWN = "Unknown";
conststringTYPE_SINGLE = "Single";
conststringTYPE_SHARDED = "Sharded";
conststringTYPE_REPLICA_SET_NO_PRIMARY = "ReplicaSetNoPrimary";
conststringTYPE_REPLICA_SET_WITH_PRIMARY = "ReplicaSetWithPrimary";
conststringTYPE_LOAD_BALANCED = "LoadBalanced";
finalpublicgetServers(): array
finalpublicgetType(): string
finalpublichasWritableServer(): bool
}

Sommaire

To Top