org.mmbase.cache.xslt
Class FactoryCache

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byorg.mmbase.util.LRUHashtable
              extended byorg.mmbase.cache.Cache
                  extended byorg.mmbase.cache.xslt.FactoryCache
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable, SizeMeasurable

public class FactoryCache
extends Cache

A cache for XSL Transformer Factories. There is one needed for every directory, or more precisely, for every instance of org.mmbase.util.xml.URIResolver.

Version:
$Id: FactoryCache.java,v 1.5 2003/07/17 17:01:17 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.mmbase.util.LRUHashtable
LRUHashtable.LRUEntry, LRUHashtable.LRUEntrySet, LRUHashtable.LRUEntrySetIterator
 
Field Summary
 
Fields inherited from class org.mmbase.cache.Cache
maxEntrySize
 
Method Summary
static FactoryCache getCache()
           
 javax.xml.transform.TransformerFactory getDefaultFactory()
          If it you are sure not to use the URIResolver, then you can as well use always the same Factory.
 java.lang.String getDescription()
          Gives a description for this cache type.
 javax.xml.transform.TransformerFactory getFactory(java.io.File cwd)
          Gets a Factory from the cache.
 javax.xml.transform.TransformerFactory getFactory(URIResolver uri)
          Make a factory for a certain URIResolver.
 java.lang.String getName()
          Returns a name for this cache type.
 
Methods inherited from class org.mmbase.cache.Cache
get, getByteSize, getByteSize, getCache, getCaches, getDefaultMaxEntrySize, getMaxEntrySize, getTotalByteSize, isActive, main, put, 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
 

Method Detail

getCache

public static FactoryCache getCache()

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

getDefaultFactory

public javax.xml.transform.TransformerFactory getDefaultFactory()
If it you are sure not to use the URIResolver, then you can as well use always the same Factory. This function supplies one.


getFactory

public javax.xml.transform.TransformerFactory getFactory(URIResolver uri)
Make a factory for a certain URIResolver.


getFactory

public javax.xml.transform.TransformerFactory getFactory(java.io.File cwd)
Gets a Factory from the cache. This cache is 'intelligent', you can also get from it when it is not in the cache, in which case a new Factory will be created (and put in the cache).



MMBase build 1.7.1.20041002