The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class

はじめに

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

クラス概要

MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent
final class MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent {
/* プロパティ */
public readonly string $host;
public readonly int $port;
public readonly bool $awaited;
public readonly int $duration;
public readonly object $reply;
/* メソッド */
final public int getDurationMicros()
final public string getHost()
final public int getPort()
final public object getReply()
final public bool isAwaited()
}

プロパティ

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.
reply
The reply document returned by the server.

変更履歴

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