Class RetryOnRetryEvent

java.lang.Object
io.github.resilience4j.retry.event.RetryOnRetryEvent
All Implemented Interfaces:
RetryEvent

public class RetryOnRetryEvent
extends java.lang.Object
A RetryEvent which informs that a call failed, and is to be retried.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.github.resilience4j.retry.event.RetryEvent

    RetryEvent.Type
  • Constructor Summary

    Constructors 
    Constructor Description
    RetryOnRetryEvent​(java.lang.String name, int numberOfAttempts, java.lang.Throwable lastThrowable, long waitInterval)  
  • Method Summary

    Modifier and Type Method Description
    java.time.ZonedDateTime getCreationTime()
    Returns the creation time of Retry event.
    RetryEvent.Type getEventType()
    Returns the type of the Retry event.
    java.lang.Throwable getLastThrowable()
    Returns the last captured Throwable.
    java.lang.String getName()
    Returns the ID of the Retry.
    int getNumberOfRetryAttempts()
    Returns the number of retry attempts.
    java.time.Duration getWaitInterval()
    Returns the interval used to wait before next retry.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RetryOnRetryEvent

      public RetryOnRetryEvent​(java.lang.String name, int numberOfAttempts, @Nullable java.lang.Throwable lastThrowable, long waitInterval)
  • Method Details

    • getEventType

      public RetryEvent.Type getEventType()
      Description copied from interface: RetryEvent
      Returns the type of the Retry event.
      Returns:
      the type of the Retry event
    • getWaitInterval

      public java.time.Duration getWaitInterval()
      Returns the interval used to wait before next retry.
      Returns:
      the wait interval
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • getName

      public java.lang.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 java.time.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 the number of retry attempts
    • getLastThrowable

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