org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache

## Class EHResourceBundleDataCache

- java.lang.Object
- - org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache.EHResourceBundleDataCache

All Implemented Interfaces:
  ResourceBundleDataCache

    public class EHResourceBundleDataCache
    extends java.lang.Object
    implements ResourceBundleDataCache

Creation-Date: 13.04.2006, 16:30:34

Author:
  Thomas Morgner

### Constructor Summary

Constructors
Constructor and Description
`EHResourceBundleDataCache(Cache dataCache)`

### Method Summary

Methods
`void` `clear()` Remove all cached entries.
`ResourceBundleDataCacheEntry` `get(ResourceKey key)` Retrieves the given data from the cache.
`ResourceBundleData` `put(ResourceManager caller, ResourceBundleData data)` Stores the given data on the cache.
`void` `remove(ResourceBundleData data)`
`void` `shutdown()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EHResourceBundleDataCache

    public EHResourceBundleDataCache(Cache dataCache)

### Method Detail

#### get

    public ResourceBundleDataCacheEntry get(ResourceKey key)

Retrieves the given data from the cache.

Specified by:
  `get` in interface `ResourceBundleDataCache`
Parameters:
  `key` - the resource key for the data.
Returns:
  the cached entry or null, if the entry is no longer in the cache.

#### 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 interface `ResourceBundleDataCache`
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.

#### remove

    public void remove(ResourceBundleData data)

Specified by:
  `remove` in interface `ResourceBundleDataCache`

#### 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 interface `ResourceBundleDataCache`

#### shutdown

    public void shutdown()

Specified by:
  `shutdown` in interface `ResourceBundleDataCache`