List of usage examples for org.apache.commons.jcs.engine CompositeCacheAttributes setMaxObjects
@Override public void setMaxObjects(int maxObjs)
From source file:org.mkosem.impl.JCSCache.java
public JCSCache(int capacity, int concurrencyLevel) throws CacheException { JCS.setConfigProperties(new Properties()); CompositeCacheAttributes attributes = new CompositeCacheAttributes(); attributes.setMaxObjects(capacity); attributes.setUseDisk(false);// w ww. ja v a 2s .c o m attributes.setUseRemote(false); attributes.setUseLateral(false); cache_ = JCS.getInstance("test", attributes); }
From source file:org.openstreetmap.josm.data.cache.JCSCacheManager.java
private static CompositeCacheAttributes getCacheAttributes(int maxMemoryElements) { CompositeCacheAttributes ret = new CompositeCacheAttributes(); ret.setMaxObjects(maxMemoryElements); ret.setDiskUsagePattern(DiskUsagePattern.UPDATE); return ret;// ww w. j av a 2s . c om }