The MongoDB\Driver\Monitoring\ServerChangedEvent class
The MongoDB\Driver\Monitoring\ServerChangedEvent class encapsulates information about a changed server description. For example, a server's type changing from secondary to primary would cause its server description to change.
Intro
The MongoDB\Driver\Monitoring\ServerChangedEvent class encapsulates information about a changed server description. For example, a server's type changing from secondary to primary would cause its server description to change.
Class synopsis
Properties
hostThe hostname of the server.
portThe port of the server.
topologyIdThe topology ID.
newDescriptionThe new server description.
previousDescriptionThe previous server description.
Changelog
| Version | Description |
|---|---|
| PECL mongodb 2.3.0 | Added public readonly properties. |
Serverchangedevent