|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.cache.CacheFactoryRegistry
public final class CacheFactoryRegistry
Registry for CacheFactory
implementations obtained from the Castor
properties file and used by the JDO mapping configuration file.
Constructor Summary | |
---|---|
CacheFactoryRegistry(AbstractProperties properties)
Construct an instance of CacheFactoryRegistry that uses given properties to get required configuration properties. |
Method Summary | |
---|---|
Cache |
getCache(java.util.Properties props,
java.lang.ClassLoader classLoader)
Returns a Cache instance with the specified properties. |
java.util.Collection<CacheFactory> |
getCacheFactories()
Returns a collection of the current configured cache factories. |
java.util.Collection<java.lang.String> |
getCacheNames()
Returns a collection of the current configured cache factory names. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheFactoryRegistry(AbstractProperties properties)
properties
- The properties.Method Detail |
---|
public Cache getCache(java.util.Properties props, java.lang.ClassLoader classLoader) throws CacheAcquireException
Cache
instance with the specified properties.
The type of the returned cache is taken from the type property. If not specified a count-limited cache will be returned. If the type of the cache specified is unknown a CacheAcquireException will be thrown.
If the given properties contain a debug property set to true or if debugging for the selected cache type is enabled, the returned cache will be wrapped by a DebuggingCacheProxy. This proxy will output debug messages to the log if logging for the Cache interface is enabled through the logging system.
props
- Properties to initialize the cache with.classLoader
- A ClassLoader instance.
Cache
instance.
CacheAcquireException
- A cache of the type specified can not be acquired.public java.util.Collection<CacheFactory> getCacheFactories()
public java.util.Collection<java.lang.String> getCacheNames()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |