public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSource implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
JCacheOperationSource implementation delegating
default operations to configurable services with sensible defaults
when not present.logger| Constructor and Description |
|---|
DefaultJCacheOperationSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected <T> T |
getBean(Class<T> type)
Locate or create an instance of the specified
type. |
org.springframework.cache.interceptor.CacheResolver |
getCacheResolver() |
protected org.springframework.cache.interceptor.CacheResolver |
getDefaultCacheResolver()
Return the default
CacheResolver if none is set. |
protected org.springframework.cache.interceptor.CacheResolver |
getDefaultExceptionCacheResolver()
Return the default exception
CacheResolver if none is set. |
protected org.springframework.cache.interceptor.KeyGenerator |
getDefaultKeyGenerator()
Return the default
KeyGenerator if none is set. |
org.springframework.cache.interceptor.CacheResolver |
getExceptionCacheResolver() |
org.springframework.cache.interceptor.KeyGenerator |
getKeyGenerator() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setCacheManager(org.springframework.cache.CacheManager cacheManager)
Set the default
CacheManager to use to lookup cache by name. |
void |
setCacheResolver(org.springframework.cache.interceptor.CacheResolver cacheResolver)
Set the
CacheResolver to resolve regular caches. |
void |
setExceptionCacheResolver(org.springframework.cache.interceptor.CacheResolver exceptionCacheResolver)
Set the
CacheResolver to resolve exception caches. |
void |
setKeyGenerator(org.springframework.cache.interceptor.KeyGenerator keyGenerator)
Set the default
KeyGenerator. |
createCachePutOperation, createCacheRemoveAllOperation, createCacheRemoveOperation, createCacheResultOperation, determineCacheName, determineCacheResolverFactory, determineKeyGenerator, findCacheOperation, generateDefaultCacheName, getCacheDefaults, getCacheResolver, getExceptionCacheResolverallowPublicMethodsOnly, getCacheOperationpublic void setCacheManager(org.springframework.cache.CacheManager cacheManager)
CacheManager to use to lookup cache by name. Only mandatory
if the cache resolvers have not been set.public void setKeyGenerator(org.springframework.cache.interceptor.KeyGenerator keyGenerator)
KeyGenerator. If none is set, a SimpleKeyGenerator
honoringKe the JSR-107 CacheKey and
CacheValue will be used.public org.springframework.cache.interceptor.KeyGenerator getKeyGenerator()
public void setCacheResolver(org.springframework.cache.interceptor.CacheResolver cacheResolver)
CacheResolver to resolve regular caches. If none is set, a default
implementation using the specified cache manager will be used.public org.springframework.cache.interceptor.CacheResolver getCacheResolver()
public void setExceptionCacheResolver(org.springframework.cache.interceptor.CacheResolver exceptionCacheResolver)
CacheResolver to resolve exception caches. If none is set, a default
implementation using the specified cache manager will be used.public org.springframework.cache.interceptor.CacheResolver getExceptionCacheResolver()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprotected <T> T getBean(Class<T> type)
AnnotationJCacheOperationSourcetype.getBean in class AnnotationJCacheOperationSourcetype - the type of the bean to manageprotected org.springframework.cache.interceptor.CacheResolver getDefaultCacheResolver()
AnnotationJCacheOperationSourceCacheResolver if none is set.getDefaultCacheResolver in class AnnotationJCacheOperationSourceprotected org.springframework.cache.interceptor.CacheResolver getDefaultExceptionCacheResolver()
AnnotationJCacheOperationSourceCacheResolver if none is set.getDefaultExceptionCacheResolver in class AnnotationJCacheOperationSourceprotected org.springframework.cache.interceptor.KeyGenerator getDefaultKeyGenerator()
AnnotationJCacheOperationSourceKeyGenerator if none is set.getDefaultKeyGenerator in class AnnotationJCacheOperationSource