Class ExecutionEvent

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAttemptCount()
      Gets the number of execution attempts so far, including attempts that are blocked before being executed, such as when a CircuitBreaker is open.
      java.time.Duration getElapsedAttemptTime()
      Returns the elapsed time since the last execution attempt began.
      java.time.Duration getElapsedTime()
      Returns the elapsed time since initial execution began.
      int getExecutionCount()
      Gets the number of completed executions so far.
      java.util.Optional<java.time.Instant> getStartTime()
      Returns the time that the initial execution started, else Optional.empty() if an execution has not started yet.
      boolean isFirstAttempt()
      Returns true when getAttemptCount() is 0 meaning this is the first execution attempt.
      boolean isRetry()
      Returns true when getAttemptCount() is > 0 meaning the execution is being retried.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getElapsedTime

        public java.time.Duration getElapsedTime()
        Returns the elapsed time since initial execution began.
      • getAttemptCount

        public int getAttemptCount()
        Gets the number of execution attempts so far, including attempts that are blocked before being executed, such as when a CircuitBreaker is open. Will return 0 when the first attempt is in progress or has yet to begin.
      • getExecutionCount

        public int getExecutionCount()
        Gets the number of completed executions so far. Executions that are blocked, such as when a CircuitBreaker is open, are not counted. Will return 0 when the first attempt is in progress or has yet to begin.
      • getStartTime

        public java.util.Optional<java.time.Instant> getStartTime()
        Returns the time that the initial execution started, else Optional.empty() if an execution has not started yet.
      • getElapsedAttemptTime

        public java.time.Duration getElapsedAttemptTime()
        Returns the elapsed time since the last execution attempt began.
      • isFirstAttempt

        public boolean isFirstAttempt()
        Returns true when getAttemptCount() is 0 meaning this is the first execution attempt.
      • isRetry

        public boolean isRetry()
        Returns true when getAttemptCount() is > 0 meaning the execution is being retried.