public final class CommandSucceededEvent extends CommandEvent
| Constructor and Description | 
|---|
| CommandSucceededEvent(int requestId,
                     ConnectionDescription connectionDescription,
                     String commandName,
                     BsonDocument response,
                     long elapsedTimeNanos)Construct an instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | getElapsedTime(TimeUnit timeUnit)Gets the elapsed time in the given unit of time. | 
| BsonDocument | getResponse()Gets the response document. | 
getCommandName, getConnectionDescription, getRequestIdpublic CommandSucceededEvent(int requestId,
                             ConnectionDescription connectionDescription,
                             String commandName,
                             BsonDocument response,
                             long elapsedTimeNanos)
requestId - the request idconnectionDescription - the connection descriptioncommandName - the command nameresponse - the command responseelapsedTimeNanos - the elapsed time in nanoseconds for the operation to completepublic long getElapsedTime(TimeUnit timeUnit)
timeUnit - the time unit in which to get the elapsed timepublic BsonDocument getResponse()
Object.clone().