public static class RetryCounter.RetryConfig extends Object
Modifier and Type | Field and Description |
---|---|
private RetryCounter.BackoffPolicy |
backoffPolicy |
private static RetryCounter.BackoffPolicy |
DEFAULT_BACKOFF_POLICY |
private int |
maxAttempts |
private long |
maxSleepTime |
private long |
sleepInterval |
private TimeUnit |
timeUnit |
Constructor and Description |
---|
RetryCounter.RetryConfig() |
RetryCounter.RetryConfig(int maxAttempts,
long sleepInterval,
long maxSleepTime,
TimeUnit timeUnit,
RetryCounter.BackoffPolicy backoffPolicy) |
Modifier and Type | Method and Description |
---|---|
RetryCounter.BackoffPolicy |
getBackoffPolicy() |
int |
getMaxAttempts() |
long |
getMaxSleepTime() |
long |
getSleepInterval() |
TimeUnit |
getTimeUnit() |
RetryCounter.RetryConfig |
setBackoffPolicy(RetryCounter.BackoffPolicy backoffPolicy) |
RetryCounter.RetryConfig |
setMaxAttempts(int maxAttempts) |
RetryCounter.RetryConfig |
setMaxSleepTime(long maxSleepTime) |
RetryCounter.RetryConfig |
setSleepInterval(long sleepInterval) |
RetryCounter.RetryConfig |
setTimeUnit(TimeUnit timeUnit) |
private int maxAttempts
private long sleepInterval
private long maxSleepTime
private TimeUnit timeUnit
private RetryCounter.BackoffPolicy backoffPolicy
private static final RetryCounter.BackoffPolicy DEFAULT_BACKOFF_POLICY
public RetryCounter.RetryConfig()
public RetryCounter.RetryConfig(int maxAttempts, long sleepInterval, long maxSleepTime, TimeUnit timeUnit, RetryCounter.BackoffPolicy backoffPolicy)
public RetryCounter.RetryConfig setBackoffPolicy(RetryCounter.BackoffPolicy backoffPolicy)
public RetryCounter.RetryConfig setMaxAttempts(int maxAttempts)
public RetryCounter.RetryConfig setMaxSleepTime(long maxSleepTime)
public RetryCounter.RetryConfig setSleepInterval(long sleepInterval)
public RetryCounter.RetryConfig setTimeUnit(TimeUnit timeUnit)
public int getMaxAttempts()
public long getMaxSleepTime()
public long getSleepInterval()
public TimeUnit getTimeUnit()
public RetryCounter.BackoffPolicy getBackoffPolicy()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.