Package org.castor.cache.distributed
Class OsCacheFactory
java.lang.Object
org.castor.cache.distributed.OsCacheFactory
- All Implemented Interfaces:
CacheFactory
- Since:
- 1.0
- Version:
- $Revision: 8578 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Werner Guttmann, Ralf Joachim
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCache
(ClassLoader classLoader) Instantiates an instance of the cache implementation this factory is responsible for using the given classloader.getCache
(String implementation, ClassLoader classLoader) Normally called to initialize OsCache.Returns the full class name of the underlying cache implementation.Returns the short alias cache type for this factory instance.void
shutdown()
Allows for cache-specific shutdown operations and resource cleanup.
-
Constructor Details
-
OsCacheFactory
public OsCacheFactory()
-
-
Method Details
-
getCache
Instantiates an instance of the cache implementation this factory is responsible for using the given classloader.- Specified by:
getCache
in interfaceCacheFactory
- Parameters:
classLoader
- A ClassLoader instance.- Returns:
- A Cache instance.
- Throws:
CacheAcquireException
- Problem instantiating a cache instance.
-
getCache
Normally called to initialize OsCache. To be able to test the method without havingcom.opensymphony.oscache.general.GeneralCacheAdministrator
implementation, it can also be called with a test implementations classname.- Parameters:
implementation
- Cache implementation classname to initialize.classLoader
- A ClassLoader instance.- Returns:
- A Cache instance.
- Throws:
CacheAcquireException
- Problem instantiating a cache instance.
-
getCacheType
Returns the short alias cache type for this factory instance.- Specified by:
getCacheType
in interfaceCacheFactory
- Returns:
- The short alias cache type.
-
getCacheClassName
Returns the full class name of the underlying cache implementation.- Specified by:
getCacheClassName
in interfaceCacheFactory
- Returns:
- The full cache class name.
-
shutdown
public void shutdown()Allows for cache-specific shutdown operations and resource cleanup.- Specified by:
shutdown
in interfaceCacheFactory
-