Package com.mongodb.event
Class CommandFailedEvent
java.lang.Object
com.mongodb.event.CommandEvent
com.mongodb.event.CommandFailedEvent
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
An event representing the failure of a MongoDB database command.
- Since:
- 3.1
-
Constructor Summary
ConstructorsConstructorDescriptionCommandFailedEvent(int requestId, ConnectionDescription connectionDescription, String commandName, long elapsedTimeNanos, Throwable throwable) Deprecated.Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionlonggetElapsedTime(TimeUnit timeUnit) Deprecated.Gets the elapsed time in the given unit of time.Deprecated.Gets the throwable cause of the failureMethods inherited from class com.mongodb.event.CommandEvent
getCommandName, getConnectionDescription, getRequestId
-
Constructor Details
-
CommandFailedEvent
public CommandFailedEvent(int requestId, ConnectionDescription connectionDescription, String commandName, long elapsedTimeNanos, Throwable throwable) Deprecated.Construct an instance.- Parameters:
requestId- the requestIdconnectionDescription- the connection descriptioncommandName- the command nameelapsedTimeNanos- the non-negative elapsed time in nanoseconds for the operation to completethrowable- the throwable cause of the failure
-
-
Method Details
-
getElapsedTime
Deprecated.Gets the elapsed time in the given unit of time.- Parameters:
timeUnit- the time unit in which to get the elapsed time- Returns:
- the elapsed time
-
getThrowable
Deprecated.Gets the throwable cause of the failure- Returns:
- the throwable cause of the failuer
-