Example usage for org.apache.commons.jcs.engine CompositeCacheAttributes CompositeCacheAttributes

List of usage examples for org.apache.commons.jcs.engine CompositeCacheAttributes CompositeCacheAttributes

Introduction

In this page you can find the example usage for org.apache.commons.jcs.engine CompositeCacheAttributes CompositeCacheAttributes.

Prototype

public CompositeCacheAttributes() 

Source Link

Document

Constructor for the CompositeCacheAttributes object

Usage

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);//from   w  w w. ja  v  a2 s  .c o  m
    attributes.setUseDisk(false);
    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;/* w  ww.  j ava2s  .c  om*/
}