The MongoDB\Driver\Monitoring\ServerOpeningEvent class
(mongodb >=1.13.0)
Introduction
The MongoDB\Driver\Monitoring\ServerOpeningEvent class encapsulates information about an opened server. This corresponds to a new server being added to the topology.
Class synopsis
final
class MongoDB\Driver\Monitoring\ServerOpeningEvent
{
/* Properties */
/* Methods */
}Properties
hostThe hostname of the server.
portThe port of the server.
topologyIdThe topology ID.
Changelog
| Version | Description |
|---|---|
| PECL mongodb 2.3.0 | Added public readonly properties. |
Table of Contents
- MongoDB\Driver\Monitoring\ServerOpeningEvent::getHost — Returns the hostname of the server
- MongoDB\Driver\Monitoring\ServerOpeningEvent::getPort — Returns the port on which this server is listening
- MongoDB\Driver\Monitoring\ServerOpeningEvent::getTopologyId — Returns the topology ID associated with this server
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
