org.springframework.beans.factory.xml.BeanDefinitionParser
implementation that allows users to easily configure all the
infrastructure beans required to enable annotation-driven cache
demarcation.
By default, all proxies are created as JDK proxies. This may cause
some problems if you are injecting objects as concrete classes rather
than interfaces. To overcome this restriction you can set the
'proxy-target-class' attribute to 'true', which will
result in class-based proxies being created.
If the JSR-107 API and Spring's JCache implementation are present,
the necessary infrastructure beans required to handle methods annotated
with CacheResult, CachePut, CacheRemove or
CacheRemoveAll are also registered.
| Modifier and Type | Class and Description |
|---|---|
| private static class | AnnotationDrivenCacheBeanDefinitionParser.JCacheCachingConfigurer
Configure the necessary infrastructure to support the standard JSR-107 caching annotations. |
| private static class | AnnotationDrivenCacheBeanDefinitionParser.SpringCachingConfigurer
Configure the necessary infrastructure to support the Spring's caching annotations. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final boolean | |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public BeanDefinition | parse(Element
the element that is to be parsed into one or more element, ParserContext BeanDefinitionsthe object encapsulating the current state of the parsing process;
provides access to a parserContext)org.Implements org. <cache:annotation-driven>' tag.
|
| private static void | parseCacheResolution(Element element, BeanDefinition def, boolean setBoth)
Parse the cache resolution strategy to use. |
| private static void | |
| private void | |
| private void |
| CACHE_ASPECT_CLASS_NAME | back to summary |
|---|---|
| private static final String CACHE_ASPECT_CLASS_NAME | |
| JCACHE_ASPECT_CLASS_NAME | back to summary |
|---|---|
| private static final String JCACHE_ASPECT_CLASS_NAME | |
| jcacheImplPresent | back to summary |
|---|---|
| private static final boolean jcacheImplPresent | |
| jsr107Present | back to summary |
|---|---|
| private static final boolean jsr107Present | |
| AnnotationDrivenCacheBeanDefinitionParser | back to summary |
|---|---|
| pack-priv AnnotationDrivenCacheBeanDefinitionParser() | |
| parse | back to summary |
|---|---|
| public BeanDefinition parse(Element element, ParserContext parserContext) Implements org. Parses the '
| |
| parseCacheResolution | back to summary |
|---|---|
| private static void parseCacheResolution(Element element, BeanDefinition def, boolean setBoth) Parse the cache resolution strategy to use. If a 'cache-resolver' attribute
is set, it is injected. Otherwise the 'cache-manager' is set. If | |
| parseErrorHandler | back to summary |
|---|---|
| private static void parseErrorHandler(Element element, BeanDefinition def) | |
| registerCacheAdvisor | back to summary |
|---|---|
| private void registerCacheAdvisor(Element element, ParserContext parserContext) | |
| registerCacheAspect | back to summary |
|---|---|
| private void registerCacheAspect(Element element, ParserContext parserContext) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static RootBeanDefinition | |
| private static void | |
| private static void |
| JCacheCachingConfigurer | back to summary |
|---|---|
| private JCacheCachingConfigurer() | |
| createJCacheOperationSourceBeanDefinition | back to summary |
|---|---|
| private static RootBeanDefinition createJCacheOperationSourceBeanDefinition(Element element, Object eleSource) | |
| registerCacheAdvisor | back to summary |
|---|---|
| private static void registerCacheAdvisor(Element element, ParserContext parserContext) | |
| registerCacheAspect | back to summary |
|---|---|
| private static void registerCacheAspect(Element element, ParserContext parserContext) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void |
| SpringCachingConfigurer | back to summary |
|---|---|
| private SpringCachingConfigurer() | |
| registerCacheAdvisor | back to summary |
|---|---|
| private static void registerCacheAdvisor(Element element, ParserContext parserContext) | |
| registerCacheAspect | back to summary |
|---|---|
| private static void registerCacheAspect(Element element, ParserContext parserContext) Registers a cache aspect. <bean id="cacheAspect" class="org.springframework.cache.aspectj.AnnotationCacheAspect" factory-method="aspectOf"> <property name="cacheManager" ref="cacheManager"/> <property name="keyGenerator" ref="keyGenerator"/> </bean> | |