Package org.onebusaway.container.cache
Class CacheableMethodKeyFactoryManager
- java.lang.Object
-
- org.onebusaway.container.cache.CacheableMethodKeyFactoryManager
-
@Component public class CacheableMethodKeyFactoryManager extends Object
Support class that determines the caching policy for a particular method by producing aCacheableMethodKeyFactoryfor that method. We make use ofCacheable,CacheableArgument, andCacheableKeyannotations to allow customization of the default key factory behavior, as well as directly setting behavior using methods such assetCacheKeyFactories(Map)andputCacheRefreshIndicatorArgumentIndexForMethod(Method, int).- Author:
- bdferris
- See Also:
CacheableMethodKeyFactory,Cacheable,CacheableArgument,CacheableKey
-
-
Constructor Summary
Constructors Constructor Description CacheableMethodKeyFactoryManager()
-
Method Summary
-
-
-
Method Detail
-
addCacheableObjectKeyFactory
public void addCacheableObjectKeyFactory(Class<?> className, CacheableObjectKeyFactory keyFactory)
-
putCacheRefreshIndicatorArgumentIndexForMethodSignature
public void putCacheRefreshIndicatorArgumentIndexForMethodSignature(String methodName, int argumentIndex)
-
putCacheRefreshIndicatorArgumentIndexForMethod
public void putCacheRefreshIndicatorArgumentIndexForMethod(Method method, int argumentIndex)
-
getCacheableMethodKeyFactoryForJoinPoint
public CacheableMethodKeyFactory getCacheableMethodKeyFactoryForJoinPoint(org.aspectj.lang.ProceedingJoinPoint pjp, Method method)
-
getCacheableMethodKeyFactoryForMethod
public CacheableMethodKeyFactory getCacheableMethodKeyFactoryForMethod(Method m)
-
getMatchingMethodForJoinPoint
public Method getMatchingMethodForJoinPoint(org.aspectj.lang.ProceedingJoinPoint pjp)
-
getMatchingMethodsForJoinPoint
public List<Method> getMatchingMethodsForJoinPoint(org.aspectj.lang.ProceedingJoinPoint pjp)
-
getCacheableArgumentAnnotation
protected CacheableArgument getCacheableArgumentAnnotation(Annotation[] annotations)
Private Methods
-
getKeyFactoryForCacheableArgumentAnnotation
protected CacheableObjectKeyFactory getKeyFactoryForCacheableArgumentAnnotation(Class<?> type, CacheableArgument cacheableArgumentAnnotation, boolean cacheRefreshIndicator)
-
getKeyFactoryForParameterType
protected CacheableObjectKeyFactory getKeyFactoryForParameterType(Class<?> type, boolean cacheRefreshIndicator)
-
createCache
protected net.sf.ehcache.Cache createCache(org.aspectj.lang.ProceedingJoinPoint pjp, String name)
-
-