⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cachefactory.java

📁 网上考试系统
💻 JAVA
字号:
package cn.hxex.exam.cache;

import cn.hxex.exam.config.CacheConfig;
import cn.hxex.exam.config.ExamConfigUtil;
import cn.hxex.exam.util.HxexClassUtils;

/**
 * The Cache Factory
 * 
 * @author galaxy
 * 
 */
public class CacheFactory
{
	/**
	 * Get the Cache instance
	 * 
	 * @return the cache instance
	 */
	public static Cache getCache()
	{
		// 得到缓存对象的配置信息
		CacheConfig cacheconfig = ExamConfigUtil.getCacheConfig();
		// 得到缓存对象的实例
		Cache cache = HxexClassUtils.getInstance(Cache.class, cacheconfig
				.getType());
		// 缓存对象初始化
		cache.initialize(cacheconfig.getProperties());

		return cache;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -