All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xson.web.cache.creater.EhcacheCreater Maven / Gradle / Ivy

Go to download

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