Search in sources :

Example 1 with EnchachePool

use of com.actiontech.dble.cache.impl.EnchachePool in project dble by actiontech.

the class TestCachePoolPerformance method createEnCachePool.

public static CachePool createEnCachePool() {
    CacheConfiguration cacheConf = new CacheConfiguration();
    cacheConf.setName("testcache");
    cacheConf.maxBytesLocalHeap(400, MemoryUnit.MEGABYTES).timeToIdleSeconds(3600);
    Cache cache = new Cache(cacheConf);
    CacheManager.create().addCache(cache);
    EnchachePool enCachePool = new EnchachePool(cacheConf.getName(), cache, 400 * 10000);
    return enCachePool;
}
Also used : EnchachePool(com.actiontech.dble.cache.impl.EnchachePool) CacheConfiguration(net.sf.ehcache.config.CacheConfiguration) Cache(net.sf.ehcache.Cache)

Aggregations

EnchachePool (com.actiontech.dble.cache.impl.EnchachePool)1 Cache (net.sf.ehcache.Cache)1 CacheConfiguration (net.sf.ehcache.config.CacheConfiguration)1