public class MySQLDiskCache<K,V> extends JDBCDiskCache<K,V>
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.
AbstractDiskCache.MyCacheListenerICacheType.CacheTypeNAME_COMPONENT_DELIMITER| Constructor and Description |
|---|
MySQLDiskCache(MySQLDiskCacheAttributes attributes,
DataSourceFactory dsFactory,
TableState tableState)
Delegates to the super and makes use of the MySQL specific parameters used for scheduled
optimization.
|
| Modifier and Type | Method and Description |
|---|---|
String |
constructLikeParameterFromPattern(String pattern) |
protected int |
deleteExpired()
Removed 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 void |
processUpdate(ICacheElement<K,V> element)
This delegates to the generic JDBC disk cache.
|
doesElementExist, getAuxiliaryCacheAttributes, getDataSource, getDiskLocation, getJdbcDiskCacheAttributes, getKeySet, getSize, getStatistics, getTableName, getTableState, processDispose, processRemove, processRemoveAll, reset, setJdbcDiskCacheAttributes, setTableState, toStringdispose, doDispose, doGet, doGetMatching, doRemove, doRemoveAll, doUpdate, get, getCacheName, getCacheType, getEventLoggingExtraInfo, getMatching, getStats, getStatus, isAlive, remove, removeAll, setAlive, updatedisposeWithEventLogging, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, removeAllWithEventLogging, removeWithEventLogging, updateWithEventLoggingcreateICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcherpublic MySQLDiskCache(MySQLDiskCacheAttributes attributes, DataSourceFactory dsFactory, TableState tableState) throws SQLException
attributes - the configuration object for this cachedsFactory - the DataSourceFactory for this cachetableState - an object to track table operationsSQLException - if the pool access could not be set upprotected ICacheElement<K,V> processGet(K key)
processGet in class JDBCDiskCache<K,V>key - Key to locate value for.AbstractDiskCache.get(Object)protected Map<K,ICacheElement<K,V>> processGetMatching(String pattern)
processGetMatching in class JDBCDiskCache<K,V>pattern - used for like query.public String constructLikeParameterFromPattern(String pattern)
constructLikeParameterFromPattern in class JDBCDiskCache<K,V>pattern - protected void processUpdate(ICacheElement<K,V> element)
processUpdate in class JDBCDiskCache<K,V>element - protected int deleteExpired()
If we are currently optimizing, then this method will balk and do nothing.
TODO consider blocking and trying again.
deleteExpired in class JDBCDiskCache<K,V>Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.