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
FieldsModifier and TypeFieldDescriptionprotected org.springframework.core.annotation.AnnotationAttributesFields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected org.springframework.aop.PointcutbuildPointcut(Set<Class<? extends Annotation>> retryAnnotationTypes) Calculate a pointcut for the given retry annotation types, if any.org.aopalliance.aop.Adviceorg.springframework.aop.ClassFilterClass<?>[]org.springframework.aop.PointcutvoidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set theBeanFactoryto be used when looking up executors by qualifier.voidsetImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata) voidMethods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:
setImportMetadatain interfaceorg.springframework.context.annotation.ImportAware
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set theBeanFactoryto be used when looking up executors by qualifier.- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getClassFilter
public org.springframework.aop.ClassFilter getClassFilter()- Specified by:
getClassFilterin interfaceorg.springframework.aop.IntroductionAdvisor
-
getInterfaces
- Specified by:
getInterfacesin interfaceorg.springframework.aop.IntroductionInfo
-
validateInterfaces
- Specified by:
validateInterfacesin interfaceorg.springframework.aop.IntroductionAdvisor- Throws:
IllegalArgumentException
-
getAdvice
public org.aopalliance.aop.Advice getAdvice()- Specified by:
getAdvicein interfaceorg.springframework.aop.Advisor
-
getPointcut
public org.springframework.aop.Pointcut getPointcut()- Specified by:
getPointcutin 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
nullif none
-