La classe MongoDB\Driver\Monitoring\CommandStartedEvent

(mongodb >=1.3.0)

Introduction

La classe MongoDB\Driver\Monitoring\CommandStartedEvent contient les informations sur une commande ayant démarrée.

Synopsis de la classe

final class MongoDB\Driver\Monitoring\CommandStartedEvent {
/* Propriétés */
public readonly string $host;
public readonly int $port;
public readonly string $commandName;
public readonly string $databaseName;
public readonly object $command;
public readonly string $operationId;
public readonly string $requestId;
public readonly ?int $serverConnectionId;
/* Méthodes */
final public function getCommand(): object
final public function getCommandName(): string
final public function getDatabaseName(): string
final public function getHost(): string
final public function getOperationId(): string
final public function getPort(): int
final public function getRequestId(): string
final public function getServer(): MongoDB\Driver\Server
final public function getServerConnectionId(): ?int
final public function getServiceId(): ?MongoDB\BSON\ObjectId
}

Propriétés

host
Le nom d'hôte du serveur ayant exécuté la commande.
port
Le port du serveur ayant exécuté la commande.
commandName
Le nom de la commande.
databaseName
Le nom de la base de données.
command
Le document de la commande.
operationId
L'identifiant d'opération. Il peut être utilisé pour relier des évènements entre eux, comme les écritures groupées (bulk writes), qui peuvent dispatcher plusieurs commandes.
requestId
L'identifiant de requête. Il peut être utilisé pour associer cet MongoDB\Driver\Monitoring\CommandStartedEvent avec un MongoDB\Driver\Monitoring\CommandSucceededEvent ou un MongoDB\Driver\Monitoring\CommandFailedEvent correspondant.
serviceId
L'identifiant de service, ou null si le serveur ne le prend pas en charge (c'est-à-dire qu'il n'utilise pas le mode équilibrage de charge).
serverConnectionId
L'identifiant de connexion au serveur, ou null s'il n'est pas disponible.

Historique

Version Description
PECL mongodb 2.3.0 Ajout des propriétés publiques readonly.

Sommaire

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top