略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: MongoDB\Driver\TopologyDescription

2025-02-27

The MongoDB\Driver\TopologyDescription class

(mongodb >=1.13.0)

简介

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.

类摘要

final class MongoDB\Driver\TopologyDescription {
/* 常量 */
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";
/* 方法 */
final public getServers(): array
final public getType(): string
final public hasWritableServer(): bool
}

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/class.mongodb-driver-topologydescription.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3