public final class CommandFailedEvent extends CommandEvent
| Constructor and Description |
|---|
CommandFailedEvent(int requestId,
ConnectionDescription connectionDescription,
String commandName,
long elapsedTimeNanos,
Throwable throwable)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getElapsedTime(TimeUnit timeUnit)
Gets the elapsed time in the given unit of time.
|
Throwable |
getThrowable()
Gets the throwable cause of the failure
|
getCommandName, getConnectionDescription, getRequestIdpublic CommandFailedEvent(int requestId,
ConnectionDescription connectionDescription,
String commandName,
long elapsedTimeNanos,
Throwable throwable)
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 failurepublic long getElapsedTime(TimeUnit timeUnit)
timeUnit - the time unit in which to get the elapsed timepublic Throwable getThrowable()