public final class CommandSucceededEvent extends CommandEvent
Modifier and Type | Field and Description |
---|---|
private long |
elapsedTimeNanos |
private BsonDocument |
response |
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
private final BsonDocument response
private final long elapsedTimeNanos
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()
.