Package org.onebusaway.container.cache
Class CacheableMethodManager
- java.lang.Object
-
- org.onebusaway.container.cache.CacheableMethodManager
-
- Direct Known Subclasses:
CacheableAnnotationInterceptor
public class CacheableMethodManager extends Object
Support class providing functionality for caching the output of arbitrary method calls, using the arguments to the method to generate the cache key. EhCache is used as the backing cache store.- Author:
- bdferris
- See Also:
Cacheable,CacheableAnnotationInterceptor,CacheableMethodKeyFactory,CacheableMethodKeyFactoryManager
-
-
Field Summary
Fields Modifier and Type Field Description protected CacheableMethodKeyFactoryManager_cacheableMethodKeyFactoryManager
-
Constructor Summary
Constructors Constructor Description CacheableMethodManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected net.sf.ehcache.CachecreateCache(org.aspectj.lang.ProceedingJoinPoint pjp, String name)Objectevaluate(org.aspectj.lang.ProceedingJoinPoint pjp)protected StringgetCacheName(org.aspectj.lang.ProceedingJoinPoint pjp)protected CacheableMethodKeyFactorygetKeyFactory(org.aspectj.lang.ProceedingJoinPoint pjp, Method method)Protected MethodsvoidsetCacheableMethodKeyFactoryManager(CacheableMethodKeyFactoryManager cacheableMethodKeyFactoryManager)voidsetCacheManager(net.sf.ehcache.CacheManager cacheManager)voidsetCacheNamePrefix(String cacheNamePrefix)
-
-
-
Field Detail
-
_cacheableMethodKeyFactoryManager
protected CacheableMethodKeyFactoryManager _cacheableMethodKeyFactoryManager
-
-
Method Detail
-
setCacheManager
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
-
setCacheableMethodKeyFactoryManager
public void setCacheableMethodKeyFactoryManager(CacheableMethodKeyFactoryManager cacheableMethodKeyFactoryManager)
-
setCacheNamePrefix
public void setCacheNamePrefix(String cacheNamePrefix)
-
evaluate
public Object evaluate(org.aspectj.lang.ProceedingJoinPoint pjp) throws Throwable
- Throws:
Throwable
-
getKeyFactory
protected CacheableMethodKeyFactory getKeyFactory(org.aspectj.lang.ProceedingJoinPoint pjp, Method method)
Protected Methods- Parameters:
method-
-
getCacheName
protected String getCacheName(org.aspectj.lang.ProceedingJoinPoint pjp)
-
createCache
protected net.sf.ehcache.Cache createCache(org.aspectj.lang.ProceedingJoinPoint pjp, String name)
-
-