org.onebusaway.container.cache
Class DefaultCacheableKeyFactory

java.lang.Object
  extended by org.onebusaway.container.cache.DefaultCacheableKeyFactory
All Implemented Interfaces:
Serializable, CacheableMethodKeyFactory

public class DefaultCacheableKeyFactory
extends Object
implements CacheableMethodKeyFactory, Serializable

Factory for producing a CacheKeyInfo cache key from a ProceedingJoinPoint method invocation. The default implementation considers each argument to the method invocation and applies a CacheableObjectKeyFactory to produce a Serializable key value for that argument. An array of those Serializable key values are composed together to make the final cache key. The CacheKeyInfo.isCacheRefreshIndicated() cache refresh indicators from each argument key are ORed together to produce a refresh indicator for the entire method.

Author:
bdferris
See Also:
Cacheable.keyFactory(), CacheableMethodKeyFactory, CacheableObjectKeyFactory, Serialized Form

Constructor Summary
DefaultCacheableKeyFactory(CacheableObjectKeyFactory[] keyFactories)
           
 
Method Summary
 CacheKeyInfo createKey(org.aspectj.lang.ProceedingJoinPoint point)
           
 int getNumberOfObjectKeyFactories()
           
 CacheableObjectKeyFactory getObjectKeyFactory(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCacheableKeyFactory

public DefaultCacheableKeyFactory(CacheableObjectKeyFactory[] keyFactories)
Method Detail

getNumberOfObjectKeyFactories

public int getNumberOfObjectKeyFactories()

getObjectKeyFactory

public CacheableObjectKeyFactory getObjectKeyFactory(int i)

createKey

public CacheKeyInfo createKey(org.aspectj.lang.ProceedingJoinPoint point)
Specified by:
createKey in interface CacheableMethodKeyFactory


Copyright © 2012 OneBusAway. All Rights Reserved.