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.MyCacheListener
ICacheType.CacheType
Constructor and Description |
---|
MySQLDiskCache(MySQLDiskCacheAttributes attributes,
DataSourceFactory dsFactory,
TableState tableState,
ICompositeCacheManager compositeCacheManager)
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, getElementSerializer, getJdbcDiskCacheAttributes, getKeySet, getSize, getStatistics, getTableName, getTableState, processDispose, processRemove, processRemoveAll, reset, setElementSerializer, setJdbcDiskCacheAttributes, setTableState, toString
dispose, doDispose, doGet, doGetMatching, doRemove, doRemoveAll, doUpdate, get, getCacheName, getCacheType, getEventLoggingExtraInfo, getMatching, getStats, getStatus, isAlive, processGetMultiple, remove, removeAll, setAlive, update
disposeWithEventLogging, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, removeAllWithEventLogging, removeWithEventLogging, updateWithEventLogging
createICacheEvent, createICacheEvent, getCacheEventLogger, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, setCacheEventLogger, setKeyMatcher
public MySQLDiskCache(MySQLDiskCacheAttributes attributes, DataSourceFactory dsFactory, TableState tableState, ICompositeCacheManager compositeCacheManager) throws SQLException
attributes
- the configuration object for this cachedsFactory
- the DataSourceFactory for this cachetableState
- an object to track table operationscompositeCacheManager
- the global cache managerSQLException
- 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–2018 The Apache Software Foundation. All rights reserved.