/** * Return an instance of this Factory. */ public static FileCacheFactory getFactory(int currentPort){ FileCacheFactory fileCacheFactory = cache.get(currentPort); if ( fileCacheFactory == null ){ fileCacheFactory = newInstance(currentPort); } return fileCacheFactory; }
/** * Configure the factory. */ public static FileCacheFactory newInstance(int currentPort){ FileCacheFactory fileCacheFactory= new SSLFileCacheFactory(); fileCacheFactory.port = currentPort; cache.put(currentPort, fileCacheFactory); Queue<FileCacheEntry> cacheManager = new ConcurrentQueue<FileCacheEntry>("SSLFileCacheFactory.cacheManager"); fileCacheFactory.setCacheManager(cacheManager); return fileCacheFactory; }
/** * Initialize the fileCacheFactory associated with this instance */ @Override protected void initFileCacheFactory(){ fileCacheFactory = SSLFileCacheFactory.getFactory(port); fileCacheFactory.setIsEnabled(isFileCacheEnabled); fileCacheFactory.setLargeFileCacheEnabled(isLargeFileCacheEnabled); fileCacheFactory.setSecondsMaxAge(secondsMaxAge); fileCacheFactory.setMaxCacheEntries(maxCacheEntries); fileCacheFactory.setMinEntrySize(minEntrySize); fileCacheFactory.setMaxEntrySize(maxEntrySize); fileCacheFactory.setMaxLargeCacheSize(maxLargeFileCacheSize); fileCacheFactory.setMaxSmallCacheSize(maxSmallFileCacheSize); fileCacheFactory.setIsMonitoringEnabled(isMonitoringEnabled); }