BATCH-1396: added step scope to retry and fixed bugs

This commit is contained in:
Dave Syer
2011-03-21 09:35:20 +00:00
parent aeadf8b02e
commit 58ad6bd542
12 changed files with 239 additions and 57 deletions

View File

@@ -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.
*