Class NullResourceBundleDataCache
- java.lang.Object
-
- org.pentaho.reporting.libraries.resourceloader.cache.NullResourceBundleDataCache
-
- All Implemented Interfaces:
ResourceBundleDataCache
public class NullResourceBundleDataCache extends Object implements ResourceBundleDataCache
Disables caching. It simply returns null on every request and ignores the put requests. You certainly want to use one of the other cache providers in real world applications.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description NullResourceBundleDataCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Remove all cached entries.ResourceBundleDataCacheEntryget(ResourceKey key)Retrieves the given data from the cache.ResourceBundleDataput(ResourceManager caller, ResourceBundleData data)Stores the given data on the cache.voidremove(ResourceBundleData data)voidshutdown()
-
-
-
Method Detail
-
put
public ResourceBundleData put(ResourceManager caller, ResourceBundleData data) throws ResourceLoadingException
Description copied from interface:ResourceBundleDataCacheStores the given data on the cache. The data is registered by its primary key. The cache has to store the current version of the data.- Specified by:
putin interfaceResourceBundleDataCache- Parameters:
caller- the calling resource manager.data- the data to be stored in the cache- Returns:
- the resource data object, possibly wrapped by a cache-specific implementation.
- Throws:
ResourceLoadingException- if an error prevents the data from being cached.
-
get
public ResourceBundleDataCacheEntry get(ResourceKey key)
Description copied from interface:ResourceBundleDataCacheRetrieves the given data from the cache.- Specified by:
getin interfaceResourceBundleDataCache- Parameters:
key- the resource key for the data.- Returns:
- the cached entry or null, if the entry is no longer in the cache.
-
remove
public void remove(ResourceBundleData data)
- Specified by:
removein interfaceResourceBundleDataCache
-
clear
public void clear()
Description copied from interface:ResourceBundleDataCacheRemove all cached entries. This should be called after the cache has become invalid or after it has been removed from a resource manager.- Specified by:
clearin interfaceResourceBundleDataCache
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceResourceBundleDataCache
-
-