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 a CacheableMethodKeyFactory
for that method. We make use of
Cacheable
, CacheableArgument
, and CacheableKey
annotations to allow customization of the default key factory behavior, as
well as directly setting behavior using methods such as
setCacheKeyFactories(Map)
and
putCacheRefreshIndicatorArgumentIndexForMethod(Method, int)
.
- Author:
- bdferris
- See Also:
CacheableMethodKeyFactory
,
Cacheable
,
CacheableArgument
,
CacheableKey
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheableMethodKeyFactoryManager
public CacheableMethodKeyFactoryManager()
addCacheableObjectKeyFactory
public void addCacheableObjectKeyFactory(Class<?> className,
CacheableObjectKeyFactory keyFactory)
setCacheKeyFactories
public void setCacheKeyFactories(Map<Object,Object> keyFactories)
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)
Copyright © 2012 OneBusAway. All Rights Reserved.