Class RetryManager


  • public class RetryManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RetryManager​(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String metricNamePrefix, long enforcementWindowInMs, double retryBudgetInPercentDecimal, java.time.Clock clock, java.util.concurrent.ScheduledExecutorService scheduler)  
      RetryManager​(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String metricNamePrefix, long enforcementWindowInMs, double retryBudgetInPercentDecimal, java.util.concurrent.ScheduledExecutorService scheduler)  
    • Constructor Detail

      • RetryManager

        public RetryManager​(io.tehuti.metrics.MetricsRepository metricsRepository,
                            java.lang.String metricNamePrefix,
                            long enforcementWindowInMs,
                            double retryBudgetInPercentDecimal,
                            java.time.Clock clock,
                            java.util.concurrent.ScheduledExecutorService scheduler)
      • RetryManager

        public RetryManager​(io.tehuti.metrics.MetricsRepository metricsRepository,
                            java.lang.String metricNamePrefix,
                            long enforcementWindowInMs,
                            double retryBudgetInPercentDecimal,
                            java.util.concurrent.ScheduledExecutorService scheduler)
    • Method Detail

      • recordRequest

        public void recordRequest()
      • recordRequests

        public void recordRequests​(int requests)
      • isRetryAllowed

        public boolean isRetryAllowed()
      • isRetryAllowed

        public boolean isRetryAllowed​(int numberOfRetries)
      • getRetryTokenBucket

        public TokenBucket getRetryTokenBucket()