The MongoDB\Driver\Monitoring\SDAMSubscriber interface
(mongodb >=1.13.0)
简介
Classes may implement this interface to register an event subscriber that is notified for various SDAM events. See the » Server Discovery and Monitoring and » SDAM Monitoring specifications for additional information.
接口摘要
class MongoDB\Driver\Monitoring\SDAMSubscriber
implements
MongoDB\Driver\Monitoring\Subscriber {
/* 方法 */
abstract public serverHeartbeatFailed(MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent
$event): voidabstract public serverHeartbeatStarted(MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent
$event): voidabstract public serverHeartbeatSucceeded(MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent
}$event): void更新日志
| 版本 | 说明 |
|---|---|
| PECL mongodb 2.0.0 | 之前声明为暂定的返回类型现在已被强制执行。 |
| PECL mongodb 1.15.0 |
在 PHP 8.0 及更高版本中,方法的返回类型被声明为暂定(tentative),
这会导致在实现该接口但未声明相应返回类型的代码中触发弃用提示。
可以添加 #[ReturnTypeWillChange] 属性来消除该弃用提示。
|
目录
- MongoDB\Driver\Monitoring\SDAMSubscriber::serverChanged — Notification method for a server description change
- MongoDB\Driver\Monitoring\SDAMSubscriber::serverClosed — Notification method for closing a server
- MongoDB\Driver\Monitoring\SDAMSubscriber::serverHeartbeatFailed — Notification method for a failed server heartbeat
- MongoDB\Driver\Monitoring\SDAMSubscriber::serverHeartbeatStarted — Notification method for a started server heartbeat
- MongoDB\Driver\Monitoring\SDAMSubscriber::serverHeartbeatSucceeded — Notification method for a successful server heartbeat
- MongoDB\Driver\Monitoring\SDAMSubscriber::serverOpening — Notification method for opening a server
- MongoDB\Driver\Monitoring\SDAMSubscriber::topologyChanged — Notification method for a topology description change
- MongoDB\Driver\Monitoring\SDAMSubscriber::topologyClosed — Notification method for closing the topology
- MongoDB\Driver\Monitoring\SDAMSubscriber::topologyOpening — Notification method for opening the topology