Java Code Examples for javax.cache.annotation.CacheMethodDetails#getCacheAnnotation()
The following examples show how to use
javax.cache.annotation.CacheMethodDetails#getCacheAnnotation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CachePutOperation.java From spring-analysis-note with MIT License | 6 votes |
public CachePutOperation( CacheMethodDetails<CachePut> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CachePut ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cacheFor(), ann.noCacheFor()); CacheParameterDetail valueParameterDetail = initializeValueParameterDetail(methodDetails.getMethod(), this.allParameterDetails); if (valueParameterDetail == null) { throw new IllegalArgumentException("No parameter annotated with @CacheValue was found for " + methodDetails.getMethod()); } this.valueParameterDetail = valueParameterDetail; }
Example 2
Source File: CachePutOperation.java From java-technology-stack with MIT License | 6 votes |
public CachePutOperation( CacheMethodDetails<CachePut> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CachePut ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cacheFor(), ann.noCacheFor()); CacheParameterDetail valueParameterDetail = initializeValueParameterDetail(methodDetails.getMethod(), this.allParameterDetails); if (valueParameterDetail == null) { throw new IllegalArgumentException("No parameter annotated with @CacheValue was found for " + methodDetails.getMethod()); } this.valueParameterDetail = valueParameterDetail; }
Example 3
Source File: CacheRemoveOperation.java From spring-analysis-note with MIT License | 5 votes |
public CacheRemoveOperation( CacheMethodDetails<CacheRemove> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CacheRemove ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 4
Source File: CacheResultOperation.java From spring-analysis-note with MIT License | 5 votes |
public CacheResultOperation(CacheMethodDetails<CacheResult> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator, @Nullable CacheResolver exceptionCacheResolver) { super(methodDetails, cacheResolver, keyGenerator); CacheResult ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cachedExceptions(), ann.nonCachedExceptions()); this.exceptionCacheResolver = exceptionCacheResolver; this.exceptionCacheName = (StringUtils.hasText(ann.exceptionCacheName()) ? ann.exceptionCacheName() : null); }
Example 5
Source File: CacheRemoveOperation.java From java-technology-stack with MIT License | 5 votes |
public CacheRemoveOperation( CacheMethodDetails<CacheRemove> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CacheRemove ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 6
Source File: CacheResultOperation.java From java-technology-stack with MIT License | 5 votes |
public CacheResultOperation(CacheMethodDetails<CacheResult> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator, @Nullable CacheResolver exceptionCacheResolver) { super(methodDetails, cacheResolver, keyGenerator); CacheResult ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cachedExceptions(), ann.nonCachedExceptions()); this.exceptionCacheResolver = exceptionCacheResolver; this.exceptionCacheName = (StringUtils.hasText(ann.exceptionCacheName()) ? ann.exceptionCacheName() : null); }
Example 7
Source File: CachePutOperation.java From lams with GNU General Public License v2.0 | 5 votes |
public CachePutOperation( CacheMethodDetails<CachePut> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CachePut ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cacheFor(), ann.noCacheFor()); this.valueParameterDetail = initializeValueParameterDetail(methodDetails.getMethod(), this.allParameterDetails); if (this.valueParameterDetail == null) { throw new IllegalArgumentException("No parameter annotated with @CacheValue was found for " + "" + methodDetails.getMethod()); } }
Example 8
Source File: CacheRemoveOperation.java From lams with GNU General Public License v2.0 | 5 votes |
public CacheRemoveOperation( CacheMethodDetails<CacheRemove> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CacheRemove ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 9
Source File: CacheResultOperation.java From lams with GNU General Public License v2.0 | 5 votes |
public CacheResultOperation(CacheMethodDetails<CacheResult> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator, CacheResolver exceptionCacheResolver) { super(methodDetails, cacheResolver, keyGenerator); CacheResult ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cachedExceptions(), ann.nonCachedExceptions()); this.exceptionCacheResolver = exceptionCacheResolver; this.exceptionCacheName = (StringUtils.hasText(ann.exceptionCacheName()) ? ann.exceptionCacheName() : null); }
Example 10
Source File: CachePutOperation.java From spring4-understanding with Apache License 2.0 | 5 votes |
public CachePutOperation( CacheMethodDetails<CachePut> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CachePut ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cacheFor(), ann.noCacheFor()); this.valueParameterDetail = initializeValueParameterDetail(methodDetails.getMethod(), this.allParameterDetails); if (this.valueParameterDetail == null) { throw new IllegalArgumentException("No parameter annotated with @CacheValue was found for " + "" + methodDetails.getMethod()); } }
Example 11
Source File: CacheRemoveOperation.java From spring4-understanding with Apache License 2.0 | 5 votes |
public CacheRemoveOperation( CacheMethodDetails<CacheRemove> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) { super(methodDetails, cacheResolver, keyGenerator); CacheRemove ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 12
Source File: CacheResultOperation.java From spring4-understanding with Apache License 2.0 | 5 votes |
public CacheResultOperation(CacheMethodDetails<CacheResult> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator, CacheResolver exceptionCacheResolver) { super(methodDetails, cacheResolver, keyGenerator); CacheResult ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.cachedExceptions(), ann.nonCachedExceptions()); this.exceptionCacheResolver = exceptionCacheResolver; this.exceptionCacheName = (StringUtils.hasText(ann.exceptionCacheName()) ? ann.exceptionCacheName() : null); }
Example 13
Source File: CacheRemoveAllOperation.java From spring-analysis-note with MIT License | 4 votes |
public CacheRemoveAllOperation(CacheMethodDetails<CacheRemoveAll> methodDetails, CacheResolver cacheResolver) { super(methodDetails, cacheResolver); CacheRemoveAll ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 14
Source File: CacheRemoveAllOperation.java From java-technology-stack with MIT License | 4 votes |
public CacheRemoveAllOperation(CacheMethodDetails<CacheRemoveAll> methodDetails, CacheResolver cacheResolver) { super(methodDetails, cacheResolver); CacheRemoveAll ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 15
Source File: CacheRemoveAllOperation.java From lams with GNU General Public License v2.0 | 4 votes |
public CacheRemoveAllOperation(CacheMethodDetails<CacheRemoveAll> methodDetails, CacheResolver cacheResolver) { super(methodDetails, cacheResolver); CacheRemoveAll ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }
Example 16
Source File: CacheRemoveAllOperation.java From spring4-understanding with Apache License 2.0 | 4 votes |
public CacheRemoveAllOperation(CacheMethodDetails<CacheRemoveAll> methodDetails, CacheResolver cacheResolver) { super(methodDetails, cacheResolver); CacheRemoveAll ann = methodDetails.getCacheAnnotation(); this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor()); }