Package org.onebusaway.container.cache
Class DefaultCacheableKeyFactory
- java.lang.Object
-
- org.onebusaway.container.cache.DefaultCacheableKeyFactory
-
- All Implemented Interfaces:
Serializable,CacheableMethodKeyFactory
public class DefaultCacheableKeyFactory extends Object implements CacheableMethodKeyFactory, Serializable
Factory for producing aCacheKeyInfocache key from aProceedingJoinPointmethod invocation. The default implementation considers each argument to the method invocation and applies aCacheableObjectKeyFactoryto produce aSerializablekey value for that argument. An array of thoseSerializablekey values are composed together to make the final cache key. TheCacheKeyInfo.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
Constructors Constructor Description DefaultCacheableKeyFactory(CacheableObjectKeyFactory[] keyFactories)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheKeyInfocreateKey(org.aspectj.lang.ProceedingJoinPoint point)intgetNumberOfObjectKeyFactories()CacheableObjectKeyFactorygetObjectKeyFactory(int i)
-
-
-
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:
createKeyin interfaceCacheableMethodKeyFactory
-
-