PHP Conference Japan 2024

MongoDB\Driver\TopologyDescription 类

(mongodb >=1.13.0)

简介

MongoDB\Driver\TopologyDescription 类是一个值对象,表示驱动程序连接到的拓扑。此类的实例由 MongoDB\Driver\Monitoring\TopologyChangedEvent 方法返回。

类概要

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
}

目录

添加注释

用户贡献的注释

此页面没有用户贡献的注释。
To Top