Class RetryImpl<T>

java.lang.Object
io.github.resilience4j.retry.internal.RetryImpl<T>
All Implemented Interfaces:
Retry

public class RetryImpl<T> extends Object implements Retry
  • Constructor Details

  • Method Details

    • setSleepFunction

      public static void setSleepFunction(io.github.resilience4j.core.functions.CheckedConsumer<Long> sleepFunction)
    • getName

      public String getName()
      Returns the ID of this Retry.
      Specified by:
      getName in interface Retry
      Returns:
      the ID of this Retry
    • context

      public Retry.Context context()
      Description copied from interface: Retry
      Creates a retry Context.
      Specified by:
      context in interface Retry
      Returns:
      the retry Context
    • asyncContext

      public Retry.AsyncContext asyncContext()
      Description copied from interface: Retry
      Creates a async retry Context.
      Specified by:
      asyncContext in interface Retry
      Returns:
      the async retry Context
    • getRetryConfig

      public RetryConfig getRetryConfig()
      Description copied from interface: Retry
      Returns the RetryConfig of this Retry.
      Specified by:
      getRetryConfig in interface Retry
      Returns:
      the RetryConfig of this Retry
    • getTags

      public Map<String,String> getTags()
      Description copied from interface: Retry
      Returns an unmodifiable map with tags assigned to this Retry.
      Specified by:
      getTags in interface Retry
      Returns:
      the tags assigned to this Retry in an unmodifiable map
    • getEventPublisher

      public Retry.EventPublisher getEventPublisher()
      Description copied from interface: Retry
      Returns an EventPublisher can be used to register event consumers.
      Specified by:
      getEventPublisher in interface Retry
      Returns:
      an EventPublisher
    • getMetrics

      public Retry.Metrics getMetrics()
      Get the Metrics of this Retry instance.
      Specified by:
      getMetrics in interface Retry
      Returns:
      the Metrics of this Retry instance