org.mmbase.cache.xslt
Class ResultCache
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--org.mmbase.util.LRUHashtable
|
+--org.mmbase.cache.Cache
|
+--org.mmbase.cache.xslt.ResultCache
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable, SizeMeasurable
- public class ResultCache
- extends Cache
Caches the results of XSL transformations.
- Since:
- MMBase-1.6
- Version:
- $Id: ResultCache.java,v 1.5 2002/10/30 00:05:03 michiel Exp $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
|
Method Summary |
java.lang.String |
get(javax.xml.transform.Templates temp,
javax.xml.transform.Source xsl,
java.util.Map params,
java.util.Properties props,
org.w3c.dom.Document src)
This is an intelligent get, which also does the put if it cannot find the requested result. |
static ResultCache |
getCache()
Returns the XSLT Result cache. |
protected int |
getDefaultMaxEntrySize()
This has to be override by Caches which support max entry size. |
java.lang.String |
getDescription()
Gives a description for this cache type. |
java.lang.String |
getName()
Returns a name for this cache type. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
You can only put Source/Templates values in the cache, so this throws an Exception. |
| Methods inherited from class org.mmbase.cache.Cache |
get, getByteSize, getByteSize, getCache, getCaches, getMaxEntrySize, getTotalByteSize, isActive, main, putCache, putCache, setActive |
| Methods inherited from class org.mmbase.util.LRUHashtable |
clear, clone, elements, entrySet, getCount, getHits, getMisses, getOrderedElements, getOrderedElements, getOrderedEntries, getOrderedEntries, getPuts, getRatio, getSize, getStats, keySet, remove, setSize, size, toString, toString, values |
| Methods inherited from class java.util.Hashtable |
contains, containsKey, containsValue, equals, hashCode, isEmpty, keys, putAll, rehash |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
getDefaultMaxEntrySize
protected int getDefaultMaxEntrySize()
- Description copied from class:
Cache
- This has to be override by Caches which support max entry size.
- Overrides:
getDefaultMaxEntrySize in class Cache
getCache
public static ResultCache getCache()
- Returns the XSLT Result cache.
getName
public java.lang.String getName()
- Description copied from class:
Cache
- Returns a name for this cache type. Default it is the class
name, but this normally will be overriden.
- Overrides:
getName in class Cache
getDescription
public java.lang.String getDescription()
- Description copied from class:
Cache
- Gives a description for this cache type. This can be used in
cache overviews.
- Overrides:
getDescription in class Cache
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- You can only put Source/Templates values in the cache, so this throws an Exception.
- Overrides:
put in class Cache
- Throws:
java.lang.RuntimeException -
get
public java.lang.String get(javax.xml.transform.Templates temp,
javax.xml.transform.Source xsl,
java.util.Map params,
java.util.Properties props,
org.w3c.dom.Document src)
- This is an intelligent get, which also does the put if it cannot find the requested result.
- Parameters:
temp - The Templates from which the transformer must be created (if necessary)xsl - The XSL Source. This only used to produce the key, because with the Templates it
is difficultparams - Parameters for the XSL Transformationsrc - The Document which must be transformed.- Returns:
- The transformation result. It does not return null.
MMBase build 1.6.5.20030923