public class MySQLDiskCacheManager extends JDBCDiskCacheManagerAbstractTemplate
Although the generic JDBC Disk Cache Manager can be used for MySQL, the MySQL JDBC Disk Cache has additional features, such as table optimization that are particular to MySQL.
clients, tableStates
Modifier and Type | Method and Description |
---|---|
protected <K,V> MySQLDiskCache<K,V> |
createJDBCDiskCache(JDBCDiskCacheAttributes cattr,
TableState tableState)
Creates a JDBCDiskCache using the supplied attributes.
|
<K,V> MySQLDiskCache<K,V> |
getCache(String cacheName)
Gets the cache attribute of the HSQLCacheManager object
|
protected ICompositeCacheManager |
getCompositeCacheManager() |
MySQLDiskCacheAttributes |
getDefaultJDBCDiskCacheAttributes()
Gets the defaultCattr attribute of the HSQLCacheManager object
|
static MySQLDiskCacheManager |
getInstance(MySQLDiskCacheAttributes cattr,
ICompositeCacheManager compositeCacheManager,
ICacheEventLogger cacheEventLogger,
IElementSerializer elementSerializer)
Gets the instance attribute of the HSQLCacheManager class
|
protected void |
scheduleOptimization(Date startTime,
MySQLTableOptimizer optimizer)
This takes in a single time and schedules the optimizer to be called at that time every day.
|
protected void |
scheduleOptimizations(MySQLDiskCacheAttributes attributes,
TableState tableState,
JDBCDiskCachePoolAccess poolAccess)
For each time in the optimization schedule, this calls schedule Optimizaiton.
|
protected void |
setCompositeCacheManager(ICompositeCacheManager compositeCacheManager) |
createShrinkerWhenNeeded, freeCache, getCache, release
getCacheEventLogger, getElementSerializer, setCacheEventLogger, setElementSerializer
public MySQLDiskCacheAttributes getDefaultJDBCDiskCacheAttributes()
public static MySQLDiskCacheManager getInstance(MySQLDiskCacheAttributes cattr, ICompositeCacheManager compositeCacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer)
cattr
- compositeCacheManager
- cacheEventLogger
- elementSerializer
- public <K,V> MySQLDiskCache<K,V> getCache(String cacheName)
cacheName
- protected <K,V> MySQLDiskCache<K,V> createJDBCDiskCache(JDBCDiskCacheAttributes cattr, TableState tableState) throws SQLException
createJDBCDiskCache
in class JDBCDiskCacheManagerAbstractTemplate
cattr
- tableState
- SQLException
- if database operations failprotected void setCompositeCacheManager(ICompositeCacheManager compositeCacheManager)
compositeCacheManager
- the compositeCacheManager to setprotected ICompositeCacheManager getCompositeCacheManager()
protected void scheduleOptimizations(MySQLDiskCacheAttributes attributes, TableState tableState, JDBCDiskCachePoolAccess poolAccess)
attributes
- configuration propeties.tableState
- for noting optimization in progress, etc.poolAccess
- access to the poolprotected void scheduleOptimization(Date startTime, MySQLTableOptimizer optimizer)
startTime
- -- HH:MM:SS formatoptimizer
- Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.