Class AbstractRetryEvent

java.lang.Object
io.github.resilience4j.retry.event.AbstractRetryEvent
All Implemented Interfaces:
RetryEvent
Direct Known Subclasses:
RetryOnErrorEvent, RetryOnIgnoredErrorEvent, RetryOnRetryEvent, RetryOnSuccessEvent

abstract class AbstractRetryEvent extends Object implements RetryEvent
  • Field Details

    • name

      private final String name
    • creationTime

      private final ZonedDateTime creationTime
    • numberOfAttempts

      private final int numberOfAttempts
    • lastThrowable

      @Nullable private final Throwable lastThrowable
  • Constructor Details

    • AbstractRetryEvent

      AbstractRetryEvent(String name, int numberOfAttempts, @Nullable Throwable lastThrowable)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: RetryEvent
      Returns the ID of the Retry.
      Specified by:
      getName in interface RetryEvent
      Returns:
      the ID of the Retry
    • getCreationTime

      public ZonedDateTime getCreationTime()
      Description copied from interface: RetryEvent
      Returns the creation time of Retry event.
      Specified by:
      getCreationTime in interface RetryEvent
      Returns:
      the creation time of Retry event
    • getNumberOfRetryAttempts

      public int getNumberOfRetryAttempts()
      Description copied from interface: RetryEvent
      Returns the number of retry attempts.
      Specified by:
      getNumberOfRetryAttempts in interface RetryEvent
      Returns:
      the number of retry attempts
    • getLastThrowable

      @Nullable public Throwable getLastThrowable()
      Description copied from interface: RetryEvent
      Returns the last captured Throwable.
      Specified by:
      getLastThrowable in interface RetryEvent
      Returns:
      the last captured Throwable