Package org.pentaho.reporting.libraries.resourceloader.cache

# Class NullResourceDataCache

java.lang.Object
org.pentaho.reporting.libraries.resourceloader.cache.NullResourceDataCache

All Implemented Interfaces:
  `ResourceDataCache`

public class NullResourceDataCache extends Object implements ResourceDataCache
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
`NullResourceDataCache()`

## Method Summary

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()`

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

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

## Constructor Details

### NullResourceDataCache

public NullResourceDataCache()

## Method Details

### put

public ResourceData put(ResourceManager caller, ResourceData data) throws ResourceLoadingException
Description copied from interface: `ResourceDataCache`
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 `ResourceDataCache`
Parameters:
  `data` - the data to be stored in the cache
Returns:
  the resource data object, possibly wrapped by a cache-specific implementation.
Throws:
  `ResourceLoadingException`

### get

public ResourceDataCacheEntry get(ResourceKey key)
Description copied from interface: `ResourceDataCache`
Retrieves the given data from the cache.

Specified by:
  `get` in interface `ResourceDataCache`
Parameters:
  `key` - the resource key for the data.

### remove

public void remove(ResourceData data)

Specified by:
  `remove` in interface `ResourceDataCache`

### clear

public void clear()
Description copied from interface: `ResourceDataCache`
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 `ResourceDataCache`

### shutdown

public void shutdown()

Specified by:
  `shutdown` in interface `ResourceDataCache`