CommandSucceededEvent
class CommandSucceededEvent (View source)
Encapsulates information about a successful command.
Methods
No description
Returns the command name.
Returns the command's duration in microseconds The command's duration is a calculated value that includes the time to send the message and receive the reply from the server.
Returns the server hostname for the command
Returns the command's operation ID.
Returns the server port for the command
Returns the command reply document.
Returns the command's request ID.
Returns the load balancer service ID for the command
Returns the server connection ID for the command
Details
final
__wakeup()
No description
final string
getCommandName()
Returns the command name.
final int
getDurationMicros()
Returns the command's duration in microseconds The command's duration is a calculated value that includes the time to send the message and receive the reply from the server.
final string
getHost()
Returns the server hostname for the command
final string
getOperationId()
Returns the command's operation ID.
The operation ID is generated by the driver and may be used to link events together such as bulk write operations, which may have been split across several commands at the protocol level. Note: Since multiple commands may share the same operation ID, it is not reliable to use this value to associate event objects with each other. The request ID returned by MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId() should be used instead.
final int
getPort()
Returns the server port for the command
final object
getReply()
Returns the command reply document.
The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
final string
getRequestId()
Returns the command's request ID.
The request ID is generated by the driver and may be used to associate this CommandSucceededEvent with a previous CommandStartedEvent.
final Server
getServer()
deprecated
deprecated
Returns the Server on which the command was executed.
final ObjectId|null
getServiceId()
Returns the load balancer service ID for the command
final int|null
getServerConnectionId()
Returns the server connection ID for the command