/** * Create an instance of the BlockDiskCache. * <p> * @param iaca the cache attributes for this cache * @param cacheMgr This allows auxiliaries to reference the manager without assuming that it is * a singleton. This will allow JCS to be a non-singleton. Also, it makes it easier * to test. * @param cacheEventLogger * @param elementSerializer * @return BlockDiskCache */ @Override public <K, V> BlockDiskCache<K, V> createCache( AuxiliaryCacheAttributes iaca, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer ) { BlockDiskCacheAttributes idca = (BlockDiskCacheAttributes) iaca; if ( log.isDebugEnabled() ) { log.debug( "Creating DiskCache for attributes = " + idca ); } BlockDiskCache<K, V> cache = new BlockDiskCache<K, V>( idca, elementSerializer ); cache.setCacheEventLogger( cacheEventLogger ); return cache; } }
/** * Create an instance of the BlockDiskCache. * <p> * @param iaca the cache attributes for this cache * @param cacheMgr This allows auxiliaries to reference the manager without assuming that it is * a singleton. This will allow JCS to be a non-singleton. Also, it makes it easier * to test. * @param cacheEventLogger * @param elementSerializer * @return BlockDiskCache */ @Override public <K, V> BlockDiskCache<K, V> createCache( AuxiliaryCacheAttributes iaca, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer ) { BlockDiskCacheAttributes idca = (BlockDiskCacheAttributes) iaca; if ( log.isDebugEnabled() ) { log.debug( "Creating DiskCache for attributes = " + idca ); } BlockDiskCache<K, V> cache = new BlockDiskCache<K, V>( idca ); cache.setCacheEventLogger( cacheEventLogger ); cache.setElementSerializer( elementSerializer ); return cache; } }