| 1 |
package org.apache.commons.jcs3.auxiliary.disk.indexed; |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
import org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory; |
| 23 |
import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes; |
| 24 |
import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager; |
| 25 |
import org.apache.commons.jcs3.engine.behavior.IElementSerializer; |
| 26 |
import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger; |
| 27 |
import org.apache.commons.jcs3.log.Log; |
| 28 |
import org.apache.commons.jcs3.log.LogManager; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
public class IndexedDiskCacheFactory |
| 34 |
extends AbstractAuxiliaryCacheFactory |
| 35 |
{ |
| 36 |
|
| 37 |
private static final Log log = LogManager.getLog( IndexedDiskCacheFactory.class ); |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
@Override |
| 51 |
public <K, V> IndexedDiskCache<K, V> createCache( final AuxiliaryCacheAttributes iaca, final ICompositeCacheManager cacheMgr, |
| 52 |
final ICacheEventLogger cacheEventLogger, final IElementSerializer elementSerializer ) |
| 53 |
{ |
| 54 |
final IndexedDiskCacheAttributes idca = (IndexedDiskCacheAttributes) iaca; |
| 55 |
log.debug( "Creating DiskCache for attributes = {0}", idca ); |
| 56 |
|
| 57 |
final IndexedDiskCache<K, V> cache = new IndexedDiskCache<>( idca, elementSerializer ); |
| 58 |
cache.setCacheEventLogger( cacheEventLogger ); |
| 59 |
|
| 60 |
return cache; |
| 61 |
} |
| 62 |
} |