Class SimpleRetryInterceptor
java.lang.Object
org.springframework.resilience.retry.AbstractRetryInterceptor
org.springframework.resilience.retry.SimpleRetryInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.aopalliance.intercept.Interceptor
,org.aopalliance.intercept.MethodInterceptor
A simple concrete retry interceptor based on a given
MethodRetrySpec
.- Since:
- 7.0
- Author:
- Juergen Hoeller
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleRetryInterceptor
(MethodRetrySpec retrySpec) Create aSimpleRetryInterceptor
for the givenMethodRetrySpec
. -
Method Summary
Modifier and TypeMethodDescriptionprotected MethodRetrySpec
getRetrySpec
(Method method, Class<?> targetClass) Determine the retry specification for the given method on the given target.Methods inherited from class org.springframework.resilience.retry.AbstractRetryInterceptor
invoke
-
Constructor Details
-
SimpleRetryInterceptor
Create aSimpleRetryInterceptor
for the givenMethodRetrySpec
.- Parameters:
retrySpec
- the specification to use for all method invocations
-
-
Method Details
-
getRetrySpec
Description copied from class:AbstractRetryInterceptor
Determine the retry specification for the given method on the given target.- Specified by:
getRetrySpec
in classAbstractRetryInterceptor
- Parameters:
method
- the currently executing methodtargetClass
- the class of the current target object- Returns:
- the retry specification as a
MethodRetrySpec
-