BATCH-1396: added step scope to retry and fixed bugs
This commit is contained in:
@@ -50,7 +50,7 @@ public class SimpleRetryPolicy implements RetryPolicy {
|
||||
|
||||
private volatile int maxAttempts;
|
||||
|
||||
private BinaryExceptionClassifier retryableClassifier = new BinaryExceptionClassifier(false);
|
||||
private volatile BinaryExceptionClassifier retryableClassifier = new BinaryExceptionClassifier(false);
|
||||
|
||||
/**
|
||||
* Create a {@link SimpleRetryPolicy} with the default number of retry
|
||||
@@ -74,6 +74,13 @@ public class SimpleRetryPolicy implements RetryPolicy {
|
||||
this.retryableClassifier = new BinaryExceptionClassifier(retryableExceptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param retryableExceptions
|
||||
*/
|
||||
public void setRetryableExceptions(Map<Class<? extends Throwable>, Boolean> retryableExceptions) {
|
||||
this.retryableClassifier = new BinaryExceptionClassifier(retryableExceptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for retry attempts.
|
||||
*
|
||||
@@ -83,7 +90,7 @@ public class SimpleRetryPolicy implements RetryPolicy {
|
||||
public void setMaxAttempts(int retryAttempts) {
|
||||
this.maxAttempts = retryAttempts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The maximum number of retry attempts before failure.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user