Class EHResourceDataCache
- java.lang.Object
-
- org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache.EHResourceDataCache
-
- All Implemented Interfaces:
ResourceDataCache
public class EHResourceDataCache extends Object implements ResourceDataCache
-
-
Constructor Summary
Constructors Constructor Description EHResourceDataCache(net.sf.ehcache.Cache dataCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Remove all cached entries.ResourceDataCacheEntry
get(ResourceKey key)
Retrieves the given data from the cache.ResourceData
put(ResourceManager caller, ResourceData data)
Stores the given data on the cache.void
remove(ResourceData data)
void
shutdown()
-
-
-
Method Detail
-
get
public ResourceDataCacheEntry get(ResourceKey key)
Retrieves the given data from the cache.- Specified by:
get
in interfaceResourceDataCache
- Parameters:
key
- the resource key for the data.
-
put
public ResourceData put(ResourceManager caller, ResourceData data) throws ResourceLoadingException
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 interfaceResourceDataCache
- Parameters:
data
- the data to be stored in the cache- Returns:
- the resource data object, possibly wrapped by a cache-specific implementation.
- Throws:
ResourceLoadingException
-
remove
public void remove(ResourceData data)
- Specified by:
remove
in interfaceResourceDataCache
-
clear
public void clear()
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 interfaceResourceDataCache
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceResourceDataCache
-
-