The MongoDB\Driver\Monitoring\CommandFailedEvent class

(mongodb >=1.3.0)

Giriş

The MongoDB\Driver\Monitoring\CommandFailedEvent class encapsulates information about a failed command.

Sınıf Sözdizimi

final class MongoDB\Driver\Monitoring\CommandFailedEvent {
/* Özellikler */
public readonly string $host;
public readonly int $port;
public readonly string $commandName;
public readonly string $databaseName;
public readonly int $duration;
public readonly Exception $error;
public readonly object $reply;
public readonly string $operationId;
public readonly string $requestId;
public readonly ?int $serverConnectionId;
/* Yöntemler */
final public getCommandName(): string
final public getDatabaseName(): string
final public getDurationMicros(): int
final public getError(): Exception
final public getHost(): string
final public getOperationId(): string
final public getPort(): int
final public getReply(): object
final public getRequestId(): string
final public getServerConnectionId(): ?int
}

Özellikler

host
The hostname of the server that executed the command.
port
The port of the server that executed the command.
commandName
The command name.
databaseName
The database name.
duration
The duration of the command 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 command failed.
reply
The failure reply document returned by the server.
operationId
The operation ID. This may be used to link events together such as bulk writes, which may dispatch multiple commands.
requestId
The request ID. This may be used to associate this MongoDB\Driver\Monitoring\CommandFailedEvent with a corresponding MongoDB\Driver\Monitoring\CommandStartedEvent.
serviceId
The service ID, or null if the server does not support it (i.e. not using load-balanced mode).
serverConnectionId
The server connection ID, or null if not available.

Sürüm Bilgisi

Sürüm: Açıklama
PECL mongodb 2.3.0 Added public readonly properties. The duration property replaces the getDurationMicros() method.

İçindekiler