org.xson.web.cache.creater.EhcacheCreater Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xco-web Show documentation
Show all versions of xco-web Show documentation
xco-web is an easy to use control layer framework, is part of the SOA system, using xml language to describe the controller.
The newest version!
package org.xson.web.cache.creater;
import net.sf.ehcache.CacheException;
import org.xson.web.cache.EhCacheCache;
import org.xson.web.cache.ICache;
import org.xson.web.cache.vo.CacheVo;
public class EhcacheCreater implements ICreate {
public ICache create(CacheVo cacheVo) {
EhCacheCache cache = new EhCacheCache();
String resource = cacheVo.getResource();
if (null == resource) {
throw new CacheException("missing resource in ehcache type");
}
cache.start(resource, cacheVo.getProperties());
return cache;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy