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
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    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 the BeanFactory 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, isPerInstance, 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 interface org.springframework.context.annotation.ImportAware
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      Specified by:
      afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
      Set the BeanFactory to be used when looking up executors by qualifier.
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
    • getClassFilter

      public org.springframework.aop.ClassFilter getClassFilter()
      Specified by:
      getClassFilter in interface org.springframework.aop.IntroductionAdvisor
    • getInterfaces

      public Class<?>[] getInterfaces()
      Specified by:
      getInterfaces in interface org.springframework.aop.IntroductionInfo
    • validateInterfaces

      public void validateInterfaces() throws IllegalArgumentException
      Specified by:
      validateInterfaces in interface org.springframework.aop.IntroductionAdvisor
      Throws:
      IllegalArgumentException
    • getAdvice

      public org.aopalliance.aop.Advice getAdvice()
      Specified by:
      getAdvice in interface org.springframework.aop.Advisor
    • getPointcut

      public org.springframework.aop.Pointcut getPointcut()
      Specified by:
      getPointcut in interface org.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