Package com.linkedin.venice.meta
Class RetryManager
- java.lang.Object
-
- com.linkedin.venice.meta.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenBucket
getRetryTokenBucket()
boolean
isRetryAllowed()
boolean
isRetryAllowed(int numberOfRetries)
void
recordRequest()
void
recordRequests(int requests)
-
-
-
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()
-
-