Package com.mongodb.event
Class CommandSucceededEvent
- java.lang.Object
-
- com.mongodb.event.CommandEvent
-
- com.mongodb.event.CommandSucceededEvent
-
@Deprecated(since="2021-05-27") public final class CommandSucceededEvent extends CommandEvent
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.An event representing the completion of a MongoDB database command.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description CommandSucceededEvent(int requestId, ConnectionDescription connectionDescription, java.lang.String commandName, BsonDocument response, long elapsedTimeNanos)
Deprecated.Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getElapsedTime(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the elapsed time in the given unit of time.BsonDocument
getResponse()
Deprecated.Gets the response document.-
Methods inherited from class com.mongodb.event.CommandEvent
getCommandName, getConnectionDescription, getRequestId
-
-
-
-
Constructor Detail
-
CommandSucceededEvent
public CommandSucceededEvent(int requestId, ConnectionDescription connectionDescription, java.lang.String commandName, BsonDocument response, long elapsedTimeNanos)
Deprecated.Construct an instance.- Parameters:
requestId
- the request idconnectionDescription
- the connection descriptioncommandName
- the command nameresponse
- the command responseelapsedTimeNanos
- the non-negative elapsed time in nanoseconds for the operation to complete
-
-
Method Detail
-
getElapsedTime
public long getElapsedTime(java.util.concurrent.TimeUnit timeUnit)
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
-
getResponse
public BsonDocument getResponse()
Deprecated.Gets the response document. The document is only usable within the method that delivered the event. If it's needed for longer, it must be cloned viaObject.clone()
.- Returns:
- the response document
-
-