public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSource implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton
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() |
void |
afterSingletonsInstantiated() |
protected <T> T |
getBean(Class<T> type)
Locate or create an instance of the specified cache strategy
type. |
org.springframework.cache.CacheManager |
getCacheManager()
Return the specified cache manager to use, if any.
|
org.springframework.cache.interceptor.CacheResolver |
getCacheResolver()
Return the specified cache resolver to use, if any.
|
protected org.springframework.cache.CacheManager |
getDefaultCacheManager() |
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()
Return the specified exception cache resolver to use, if any.
|
org.springframework.cache.interceptor.KeyGenerator |
getKeyGenerator()
Return the specified key generator to use, if any.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
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 org.springframework.cache.CacheManager getCacheManager()
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 setKeyGenerator(org.springframework.cache.interceptor.KeyGenerator keyGenerator)
KeyGenerator. If none is set, a SimpleKeyGenerator
honoring the JSR-107 CacheKey and
CacheValue will be used.public org.springframework.cache.interceptor.KeyGenerator getKeyGenerator()
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void afterSingletonsInstantiated()
afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingletonprotected <T> T getBean(Class<T> type)
AnnotationJCacheOperationSourcetype.getBean in class AnnotationJCacheOperationSourcetype - the type of the bean to manageprotected org.springframework.cache.CacheManager getDefaultCacheManager()
protected 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