« MongoDB\Driver\Monitoring\ServerOpeningEvent::getTopologyId
MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::getDurationMicros »

The MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent class

(mongodb >=1.13.0)

はじめに

The MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent class encapsulates information about a failed server heartbeat (i.e. » hello command issued through » server monitoring).

クラス概要

final class MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent {
/* プロパティ */
public readonly string $host;
public readonly int $port;
public readonly bool $awaited;
public readonly int $duration;
public readonly Exception $error;
/* メソッド */
final public function getDurationMicros(): int
final public function getError(): Exception
final public function getHost(): string
final public function getPort(): int
final public function isAwaited(): bool
}

プロパティ

host

The hostname of the server.

port

The 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.

duration

The duration of the heartbeat in microseconds. The duration is a calculated value that includes the time to send the message and receive the response from the server.

error

The exception that was thrown when the heartbeat failed.

変更履歴

バージョン 説明
PECL mongodb 2.3.0 Added public readonly properties. The duration property replaces the getDurationMicros() method.

目次

関連キーワード:
MongoDB   Driver   Monitoring   ServerHeartbeatFailedEvent   server   heartbeat   final   readonly   duration   getDurationMicros   port   failed   Exception   streaming   protocol   mongodb   monitoring   プロパティ   host   awaited   getError   getHost   getPort   isAwaited   hostname
関連する関数・ページ:
mongodb-driver-monitoring-serverheartbeatfailedevent.getdurationmicros   mongodb-driver-monitoring-serverheartbeatfailedevent.geterror   mongodb-driver-monitoring-serverheartbeatfailedevent.gethost   mongodb-driver-monitoring-serverheartbeatfailedevent.isawaited   mongodb-driver-monitoring-serverheartbeatfailedevent.getport   class.mongodb-driver-monitoring-serverheartbeatsucceededevent