public class JDBCDiskCacheFactory extends AbstractAuxiliaryCacheFactory
Modifier and Type | Field and Description |
---|---|
protected ScheduledExecutorService |
scheduler
The background scheduler, one for all regions.
|
Constructor and Description |
---|
JDBCDiskCacheFactory() |
Modifier and Type | Method and Description |
---|---|
<K,V> JDBCDiskCache<K,V> |
createCache(AuxiliaryCacheAttributes rawAttr,
ICompositeCacheManager compositeCacheManager,
ICacheEventLogger cacheEventLogger,
IElementSerializer elementSerializer)
This factory method should create an instance of the jdbc cache.
|
protected void |
createShrinkerWhenNeeded(JDBCDiskCacheAttributes cattr,
JDBCDiskCache<?,?> raf)
If UseDiskShrinker is true then we will create a shrinker daemon if necessary.
|
void |
dispose()
Dispose of this factory, clean up shared resources
|
protected ScheduledExecutorService |
getScheduledExecutorService()
Get the scheduler service (lazily loaded)
|
protected TableState |
getTableState(String tableName)
Get a table state for a given table name
|
void |
initialize()
Initialize this factory
|
getName, setName
protected ScheduledExecutorService scheduler
public <K,V> JDBCDiskCache<K,V> createCache(AuxiliaryCacheAttributes rawAttr, ICompositeCacheManager compositeCacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) throws SQLException
rawAttr
- compositeCacheManager
- cacheEventLogger
- elementSerializer
- SQLException
- if the cache instance could not be createdpublic void initialize()
initialize
in interface AuxiliaryCacheFactory
initialize
in class AbstractAuxiliaryCacheFactory
public void dispose()
dispose
in interface AuxiliaryCacheFactory
dispose
in class AbstractAuxiliaryCacheFactory
protected TableState getTableState(String tableName)
tableName
- protected ScheduledExecutorService getScheduledExecutorService()
protected void createShrinkerWhenNeeded(JDBCDiskCacheAttributes cattr, JDBCDiskCache<?,?> raf)
cattr
- raf
- Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.