The MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent class
(mongodb >=1.13.0)
Introduction
The MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent class encapsulates information about a started server heartbeat (i.e. » hello command issued through » server monitoring).
Class synopsis
Properties
hostThe hostname of the server.
portThe port of the server.
awaited
Whether the heartbeat used a streaming protocol. The extension does
not use the streaming protocol for monitoring, so this method will always
return false.
Changelog
| Version | Description |
|---|---|
| PECL mongodb 2.3.0 | Added public readonly properties. |
Table of Contents
- MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent::getHost — Returns the hostname of the server
- MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent::getPort — Returns the port on which this server is listening
- MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent::isAwaited — Returns whether the heartbeat used a streaming protocol
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
