refreshList.add(
new Refreshee( uri, System.currentTimeMillis() + refreshRate, refreshType ) );
}
protected Cache getCache() {
CacheManager cacheManager = null;
Cache cache = null;
try {
cacheManager = CacheManagerFactory.getDefaultCacheManager();
} catch ( CacheException e ) {
getLogger().log(
name + ": Error getting default CacheManager.",
e,
LOG_CHANNEL,
Logger.ERROR );
return null;
}
cache = cacheManager.getCache( CACHE_NAME );
if ( cache == null ) {
cache = new Cache(
CACHE_NAME,
DEFAULT_CACHE_SIZE,
DEFAULT_CACHE_OVERFLOW_TO_DISK,
DEFAULT_CACHE_ETERNAL,
DEFAULT_CACHE_TTL,
DEFAULT_CACHE_TTI );
try {
cacheManager.addCache(cache);
} catch ( IllegalStateException e ) {
getLogger().log(
name + ": Error adding cache \"" + CACHE_NAME + "\" to CacheManager.",
e,
LOG_CHANNEL,