org.apache.xmlbeans.impl.common
Class SystemCache

java.lang.Object
  extended by org.apache.xmlbeans.impl.common.SystemCache

public class SystemCache
extends java.lang.Object

This class encapsulates the caching strategy for XmlBeans. By subclassing this, a client of XmlBeans can implement caches that are more suitable for different applications using information that XmlBeans cannot know.

This class works as a singleton and as a default implementation for the cache. You can set a particular implementation using the "xmlbean.systemcacheimpl" system property or using the static set method. Subclasses of this need to be thread-safe. An implementation can be replaced at any time, so use of static variables is discouraged to ensure proper cleanup.


Constructor Summary
SystemCache()
           
 
Method Summary
 void addToTypeLoaderCache(SchemaTypeLoader stl, java.lang.ClassLoader cl)
           
 void clearThreadLocals()
           
static SystemCache get()
           
 SchemaTypeLoader getFromTypeLoaderCache(java.lang.ClassLoader cl)
           
 java.lang.Object getSaxLoader()
           
static void set(SystemCache instance)
           
 void setSaxLoader(java.lang.Object saxLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemCache

public SystemCache()
Method Detail

set

public static final void set(SystemCache instance)

get

public static final SystemCache get()

getFromTypeLoaderCache

public SchemaTypeLoader getFromTypeLoaderCache(java.lang.ClassLoader cl)

addToTypeLoaderCache

public void addToTypeLoaderCache(SchemaTypeLoader stl,
                                 java.lang.ClassLoader cl)

clearThreadLocals

public void clearThreadLocals()

getSaxLoader

public java.lang.Object getSaxLoader()

setSaxLoader

public void setSaxLoader(java.lang.Object saxLoader)