public class ResourceConverterCacheImpl extends GenericCacheImpl<com.ibm.jaggr.core.impl.cache.ResourceConverterCacheImpl.CacheEntry> implements Serializable, IResourceConverterCache
Modifier and Type | Class and Description |
---|---|
static interface |
ResourceConverterCacheImpl.IConverter |
cacheMap
Constructor and Description |
---|
ResourceConverterCacheImpl(ResourceConverterCacheImpl.IConverter converter,
String prefix,
String suffix) |
Modifier and Type | Method and Description |
---|---|
IResource |
convert(String key,
IResource source)
Returns the cache file for the specified key.
|
ResourceConverterCacheImpl.IConverter |
getConverter() |
String |
getPrefix() |
String |
getSuffix() |
IGenericCache |
newInstance()
Returns a new, empty, instance of this cache object.
|
void |
setAggregator(IAggregator aggregator)
Called for newly created (or de-serialized) caches to set the
aggregator instance for this cache.
|
clear, contains, dump, get, getKeys, size
public ResourceConverterCacheImpl(ResourceConverterCacheImpl.IConverter converter, String prefix, String suffix)
converter
- the converter used to create new cache entries.prefix
- the prefix to use for cache file names.suffix
- the suffix to use for cache file names.public ResourceConverterCacheImpl.IConverter getConverter()
public String getPrefix()
public String getSuffix()
public IResource convert(String key, IResource source) throws IOException
IResourceConverterCache
convert
in interface IResourceConverterCache
key
- the cache keysource
- the resource to be converted (may be null). If null, the result will be non-null
only if the cache entry already exists.source
is null and the cache entry
does not already exist.IOException
public void setAggregator(IAggregator aggregator)
IGenericCache
IAggregator.getConfig()
may return null if called
from within this method.setAggregator
in interface IGenericCache
setAggregator
in class GenericCacheImpl<com.ibm.jaggr.core.impl.cache.ResourceConverterCacheImpl.CacheEntry>
aggregator
- The aggregator instance for the cachepublic IGenericCache newInstance()
IGenericCache
newInstance
in interface IGenericCache
newInstance
in class GenericCacheImpl<com.ibm.jaggr.core.impl.cache.ResourceConverterCacheImpl.CacheEntry>
Copyright © 2011-2015 IBM. All Rights Reserved.