Class HSQLDiskCacheFactory
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory
org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
org.apache.commons.jcs3.auxiliary.disk.jdbc.hsql.HSQLDiskCacheFactory
- All Implemented Interfaces:
AuxiliaryCacheFactory
,IRequireScheduler
This factory should create hsql disk caches.
-
Field Summary
Fields inherited from class org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
ATTRIBUTE_PREFIX, POOL_CONFIGURATION_PREFIX, scheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,
V> JDBCDiskCache<K, V> createCache
(AuxiliaryCacheAttributes rawAttr, ICompositeCacheManager compositeCacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) This factory method should create an instance of the hsqlcache.protected void
setupDatabase
(DataSource ds, JDBCDiskCacheAttributes attributes) Creates the table if it doesn't existprotected void
setupTable
(Connection cConn, String tableName) SETUP TABLE FOR CACHEMethods inherited from class org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
createShrinkerWhenNeeded, dispose, getDataSourceFactory, getScheduledExecutorService, getTableState, initialize, setScheduledExecutorService
Methods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory
getName, setName
-
Constructor Details
-
HSQLDiskCacheFactory
public HSQLDiskCacheFactory()
-
-
Method Details
-
createCache
public <K,V> JDBCDiskCache<K,V> createCache(AuxiliaryCacheAttributes rawAttr, ICompositeCacheManager compositeCacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) throws SQLException This factory method should create an instance of the hsqlcache.- Specified by:
createCache
in interfaceAuxiliaryCacheFactory
- Overrides:
createCache
in classJDBCDiskCacheFactory
- Parameters:
rawAttr
-compositeCacheManager
-cacheEventLogger
-elementSerializer
-- Returns:
- JDBCDiskCache
- Throws:
SQLException
- if the creation of the cache instance fails
-
setupDatabase
Creates the table if it doesn't exist- Parameters:
ds
- Data Sourceattributes
- Cache region configuration- Throws:
SQLException
-
setupTable
SETUP TABLE FOR CACHE- Parameters:
cConn
-tableName
-- Throws:
SQLException
-