public class RetryOnExceptionStrategy extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_RETIRES
Default max retries on Exception
|
static long |
DEFAULT_WAIT_TIME_IN_MILLIS
Default delay time between retries in ms
|
| Constructor and Description |
|---|
RetryOnExceptionStrategy()
Constructor that uses default values
|
RetryOnExceptionStrategy(int maxRetries,
long intervalDelay)
Constructor with custom retry strategy attribute
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetry()
Can e still retry?
|
int |
getRetries() |
long |
getTimeToWait()
Get the time (in ms) between retries
|
int |
getTriesLeft() |
void |
onErrorOccured()
An error occurred retry sync
|
void |
setRetries(int retries) |
void |
setTimeToWait(long timeToWait) |
void |
setTriesLeft(int triesLeft) |
public static final long DEFAULT_WAIT_TIME_IN_MILLIS
public static final int DEFAULT_MAX_RETIRES
public RetryOnExceptionStrategy()
public RetryOnExceptionStrategy(int maxRetries,
long intervalDelay)
maxRetries - the max retry countintervalDelay - the observation delaypublic long getTimeToWait()
public int getTriesLeft()
public int getRetries()
public void setRetries(int retries)
retries - the retries to setpublic void setTimeToWait(long timeToWait)
timeToWait - the timeToWait to setpublic void setTriesLeft(int triesLeft)
triesLeft - the triesLeft to setpublic boolean canRetry()
public void onErrorOccured()
throws RetryStrategyException
RetryStrategyException - no more retry available stop processCopyright © 2004–2021 Jahia Solutions Group SA. All rights reserved.