org.onebusaway.container.cache
Class DefaultCacheableObjectKeyFactory

java.lang.Object
  extended by 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

Constructor Summary
DefaultCacheableObjectKeyFactory()
           
 
Method Summary
 CacheKeyInfo createKey(Object object)
           
 boolean isCacheRefreshCheck()
           
 void setCacheRefreshCheck(boolean cacheRefreshCheck)
          Set to true if we should check the object value to indicate a cache refresh.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCacheableObjectKeyFactory

public DefaultCacheableObjectKeyFactory()
Method Detail

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.