Class RetryConfiguration
java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.retry.annotation.RetryConfiguration
- All Implemented Interfaces:
Serializable
,org.springframework.aop.Advisor
,org.springframework.aop.IntroductionAdvisor
,org.springframework.aop.IntroductionInfo
,org.springframework.aop.PointcutAdvisor
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.InitializingBean
,org.springframework.beans.factory.SmartInitializingSingleton
,org.springframework.context.annotation.ImportAware
,org.springframework.core.Ordered
@Role(2)
@Component
public class RetryConfiguration
extends org.springframework.aop.support.AbstractPointcutAdvisor
implements org.springframework.aop.IntroductionAdvisor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.context.annotation.ImportAware
Basic configuration for
@Retryable
processing. For stateful retry, if
there is a unique bean elsewhere in the context of type RetryContextCache
,
MethodArgumentsKeyGenerator
or NewMethodArgumentsIdentifier
it will be
used by the corresponding retry interceptor (otherwise sensible defaults are adopted).- Since:
- 1.1
- Author:
- Dave Syer, Artem Bilan, Markus Heiden, Gary Russell, Yanming Zhou, Evgeny Lazarev
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.core.annotation.AnnotationAttributes
Fields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICE
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
protected org.springframework.aop.Pointcut
buildPointcut
(Set<Class<? extends Annotation>> retryAnnotationTypes) Calculate a pointcut for the given retry annotation types, if any.org.aopalliance.aop.Advice
org.springframework.aop.ClassFilter
Class<?>[]
org.springframework.aop.Pointcut
void
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) Set theBeanFactory
to be used when looking up executors by qualifier.void
setImportMetadata
(org.springframework.core.type.AnnotationMetadata importMetadata) void
Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, setOrder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.aop.Advisor
isPerInstance
-
Field Details
-
enableRetry
@Nullable protected org.springframework.core.annotation.AnnotationAttributes enableRetry
-
-
Constructor Details
-
RetryConfiguration
public RetryConfiguration()
-
-
Method Details
-
setImportMetadata
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata) - Specified by:
setImportMetadata
in interfaceorg.springframework.context.annotation.ImportAware
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiated
in interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set theBeanFactory
to be used when looking up executors by qualifier.- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getClassFilter
public org.springframework.aop.ClassFilter getClassFilter()- Specified by:
getClassFilter
in interfaceorg.springframework.aop.IntroductionAdvisor
-
getInterfaces
- Specified by:
getInterfaces
in interfaceorg.springframework.aop.IntroductionInfo
-
validateInterfaces
- Specified by:
validateInterfaces
in interfaceorg.springframework.aop.IntroductionAdvisor
- Throws:
IllegalArgumentException
-
getAdvice
public org.aopalliance.aop.Advice getAdvice()- Specified by:
getAdvice
in interfaceorg.springframework.aop.Advisor
-
getPointcut
public org.springframework.aop.Pointcut getPointcut()- Specified by:
getPointcut
in interfaceorg.springframework.aop.PointcutAdvisor
-
buildAdvice
-
buildPointcut
protected org.springframework.aop.Pointcut buildPointcut(Set<Class<? extends Annotation>> retryAnnotationTypes) Calculate a pointcut for the given retry annotation types, if any.- Parameters:
retryAnnotationTypes
- the retry annotation types to introspect- Returns:
- the applicable Pointcut object, or
null
if none
-