Class MySQLDiskCacheFactory
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory
org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
org.apache.commons.jcs3.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
- All Implemented Interfaces:
- AuxiliaryCacheFactory,- IRequireScheduler
This factory should create mysql disk caches.
- 
Field SummaryFields inherited from class org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactoryATTRIBUTE_PREFIX, POOL_CONFIGURATION_PREFIX, scheduler
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<K,V> MySQLDiskCache<K, V> createCache(AuxiliaryCacheAttributes rawAttr, ICompositeCacheManager compositeCacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) This factory method should create an instance of the mysqlcache.protected voidscheduleOptimization(Date startTime, MySQLTableOptimizer optimizer) This takes in a single time and schedules the optimizer to be called at that time every day.protected voidscheduleOptimizations(MySQLDiskCacheAttributes attributes, TableState tableState, DataSource ds) For each time in the optimization schedule, this calls schedule Optimization.Methods inherited from class org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactorycreateShrinkerWhenNeeded, dispose, getDataSourceFactory, getScheduledExecutorService, getTableState, initialize, setScheduledExecutorServiceMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactorygetName, setName
- 
Constructor Details- 
MySQLDiskCacheFactorypublic MySQLDiskCacheFactory()
 
- 
- 
Method Details- 
createCachepublic <K,V> MySQLDiskCache<K,V> createCache(AuxiliaryCacheAttributes rawAttr, ICompositeCacheManager compositeCacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) throws SQLException This factory method should create an instance of the mysqlcache.- Specified by:
- createCachein interface- AuxiliaryCacheFactory
- Overrides:
- createCachein class- JDBCDiskCacheFactory
- Parameters:
- rawAttr- specific cache configuration attributes
- compositeCacheManager- the global cache manager
- cacheEventLogger- a specific logger for cache events
- elementSerializer- a serializer for cache elements
- Returns:
- MySQLDiskCache the cache instance
- Throws:
- SQLException- if the cache instance could not be created
 
- 
scheduleOptimizationsprotected void scheduleOptimizations(MySQLDiskCacheAttributes attributes, TableState tableState, DataSource ds) For each time in the optimization schedule, this calls schedule Optimization.- Parameters:
- attributes- configuration properties.
- tableState- for noting optimization in progress, etc.
- ds- the DataSource
 
- 
scheduleOptimizationThis takes in a single time and schedules the optimizer to be called at that time every day.- Parameters:
- startTime- -- HH:MM:SS format
- optimizer-
 
 
-