org.onebusaway.container.cache
Class CacheableMethodManager

java.lang.Object
  extended by org.onebusaway.container.cache.CacheableMethodManager
Direct Known Subclasses:
CacheableAnnotationInterceptor, TransitDataServiceCachingInterceptor

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
protected  CacheableMethodKeyFactoryManager _cacheableMethodKeyFactoryManager
           
 
Constructor Summary
CacheableMethodManager()
           
 
Method Summary
protected  net.sf.ehcache.Cache createCache(org.aspectj.lang.ProceedingJoinPoint pjp, String name)
           
 Object evaluate(org.aspectj.lang.ProceedingJoinPoint pjp)
           
protected  String getCacheName(org.aspectj.lang.ProceedingJoinPoint pjp)
           
protected  CacheableMethodKeyFactory getKeyFactory(org.aspectj.lang.ProceedingJoinPoint pjp, Method method)
          Protected Methods
 void setCacheableMethodKeyFactoryManager(CacheableMethodKeyFactoryManager cacheableMethodKeyFactoryManager)
           
 void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
           
 void setCacheNamePrefix(String cacheNamePrefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_cacheableMethodKeyFactoryManager

protected CacheableMethodKeyFactoryManager _cacheableMethodKeyFactoryManager
Constructor Detail

CacheableMethodManager

public CacheableMethodManager()
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)


Copyright © 2011 OneBusAway. All Rights Reserved.