Class CommandFailedEvent


  • @Deprecated(since="2021-05-27")
    public final class CommandFailedEvent
    extends CommandEvent
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    An event representing the failure of a MongoDB database command.
    Since:
    3.1
    • Constructor Detail

      • CommandFailedEvent

        public CommandFailedEvent​(int requestId,
                                  ConnectionDescription connectionDescription,
                                  java.lang.String commandName,
                                  long elapsedTimeNanos,
                                  java.lang.Throwable throwable)
        Deprecated.
        Construct an instance.
        Parameters:
        requestId - the requestId
        connectionDescription - the connection description
        commandName - the command name
        elapsedTimeNanos - the non-negative elapsed time in nanoseconds for the operation to complete
        throwable - the throwable cause of the failure
    • 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
      • getThrowable

        public java.lang.Throwable getThrowable()
        Deprecated.
        Gets the throwable cause of the failure
        Returns:
        the throwable cause of the failuer