public final class CommandSucceededEvent extends CommandEvent
Constructor and Description |
---|
CommandSucceededEvent(int requestId,
ConnectionDescription connectionDescription,
java.lang.String commandName,
BsonDocument response,
long elapsedTimeNanos)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
long |
getElapsedTime(java.util.concurrent.TimeUnit timeUnit)
Gets the elapsed time in the given unit of time.
|
BsonDocument |
getResponse()
Gets the response document.
|
getCommandName, getConnectionDescription, getRequestId
public CommandSucceededEvent(int requestId, ConnectionDescription connectionDescription, java.lang.String commandName, BsonDocument response, long elapsedTimeNanos)
requestId
- the request idconnectionDescription
- the connection descriptioncommandName
- the command nameresponse
- the command responseelapsedTimeNanos
- the non-negative elapsed time in nanoseconds for the operation to completepublic long getElapsedTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit in which to get the elapsed timepublic BsonDocument getResponse()
Object.clone()
.Copyright © 2010 - 2020 Adobe. All Rights Reserved