Class MySQLDiskCache<K,V> 
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache<K,V>
 
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheEventLogging<K,V>
 
org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCache<K,V>
 
org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCache<K,V>
 
org.apache.commons.jcs3.auxiliary.disk.jdbc.mysql.MySQLDiskCache<K,V> 
- All Implemented Interfaces:
- AuxiliaryCache<K,,- V> - ICache<K,,- V> - ICacheType
The MySQLDiskCache extends the core JDBCDiskCache.
 
Although the generic JDBC Disk Cache can be used for MySQL, the MySQL JDBC Disk Cache has additional features, such as table optimization that are particular to MySQL.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCacheAbstractDiskCache.MyCacheListenerNested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheTypeICacheType.CacheType
- 
Field SummaryFields inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheNAME_COMPONENT_DELIMITER
- 
Constructor SummaryConstructorsConstructorDescriptionMySQLDiskCache(MySQLDiskCacheAttributes attributes, DataSourceFactory dsFactory, TableState tableState) Delegates to the super and makes use of the MySQL specific parameters used for scheduled optimization.
- 
Method SummaryModifier and TypeMethodDescriptionconstructLikeParameterFromPattern(String pattern) protected intRemoved the expired.protected ICacheElement<K,V> processGet(K key) This delegates to the generic JDBC disk cache.protected Map<K,ICacheElement<K, V>> processGetMatching(String pattern) This delegates to the generic JDBC disk cache.protected voidprocessUpdate(ICacheElement<K, V> element) This delegates to the generic JDBC disk cache.Methods inherited from class org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCachedoesElementExist, getAuxiliaryCacheAttributes, getDataSource, getDiskLocation, getJdbcDiskCacheAttributes, getKeySet, getSize, getStatistics, getTableName, getTableState, processDispose, processRemove, processRemoveAll, reset, setJdbcDiskCacheAttributes, setTableState, toStringMethods inherited from class org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCachedispose, doDispose, doGet, doGetMatching, doRemove, doRemoveAll, doUpdate, get, getCacheName, getCacheType, getEventLoggingExtraInfo, getMatching, getStats, getStatus, isAlive, remove, removeAll, setAlive, updateMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheEventLoggingdisposeWithEventLogging, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, removeAllWithEventLogging, removeWithEventLogging, updateWithEventLoggingMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCachecreateICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcher
- 
Constructor Details- 
MySQLDiskCachepublic MySQLDiskCache(MySQLDiskCacheAttributes attributes, DataSourceFactory dsFactory, TableState tableState) throws SQLException Delegates to the super and makes use of the MySQL specific parameters used for scheduled optimization.- Parameters:
- attributes- the configuration object for this cache
- dsFactory- the DataSourceFactory for this cache
- tableState- an object to track table operations
- Throws:
- SQLException- if the pool access could not be set up
 
 
- 
- 
Method Details- 
processGetThis delegates to the generic JDBC disk cache. If we are currently optimizing, then this method will balk and return null.- Overrides:
- processGetin class- JDBCDiskCache<K,- V> 
- Parameters:
- key- Key to locate value for.
- Returns:
- An object matching key, or null.
- See Also:
 
- 
processGetMatchingThis delegates to the generic JDBC disk cache. If we are currently optimizing, then this method will balk and return null.- Overrides:
- processGetMatchingin class- JDBCDiskCache<K,- V> 
- Parameters:
- pattern- used for like query.
- Returns:
- An object matching key, or null.
 
- 
constructLikeParameterFromPattern- Overrides:
- constructLikeParameterFromPatternin class- JDBCDiskCache<K,- V> 
- Parameters:
- pattern-
- Returns:
- String to use in the like query.
 
- 
processUpdateThis delegates to the generic JDBC disk cache. If we are currently optimizing, then this method will balk and do nothing.- Overrides:
- processUpdatein class- JDBCDiskCache<K,- V> 
- Parameters:
- element-
 
- 
deleteExpiredRemoved the expired. (now - create time) > max life seconds * 1000If we are currently optimizing, then this method will balk and do nothing. TODO consider blocking and trying again. - Overrides:
- deleteExpiredin class- JDBCDiskCache<K,- V> 
- Returns:
- the number deleted
 
 
-