Class MethodInvocationRetryCallback<T,E extends Throwable>
java.lang.Object
org.springframework.retry.interceptor.MethodInvocationRetryCallback<T,E>
- Type Parameters:
T
- the type of object returned by the callbackE
- the type of exception it declares may be thrown
- All Implemented Interfaces:
RetryCallback<T,
E>
public abstract class MethodInvocationRetryCallback<T,E extends Throwable>
extends Object
implements RetryCallback<T,E>
Callback class for a Spring AOP reflective `MethodInvocation` that can be retried using
a
RetryOperations
.
In a concrete RetryListener
implementation, the
`MethodInvocation` can be analysed for providing insights on the method called as well
as its parameter values which could then be used for monitoring purposes.
- Since:
- 1.3
- Author:
- Marius Grama, Artem Bilan
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.aopalliance.intercept.MethodInvocation
protected final String
-
Constructor Summary
ConstructorDescriptionMethodInvocationRetryCallback
(org.aopalliance.intercept.MethodInvocation invocation, String label) Constructor for the class. -
Method Summary
Modifier and TypeMethodDescriptionorg.aopalliance.intercept.MethodInvocation
getLabel()
A logical identifier for this callback to distinguish retries around business operations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.retry.RetryCallback
doWithRetry
-
Field Details
-
invocation
protected final org.aopalliance.intercept.MethodInvocation invocation -
label
-
-
Constructor Details
-
MethodInvocationRetryCallback
public MethodInvocationRetryCallback(org.aopalliance.intercept.MethodInvocation invocation, @Nullable String label) Constructor for the class.- Parameters:
invocation
- the method invocationlabel
- a unique label for statistics reporting.
-
-
Method Details
-
getInvocation
public org.aopalliance.intercept.MethodInvocation getInvocation() -
getLabel
Description copied from interface:RetryCallback
A logical identifier for this callback to distinguish retries around business operations.- Specified by:
getLabel
in interfaceRetryCallback<T,
E extends Throwable> - Returns:
- the identifier for this callback.
-