diff --git a/src/main/java/org/springframework/retry/RetryCallback.java b/src/main/java/org/springframework/retry/RetryCallback.java index 5926d58..4e75a43 100644 --- a/src/main/java/org/springframework/retry/RetryCallback.java +++ b/src/main/java/org/springframework/retry/RetryCallback.java @@ -19,7 +19,10 @@ package org.springframework.retry; /** * Callback interface for an operation that can be retried using a * {@link RetryOperations}. - * + * + * @param T the type of object returned by the callback + * @param E the type of exception it declares may be thrown + * * @author Rob Harrop * @author Dave Syer */ @@ -31,7 +34,7 @@ public interface RetryCallback { * semantics when an operation is retried. * @param context the current retry context. * @return the result of the successful operation. - * @throws Exception if processing fails + * @throws Throwable of type E if processing fails */ T doWithRetry(RetryContext context) throws E; } diff --git a/src/main/java/org/springframework/retry/RetryPolicy.java b/src/main/java/org/springframework/retry/RetryPolicy.java index 0f4a182..a4722a4 100644 --- a/src/main/java/org/springframework/retry/RetryPolicy.java +++ b/src/main/java/org/springframework/retry/RetryPolicy.java @@ -23,9 +23,9 @@ package org.springframework.retry; * framework, e.g. to support nested retries. Context can also be external, and * the {@link RetryPolicy} provides a uniform API for a range of different * platforms for the external context. - * + * * @author Dave Syer - * + * */ public interface RetryPolicy { @@ -40,23 +40,23 @@ public interface RetryPolicy { * in so that marker interfaces can be used and a manager can collaborate * with the callback to set up some state in the status token. * @param parent the parent context if we are in a nested retry. - * - * @return a {@link RetryContext} object specific to this manager. - * + * + * @return a {@link RetryContext} object specific to this policy. + * */ RetryContext open(RetryContext parent); /** * @param context a retry status created by the - * {@link #open(RetryContext)} method of this manager. + * {@link #open(RetryContext)} method of this policy. */ void close(RetryContext context); /** * Called once per retry attempt, after the callback fails. - * + * * @param context the current status object. - * + * */ void registerThrowable(RetryContext context, Throwable throwable);