org.onebusaway.presentation.impl.transit_data
Class TransitDataServiceCachingInterceptor

java.lang.Object
  extended by org.onebusaway.container.cache.CacheableMethodManager
      extended by org.onebusaway.presentation.impl.transit_data.TransitDataServiceCachingInterceptor

public class TransitDataServiceCachingInterceptor
extends CacheableMethodManager

To reduce the load on the TransitDataService, we can opportunistically cache a lot of stuff on the client side.

Author:
bdferris

Field Summary
 
Fields inherited from class org.onebusaway.container.cache.CacheableMethodManager
_cacheableMethodKeyFactoryManager
 
Constructor Summary
TransitDataServiceCachingInterceptor()
           
 
Method Summary
protected  net.sf.ehcache.Cache createCache(org.aspectj.lang.ProceedingJoinPoint pjp, String name)
           
 Object getRoute(org.aspectj.lang.ProceedingJoinPoint pjp)
           
 Object getSingleTripDetails(org.aspectj.lang.ProceedingJoinPoint pjp)
           
 Object getStop(org.aspectj.lang.ProceedingJoinPoint pjp)
           
 Object getStopsForRoute(org.aspectj.lang.ProceedingJoinPoint pjp)
           
 Object getStopWithArrivalsAndDepartures(org.aspectj.lang.ProceedingJoinPoint pjp)
           
 void setArrivalAndDepartureCacheSize(int arrivalAndDepartureCacheSize)
           
 void setArrivalAndDepartureCacheWindow(int arrivalAndDepartureCacheWindow)
           
 void setup()
           
 
Methods inherited from class org.onebusaway.container.cache.CacheableMethodManager
evaluate, getCacheName, getKeyFactory, setCacheableMethodKeyFactoryManager, setCacheManager, setCacheNamePrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitDataServiceCachingInterceptor

public TransitDataServiceCachingInterceptor()
Method Detail

setup

@PostConstruct
public void setup()

setArrivalAndDepartureCacheWindow

public void setArrivalAndDepartureCacheWindow(int arrivalAndDepartureCacheWindow)
Parameters:
arrivalAndDepartureCacheWindow - in seconds

setArrivalAndDepartureCacheSize

public void setArrivalAndDepartureCacheSize(int arrivalAndDepartureCacheSize)

getRoute

public Object getRoute(org.aspectj.lang.ProceedingJoinPoint pjp)
                throws Throwable
Throws:
Throwable

getStop

public Object getStop(org.aspectj.lang.ProceedingJoinPoint pjp)
               throws Throwable
Throws:
Throwable

getStopsForRoute

public Object getStopsForRoute(org.aspectj.lang.ProceedingJoinPoint pjp)
                        throws Throwable
Throws:
Throwable

getSingleTripDetails

public Object getSingleTripDetails(org.aspectj.lang.ProceedingJoinPoint pjp)
                            throws Throwable
Throws:
Throwable

getStopWithArrivalsAndDepartures

public Object getStopWithArrivalsAndDepartures(org.aspectj.lang.ProceedingJoinPoint pjp)
                                        throws Throwable
Throws:
Throwable

createCache

protected net.sf.ehcache.Cache createCache(org.aspectj.lang.ProceedingJoinPoint pjp,
                                           String name)
Overrides:
createCache in class CacheableMethodManager


Copyright © 2012 OneBusAway. All Rights Reserved.