minor code cleanup

This commit is contained in:
robokaso
2008-06-09 14:00:51 +00:00
parent 607865e931
commit dfef707dc9

View File

@@ -111,7 +111,7 @@ public class RetryTemplate implements RetryOperations {
}
/**
* Keep executing the callback until it eiether succeeds or the policy
* Keep executing the callback until it either succeeds or the policy
* dictates that we stop, in which case the most recent exception thrown by
* the callback will be rethrown.
*
@@ -158,7 +158,7 @@ public class RetryTemplate implements RetryOperations {
* external retry to allow a recovery in handleRetryExhausted
* without the callback processing (which would throw an exception).
*/
while (retryPolicy.canRetry(context) && !isMarkedExhausted(context)) {
while (retryPolicy.canRetry(context) && !context.isExhaustedOnly()) {
try {
logger.debug("Retry: count=" + context.getRetryCount());
@@ -211,15 +211,6 @@ public class RetryTemplate implements RetryOperations {
}
}
/**
* Check if client has marked the context to end the retry attempts.
* @param context
* @return
*/
private boolean isMarkedExhausted(RetryContext context) {
return context.isExhaustedOnly();
}
private boolean doOpenInterceptors(RetryCallback callback, RetryContext context) {
boolean result = true;