public class JustRetryStrategy extends FailoverStrategy
Modifier and Type | Field and Description |
---|---|
protected int |
count |
static int |
DEFAULT_RETRY_COUNT |
static long |
DEFAULT_RETRY_INTERVAL |
protected long |
interval |
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
JustRetryStrategy(int count) |
JustRetryStrategy(int count,
Time interval)
RetryStrategy constructor. |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Throwable |
extractExactCause(java.lang.Exception e) |
protected <R> R |
onFailure(java.lang.Exception e,
Function<R> f,
java.util.List<java.lang.Object> args) |
wrap
public static final int DEFAULT_RETRY_COUNT
public static final long DEFAULT_RETRY_INTERVAL
protected final org.slf4j.Logger logger
protected final int count
protected final long interval
public JustRetryStrategy(int count)
public JustRetryStrategy(int count, Time interval)
RetryStrategy
constructor.count
- retry count. must be positiveinterval
- retry intervalprotected <R> R onFailure(java.lang.Exception e, Function<R> f, java.util.List<java.lang.Object> args)
onFailure
in class FailoverStrategy
protected java.lang.Throwable extractExactCause(java.lang.Exception e)