Class NullResourceBundleDataCache
java.lang.Object
org.pentaho.reporting.libraries.resourceloader.cache.NullResourceBundleDataCache
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Remove all cached entries.get
(ResourceKey key) Retrieves the given data from the cache.put
(ResourceManager caller, ResourceBundleData data) Stores the given data on the cache.void
remove
(ResourceBundleData data) void
shutdown()
-
Constructor Details
-
NullResourceBundleDataCache
public NullResourceBundleDataCache()
-
-
Method Details
-
put
public ResourceBundleData put(ResourceManager caller, ResourceBundleData data) throws ResourceLoadingException Description copied from interface:ResourceBundleDataCache
Stores 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:
put
in 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
Description copied from interface:ResourceBundleDataCache
Retrieves the given data from the cache.- Specified by:
get
in 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
- Specified by:
remove
in interfaceResourceBundleDataCache
-
clear
public void clear()Description copied from interface:ResourceBundleDataCache
Remove 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:
clear
in interfaceResourceBundleDataCache
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceResourceBundleDataCache
-