org.onebusaway.container.cache
Class DefaultCacheableObjectKeyFactory
java.lang.Object
org.onebusaway.container.cache.DefaultCacheableObjectKeyFactory
- All Implemented Interfaces:
- Serializable, CacheableObjectKeyFactory
public class DefaultCacheableObjectKeyFactory
- extends Object
- implements CacheableObjectKeyFactory, Serializable
Factory for producing a Serializable
cache key from a and arbitrary
object. This default implementation just uses the Object.toString()
representation of the object as the cache key.
- Author:
- bdferris
- See Also:
CacheableObjectKeyFactory
,
DefaultCacheableKeyFactory
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCacheableObjectKeyFactory
public DefaultCacheableObjectKeyFactory()
setCacheRefreshCheck
public void setCacheRefreshCheck(boolean cacheRefreshCheck)
- Set to true if we should check the object value to indicate a cache
refresh. A cache refresh will be flagged if the object value is equal to
Boolean.TRUE
.
- Parameters:
cacheRefreshCheck
- true if the object argument should be examined to
flag a cache refresh
isCacheRefreshCheck
public boolean isCacheRefreshCheck()
createKey
public CacheKeyInfo createKey(Object object)
- Specified by:
createKey
in interface CacheableObjectKeyFactory
Copyright © 2012 OneBusAway. All Rights Reserved.